From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32087 invoked by alias); 1 Dec 2014 06:02:16 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 32074 invoked by uid 89); 1 Dec 2014 06:02:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail.theptrgroup.com Received: from mail.theptrgroup.com (HELO mail.theptrgroup.com) (71.178.251.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 Dec 2014 06:02:13 +0000 Received: from [10.11.21.10] (unknown [10.11.21.10]) by mail.theptrgroup.com (Postfix) with ESMTPS id D7712E082B for ; Mon, 1 Dec 2014 01:02:10 -0500 (EST) From: Jamison Hope Content-Type: multipart/mixed; boundary="Apple-Mail=_38A6C62C-9F6D-4483-81B3-3C565E490E1B" Message-Id: Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: srfi-14 char-set<= problem Date: Mon, 01 Dec 2014 06:02:00 -0000 References: <54776323.4000101@hungry.com> To: kawa@sourceware.org In-Reply-To: <54776323.4000101@hungry.com> X-IsSubscribed: yes X-SW-Source: 2014-q4/txt/msg00104.txt.bz2 --Apple-Mail=_38A6C62C-9F6D-4483-81B3-3C565E490E1B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Content-length: 481 On Nov 27, 2014, at 12:45 PM, Seth Alves wrote: > (import (scheme base) (scheme write) (srfi 14)) > (write (char-set<=3D (char-set #\u) (char-set #\u))) > (newline) > (write (char-set<=3D (char-set #\u) (char-set #\u #\a))) > (newline) >=20 > This prints: >=20 > #t > #f >=20 > -seth Yup, there was a bug in the char-set<=3D logic. The attached patch should = fix it. Per, if you would do the honors.. -- Jamison Hope The PTR Group www.theptrgroup.com --Apple-Mail=_38A6C62C-9F6D-4483-81B3-3C565E490E1B Content-Disposition: attachment; filename=srfi14-fix.patch Content-Type: application/octet-stream; name="srfi14-fix.patch" Content-Transfer-Encoding: 7bit Content-length: 2227 Index: gnu/kawa/slib/ChangeLog =================================================================== --- gnu/kawa/slib/ChangeLog (revision 8186) +++ gnu/kawa/slib/ChangeLog (working copy) @@ -1,3 +1,7 @@ +2014-12-01 Jamison Hope + + * srfi14.scm (char-set<=): Fix bug reported by Seth Alves. + 2014-11-27 Seth Alves * srfi60.scm: Add more aliases. Index: gnu/kawa/slib/srfi14.scm =================================================================== --- gnu/kawa/slib/srfi14.scm (revision 8186) +++ gnu/kawa/slib/srfi14.scm (working copy) @@ -483,6 +483,9 @@ ((= (inversion-list (- ai 1)) (cs:inversion-list (- bi 1))) (loop (- ai 2) (- bi 2))) + ((> (inversion-list ai) + (cs:inversion-list (- bi 1))) + (loop ai (- bi 2))) (else #f)))) ((contains? (char ::character)) ::boolean Index: testsuite/ChangeLog =================================================================== --- testsuite/ChangeLog (revision 8186) +++ testsuite/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2014-12-01 Jamison Hope + + * lib-test.scm: Add test for char-set<= bug reported by Seth + Alves. + 2014-11-26 Seth Alves Per Bothner Index: testsuite/lib-test.scm =================================================================== --- testsuite/lib-test.scm (revision 8186) +++ testsuite/lib-test.scm (working copy) @@ -1,6 +1,6 @@ ;; -*- coding: utf-8 -*- -(test-begin "libs" 257) +(test-begin "libs" 259) (test-begin "vectors") (test-equal '(dah dah didah) @@ -509,7 +509,7 @@ (test-end) -(test-begin "char-sets" 89) +(test-begin "char-sets" 91) (import (srfi :14 char-sets)) (import (rnrs sorting)) @@ -526,6 +526,8 @@ (test-equal #t (char-set<= char-set:empty char-set:full)) (test-equal #t (char-set<= char-set:empty char-set:lower-case char-set:full)) +(test-equal #t (char-set<= (char-set #\u) (char-set #\u))) +(test-equal #t (char-set<= (char-set #\u) (char-set #\u #\a))) ; char-set-hash (test-equal #t (= (char-set-hash char-set:empty) (char-set-hash (char-set)))) --Apple-Mail=_38A6C62C-9F6D-4483-81B3-3C565E490E1B--