From: Michael Gran Date: Sat, 3 Apr 2010 04:08:42 +0000 (-0700) Subject: Unicode data parsing script incorrect for char-set:ascii X-Git-Tag: release_1-9-10~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d30df5dbd4080c08d606c9f2b21672d47f04203;p=platform%2Fupstream%2Fguile.git Unicode data parsing script incorrect for char-set:ascii char-set:ascii is the only char-set consisting of a single contiguous range, and there was an off-by-one error for that case. * libguile/unidata_to_charset.pl (compute): fix off-by-one --- diff --git a/libguile/unidata_to_charset.pl b/libguile/unidata_to_charset.pl index d086c8ec4..961dba60c 100755 --- a/libguile/unidata_to_charset.pl +++ b/libguile/unidata_to_charset.pl @@ -340,8 +340,9 @@ sub compute { $rend[$len] = $end; $len++; } elsif ($len == 0) { - $rstart[0] = $start; - $rend[0] = $end; + $rstart[0] = $start; + $rend[0] = $end; + $len++; } } diff --git a/test-suite/tests/srfi-14.test b/test-suite/tests/srfi-14.test index f12a2557c..93b1883aa 100644 --- a/test-suite/tests/srfi-14.test +++ b/test-suite/tests/srfi-14.test @@ -721,10 +721,14 @@ (integer->char #x20)))) char-set:printing)) + (pass-if "char-set:ASCII" + (char-set= (ucs-range->char-set 0 128) + char-set:ascii)) + (pass-if "char-set:iso-control" - (char-set<= (string->char-set - (apply string - (map integer->char (append + (char-set<= (string->char-set + (apply string + (map integer->char (append ;; U+0000 to U+001F (iota #x20) (list #x7f)))))