bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile 1.8.5 test failure: srfi-14.test


From: Bruno Haible
Subject: guile 1.8.5 test failure: srfi-14.test
Date: Fri, 16 May 2008 00:43:56 +0200
User-agent: KMail/1.5.4

Hi,

Trying to install guile-1.8.5 on a Linux/x86 system, I get test failures:

$ ./configure --prefix=/packages/gnu CPPFLAGS=-Wall
$ make
§ make check
...
Running ports.test
UNRESOLVED: ports.test: port-for-each: passing freed cell
Running posix.test
...
Running srfi-14.test
FAIL: srfi-14.test: Latin-1 (8-bit charset): char-set:letter (size)
FAIL: srfi-14.test: Latin-1 (8-bit charset): char-set:lower-case (size)
FAIL: srfi-14.test: Latin-1 (8-bit charset): char-set:upper-case (size)
Running srfi-19.test
...
Running syntax.test
UNRESOLVED: syntax.test: while: in empty environment: empty body
UNRESOLVED: syntax.test: while: in empty environment: initially false
UNRESOLVED: syntax.test: while: in empty environment: iterating
Running threads.test
...
Running weaks.test
UNRESOLVED: weaks.test: weak-vector: dies

Totals for this test run:
passes:                 11896
failures:               3
unexpected passes:      0
expected failures:      25
unresolved test cases:  5
untested test cases:    0
unsupported test cases: 9
errors:                 0

FAIL: check-guile
==================================
1 of 1 tests failed
Please report to address@hidden
==================================
make[2]: *** [check-TESTS] Fehler 1

Environment information:
- gcc version is 3.3.1
- glibc version is 2.3.6
- locale is de_DE.UTF-8

What happens in srfi-14.test?

On my system, (find-latin1-locale) returns "de_DE.iso88591". Now look:
$ guile
guile> (char-set-size char-set:letter)
52
guile> (setlocale LC_CTYPE "de_DE.iso88591")
"de_DE.iso88591"
guile> (char-set-size char-set:letter)
124
guile> char-set:letter
#<charset {#\A #\B #\C #\D #\E #\F #\G #\H #\I #\J #\K #\L #\M #\N #\O #\P #\Q 
#\R #\S #\T #\U #\V #\W #\X #\Y #\Z #\a #\b #\c #\d #\e #\f #\g #\h #\i #\j #\k 
#\l #\m #\n #\o #\p #\q #\r #\s #\t #\u #\v #\w #\x #\y #\z #\246 #\250 #\252 
#\264 #\265 #\270 #\272 #\274 #\275 #\276 #\300 #\301 #\302 #\303 #\304 #\305 
#\306 #\307 #\310 #\311 #\312 #\313 #\314 #\315 #\316 #\317 #\320 #\321 #\322 
#\323 #\324 #\325 #\326 #\330 #\331 #\332 #\333 #\334 #\335 #\336 #\337 #\340 
#\341 #\342 #\343 #\344 #\345 #\346 #\347 #\350 #\351 #\352 #\353 #\354 #\355 
#\356 #\357 #\360 #\361 #\362 #\363 #\364 #\365 #\366 #\370 #\371 #\372 #\373 
#\374 #\375 #\376 #\377}>

So the notion of "letters" in a Latin1 locale may depend on the libc.
It might be safer to change the test code from

    (= (char-set-size char-set:letter) 117)

to

    (>= (char-set-size char-set:letter) 100)

If I do this change in srfi-14.test, this part of the test passes.
Similarly, I get
$ guile
guile> (setlocale LC_CTYPE "de_DE.iso88591")
"de_DE.iso88591"
guile> (char-set-size char-set:lower-case)
62
guile> (char-set-size char-set:upper-case)
60

Here is the complete patch. It makes the testsuite pass.


2008-05-15  Bruno Haible  <address@hidden>

        * test-suite/tests/srfi-14.test: Relax the check on the size of
        the letters, lower-case, upper-case character sets in Latin1 locales.
        Needed on glibc-2.3.6 systems.

--- guile-1.8.5/test-suite/tests/srfi-14.test   2008-04-07 23:30:03.000000000 
+0200
+++ guile-1.8.5/test-suite/tests/srfi-14.test   2008-05-16 00:41:26.000000000 
+0200
@@ -1,7 +1,7 @@
 ;;;; srfi-14.test --- Test suite for Guile's SRFI-14 functions.
 ;;;; Martin Grabmueller, 2001-07-16
 ;;;;
-;;;; Copyright (C) 2001, 2006 Free Software Foundation, Inc.
+;;;; Copyright (C) 2001, 2006, 2008 Free Software Foundation, Inc.
 ;;;; 
 ;;;; This program is free software; you can redistribute it and/or modify
 ;;;; it under the terms of the GNU General Public License as published by
@@ -276,17 +276,17 @@
   (pass-if "char-set:letter (size)"
      (if (not %latin1)
         (throw 'unresolved)
-        (= (char-set-size char-set:letter) 117)))
+        (>= (char-set-size char-set:letter) 100)))
 
   (pass-if "char-set:lower-case (size)"
      (if (not %latin1)
         (throw 'unresolved)
-        (= (char-set-size char-set:lower-case) (+ 26 33))))
+        (>= (char-set-size char-set:lower-case) (+ 26 30))))
 
   (pass-if "char-set:upper-case (size)"
      (if (not %latin1)
         (throw 'unresolved)
-        (= (char-set-size char-set:upper-case) (+ 26 30))))
+        (>= (char-set-size char-set:upper-case) (+ 26 30))))
 
   (pass-if "char-set:punctuation (membership)"
      (if (not %latin1)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]