diff options
author | Michael Gran <spk121@yahoo.com> | 2010-04-02 21:08:42 -0700 |
---|---|---|
committer | Michael Gran <spk121@yahoo.com> | 2010-04-02 21:08:42 -0700 |
commit | 6d30df5dbd4080c08d606c9f2b21672d47f04203 (patch) | |
tree | 2ab101728a5090cb721625e3fd7a839452a601b6 | |
parent | 43cd9cec2320b0fad4e04410226b319918a57f35 (diff) | |
download | guile-6d30df5dbd4080c08d606c9f2b21672d47f04203.tar.gz |
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
-rwxr-xr-x | libguile/unidata_to_charset.pl | 5 | ||||
-rw-r--r-- | test-suite/tests/srfi-14.test | 10 |
2 files changed, 10 insertions, 5 deletions
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))))) |