guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, string_abstraction2, updated. cd130d9b


From: Michael Gran
Subject: [Guile-commits] GNU Guile branch, string_abstraction2, updated. cd130d9b5fbb6345a57dfde0800be8a9a9257203
Date: Tue, 26 May 2009 12:54:22 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=cd130d9b5fbb6345a57dfde0800be8a9a9257203

The branch, string_abstraction2 has been updated
       via  cd130d9b5fbb6345a57dfde0800be8a9a9257203 (commit)
      from  b123b24a4695d42fa797cd6902f8866eac1659d5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit cd130d9b5fbb6345a57dfde0800be8a9a9257203
Author: Michael Gran <address@hidden>
Date:   Tue May 26 05:52:42 2009 -0700

    Cosmetic changes. Indenting.
    
        * test-suite/tests/encoding-iso88591.test
        * test-suite/tests/encoding-iso88597.test
            * test-suite/tests/encoding-utf8.test
        * test-suite/tests/encoding-escapes.test

-----------------------------------------------------------------------

Summary of changes:
 test-suite/tests/encoding-escapes.test  |   98 +++++++++++------------
 test-suite/tests/encoding-iso88591.test |  113 +++++++++++++--------------
 test-suite/tests/encoding-iso88597.test |  131 +++++++++++++++----------------
 test-suite/tests/encoding-utf8.test     |   84 +++++++++-----------
 4 files changed, 201 insertions(+), 225 deletions(-)

diff --git a/test-suite/tests/encoding-escapes.test 
b/test-suite/tests/encoding-escapes.test
index 8597e74..aea5295 100644
--- a/test-suite/tests/encoding-escapes.test
+++ b/test-suite/tests/encoding-escapes.test
@@ -37,36 +37,34 @@
 
 (setencoding "ASCII")
 
-(with-test-prefix
- "internal encoding"
+(with-test-prefix "internal encoding"
 
- (pass-if "ultima"
-         (string=? s1 (string-ints #xfa #x6c #x74 #x69 #x6d #x61)))
-
- (pass-if "cedula"
-         (string=? s2 (string-ints #x63 #xe9 #x64 #x75 #x6c #x61)))
-
- (pass-if "anos"
-         (string=? s3 (string-ints #x61 #xf1 #x6f #x73)))
- 
- (pass-if "Rashomon"
-         (string=? s4 (string-ints #x7f85 #x751f #x9580))))
+  (pass-if "ultima"
+          (string=? s1 (string-ints #xfa #x6c #x74 #x69 #x6d #x61)))
+  
+  (pass-if "cedula"
+          (string=? s2 (string-ints #x63 #xe9 #x64 #x75 #x6c #x61)))
+  
+  (pass-if "anos"
+          (string=? s3 (string-ints #x61 #xf1 #x6f #x73)))
+  
+  (pass-if "Rashomon"
+          (string=? s4 (string-ints #x7f85 #x751f #x9580))))
 
-(with-test-prefix
- "chars"
+(with-test-prefix "chars"
  
   (pass-if "ultima"
           (list= eqv? (string->list s1)
                  (list #\372 #\l #\t #\i #\m #\a)))
-
+  
   (pass-if "cedula"
           (list= eqv? (string->list s2)
                  (list #\c #\351 #\d #\u #\l #\a)))
-
+  
   (pass-if "anos"
           (list= eqv? (string->list s3)
                  (list #\a #\361 #\o #\s)))
-
+  
   (pass-if "Rashomon"
           (list= eqv? (string->list s4)
                  (list #\77605 #\72437 #\112600))))
@@ -76,56 +74,54 @@
 ;; error strategy is 'error
 (set-conversion-error-behavior! 'error)
 
-(with-test-prefix
- "display output errors"
+(with-test-prefix "display output errors"
 
- (pass-if-exception "ultima"
-      exception:conversion
-      (with-output-to-string (lambda() (display s1))))
+  (pass-if-exception "ultima"
+                    exception:conversion
+                    (with-output-to-string (lambda() (display s1))))
 
- (pass-if-exception "Rashomon"
-      exception:conversion
-      (with-output-to-string (lambda() (display s4)))))
+  (pass-if-exception "Rashomon"
+                    exception:conversion
+                    (with-output-to-string (lambda() (display s4)))))
 
 
 ;; Check that questions marks or substitutions appear when the conversion
 ;; mode is substitute
 (set-conversion-error-behavior! 'substitute)
 
-(with-test-prefix
- "display output substitutions"
- (pass-if "ultima"
-          (string=? "?ltima"
-                   (with-output-to-string (lambda() (display s1)))))
- (pass-if "Rashomon"
-         (string=? "???"
-                   (with-output-to-string (lambda() (display s4))))))
+(with-test-prefix "display output substitutions"
+
+  (pass-if "ultima"
+          (string=? "?ltima"
+                    (with-output-to-string (lambda() (display s1)))))
+  (pass-if "Rashomon"
+          (string=? "???"
+                    (with-output-to-string (lambda() (display s4))))))
 
 
 ;; Check that hex escapes appear in the write output and that no error
 ;; is thrown.  The output error strategy should be irrelevant here.
 (set-conversion-error-behavior! 'escape)
 
-(with-test-prefix
- "display output escapes"
- (pass-if "ultima"
-          (string=? "\\xfaltima"
-                   (with-output-to-string (lambda() (display s1)))))
- (pass-if "Rashomon"
-         (string=? "\\u7F85\\u751F\\u9580"
-                   (with-output-to-string (lambda() (display s4))))))
+(with-test-prefix "display output escapes"
+
+  (pass-if "ultima"
+          (string=? "\\xfaltima"
+                    (with-output-to-string (lambda() (display s1)))))
+  (pass-if "Rashomon"
+          (string=? "\\u7F85\\u751F\\u9580"
+                    (with-output-to-string (lambda() (display s4))))))
  
 
 (setlocale LC_ALL "en_US.utf8")
 
-(with-test-prefix
- "input escapes"
+(with-test-prefix "input escapes"
 
- (pass-if  "última"
-          (string=? "última"
-                    (with-input-from-string "\"\\xfaltima\"" read)))
+  (pass-if  "última"
+           (string=? "última"
+                     (with-input-from-string "\"\\xfaltima\"" read)))
+
+  (pass-if "羅生門"
+          (string=? "羅生門"
+                    (with-input-from-string "\"\\u7F85\\u751F\\u9580\"" 
read))))
 
- (pass-if "羅生門"
-         (string=? "羅生門"
-                   (with-input-from-string "\"\\u7F85\\u751F\\u9580\"" read))))
- 
diff --git a/test-suite/tests/encoding-iso88591.test 
b/test-suite/tests/encoding-iso88591.test
index 44af345..3fa9d8e 100644
--- a/test-suite/tests/encoding-iso88591.test
+++ b/test-suite/tests/encoding-iso88591.test
@@ -35,43 +35,40 @@
 (define s3 "años")
 (define s4 "¿Cómo?")
 
-(with-test-prefix 
- "string length"
+(with-test-prefix "string length"
 
- (pass-if "última"
-         (eq? (string-length s1) 6))
+  (pass-if "última"
+          (eq? (string-length s1) 6))
     
- (pass-if "cédula"
-         (eq? (string-length s2) 6))
+  (pass-if "cédula"
+          (eq? (string-length s2) 6))
 
- (pass-if "años"
-         (eq? (string-length s3) 4))
+  (pass-if "años"
+          (eq? (string-length s3) 4))
 
- (pass-if "¿Cómo?"
-         (eq? (string-length s4) 6)))
+  (pass-if "¿Cómo?"
+          (eq? (string-length s4) 6)))
 
-(with-test-prefix
- "internal encoding"
+(with-test-prefix "internal encoding"
 
- (pass-if "última"
-         (string=? s1 (string-ints #xfa #x6c #x74 #x69 #x6d #x61)))
+  (pass-if "última"
+          (string=? s1 (string-ints #xfa #x6c #x74 #x69 #x6d #x61)))
 
- (pass-if "cédula"
-         (string=? s2 (string-ints #x63 #xe9 #x64 #x75 #x6c #x61)))
+  (pass-if "cédula"
+          (string=? s2 (string-ints #x63 #xe9 #x64 #x75 #x6c #x61)))
 
- (pass-if "años"
-         (string=? s3 (string-ints #x61 #xf1 #x6f #x73)))
+  (pass-if "años"
+          (string=? s3 (string-ints #x61 #xf1 #x6f #x73)))
  
- (pass-if "¿Cómo?"
-         (string=? s4 (string-ints #xbf #x43 #xf3 #x6d #x6f #x3f))))
+  (pass-if "¿Cómo?"
+          (string=? s4 (string-ints #xbf #x43 #xf3 #x6d #x6f #x3f))))
 
-(with-test-prefix
- "chars"
+(with-test-prefix "chars"
  
   (pass-if "última"
           (list= eqv? (string->list s1)
                  (list #\ú #\l #\t #\i #\m #\a)))
-
+  
   (pass-if "cédula"
           (list= eqv? (string->list s2)
                  (list #\c #\é #\d #\u #\l #\a)))
@@ -85,48 +82,44 @@
                  (list #\¿ #\C #\ó #\m #\o #\?))))
 
 ;; Check that the output is in ISO-8859-1 encoding
-(with-test-prefix
- "display"
+(with-test-prefix "display"
  
- (pass-if "s1"
-          (list= eqv? (list #xfa #x6c #x74 #x69 #x6d #x61)
-                 (map char->integer
-                      (string->list (with-output-to-string (lambda()
-                                                             (display s1)))))))
- (pass-if "s2"
-          (list= eqv? (list #x63 #xe9 #x64 #x75 #x6c #x61)
-                 (map char->integer
-                      (string->list (with-output-to-string (lambda()
-                                                             (display 
s2))))))))
-
-(with-test-prefix
- "symbols == strings"
-
- (pass-if "última"
-         (eq? (string->symbol s1) 'última))
-
- (pass-if "cédula"
-         (eq? (string->symbol s2) 'cédula))
-
- (pass-if "años"
-         (eq? (string->symbol s3) 'años))
+  (pass-if "s1"
+          (list= eqv? (list #xfa #x6c #x74 #x69 #x6d #x61)
+                 (map char->integer
+                      (string->list (with-output-to-string (lambda()
+                                                             (display s1)))))))
+  (pass-if "s2"
+          (list= eqv? (list #x63 #xe9 #x64 #x75 #x6c #x61)
+                 (map char->integer
+                      (string->list (with-output-to-string (lambda()
+                                                             (display 
s2))))))))
+
+(with-test-prefix "symbols == strings"
+
+  (pass-if "última"
+          (eq? (string->symbol s1) 'última))
+
+  (pass-if "cédula"
+          (eq? (string->symbol s2) 'cédula))
+
+  (pass-if "años"
+          (eq? (string->symbol s3) 'años))
  
- (pass-if "¿Cómo?"
-         (eq? (string->symbol s4) '¿Cómo?)))
+  (pass-if "¿Cómo?"
+          (eq? (string->symbol s4) '¿Cómo?)))
 
-(with-test-prefix
- "non-ascii variable names"
+(with-test-prefix "non-ascii variable names"
 
- (pass-if "1"
-         (let ((á 1)
-               (ñ 2))
-           (eq? (+ á ñ) 3))))
+  (pass-if "1"
+          (let ((á 1)
+                (ñ 2))
+            (eq? (+ á ñ) 3))))
 
 (set-conversion-error-behavior! 'error)
 
-(with-test-prefix
- "output errors"
+(with-test-prefix "output errors"
 
- (pass-if-exception "char 256"
-      exception:conversion
-      (with-output-to-string (lambda() (display (string-ints 256))))))
+  (pass-if-exception "char 256" exception:conversion
+                    (with-output-to-string 
+                      (lambda() (display (string-ints 256))))))
diff --git a/test-suite/tests/encoding-iso88597.test 
b/test-suite/tests/encoding-iso88597.test
index 8885c32..636a0c6 100644
--- a/test-suite/tests/encoding-iso88597.test
+++ b/test-suite/tests/encoding-iso88597.test
@@ -35,99 +35,92 @@
 (define s3 "êñéôéêÞò")
 (define s4 "êáé")
 
-(with-test-prefix 
- "string length"
+(with-test-prefix "string length"
 
- (pass-if "s1"
-         (eq? (string-length s1) 4))
-    
- (pass-if "s2"
-         (eq? (string-length s2) 3))
-
- (pass-if "s3"
-         (eq? (string-length s3) 8))
-
- (pass-if "s4" 
-         (eq? (string-length s4) 3)))
-
-(with-test-prefix
- "internal encoding"
-
- (pass-if "s1"
-         (string=? s1 (string-ints #x03a0 #x03b5 #x03c1 #x03af)))
+  (pass-if "s1"
+          (eq? (string-length s1) 4))
+  
+  (pass-if "s2"
+          (eq? (string-length s2) 3))
+  
+  (pass-if "s3"
+          (eq? (string-length s3) 8))
+  
+  (pass-if "s4" 
+          (eq? (string-length s4) 3)))
 
- (pass-if "s2"
-         (string=? s2 (string-ints #x03c4 #x03b7 #x03c2)))
+(with-test-prefix "internal encoding"
 
- (pass-if "s3"
-         (string=? s3 (string-ints #x03ba #x03c1 #x03b9 #x03c4 #x03b9 #x03ba 
#x03ae #x03c2)))
- 
- (pass-if "s4"
-         (string=? s4 (string-ints #x03ba #x03b1 #x03b9))))
+  (pass-if "s1"
+          (string=? s1 (string-ints #x03a0 #x03b5 #x03c1 #x03af)))
+  
+  (pass-if "s2"
+          (string=? s2 (string-ints #x03c4 #x03b7 #x03c2)))
+  
+  (pass-if "s3"
+          (string=? s3 (string-ints #x03ba #x03c1 #x03b9 #x03c4 #x03b9 #x03ba 
#x03ae #x03c2)))
+  
+  (pass-if "s4"
+          (string=? s4 (string-ints #x03ba #x03b1 #x03b9))))
 
-(with-test-prefix
- "chars"
+(with-test-prefix "chars"
  
   (pass-if "s1"
           (list= eqv? (string->list s1)
                  (list #\Ð #\å #\ñ #\ß)))
-
+  
   (pass-if "s2"
           (list= eqv? (string->list s2)
                  (list #\ô #\ç #\ò)))
-
+  
   (pass-if "s3"
           (list= eqv? (string->list s3)
                  (list #\ê #\ñ #\é #\ô #\é #\ê #\Þ #\ò)))
-
+  
   (pass-if "s4"
           (list= eqv? (string->list s4)
                  (list #\ê #\á #\é))))
 
 ;; Testing that the display of the string is output in the ISO-8859-7
 ;; encoding
-(with-test-prefix
- "display"
- 
- (pass-if "s1"
-         (list= eqv? 
-                (list #xd0 #xe5 #xf1 #xdf)
-                (u8vector->list (with-output-to-locale-u8vector (lambda() 
-                                                                  (display 
s1))))))
- (pass-if "s2"
-         (list= eqv? 
-                (list #xf4 #xe7 #xf2)
-                (u8vector->list (with-output-to-locale-u8vector (lambda() 
-                                                                  (display 
s2)))))))
-
-(with-test-prefix
- "symbols == strings"
-
- (pass-if "Ðåñß"
-         (eq? (string->symbol s1) 'Ðåñß))
-
- (pass-if "ôçò"
-         (eq? (string->symbol s2) 'ôçò))
-
- (pass-if "êñéôéêÞò"
-         (eq? (string->symbol s3) 'êñéôéêÞò))
+(with-test-prefix "display"
  
- (pass-if "êáé"
-         (eq? (string->symbol s4) 'êáé)))
+  (pass-if "s1"
+          (list= eqv? 
+                 (list #xd0 #xe5 #xf1 #xdf)
+                 (u8vector->list (with-output-to-locale-u8vector (lambda() 
+                                                                   (display 
s1))))))
+  (pass-if "s2"
+          (list= eqv? 
+                 (list #xf4 #xe7 #xf2)
+                 (u8vector->list (with-output-to-locale-u8vector (lambda() 
+                                                                   (display 
s2)))))))
+
+(with-test-prefix "symbols == strings"
+
+  (pass-if "Ðåñß"
+          (eq? (string->symbol s1) 'Ðåñß))
+
+  (pass-if "ôçò"
+          (eq? (string->symbol s2) 'ôçò))
+  
+  (pass-if "êñéôéêÞò"
+          (eq? (string->symbol s3) 'êñéôéêÞò))
+  
+  (pass-if "êáé"
+          (eq? (string->symbol s4) 'êáé)))
 
-(with-test-prefix
- "non-ascii variable names"
+(with-test-prefix "non-ascii variable names"
 
- (pass-if "1"
-         (let ((á 1)
-               (ñ 2))
-           (eq? (+ á ñ) 3))))
+  (pass-if "1"
+          (let ((á 1)
+                (ñ 2))
+            (eq? (+ á ñ) 3))))
 
 (set-conversion-error-behavior! 'error)
 
-(with-test-prefix
- "output errors"
+(with-test-prefix "output errors"
 
- (pass-if-exception "char #x0400"
-      exception:conversion
-      (with-output-to-string (lambda() (display (string-ints #x0400))))))
\ No newline at end of file
+  (pass-if-exception "char #x0400"
+                    exception:conversion
+                    (with-output-to-string (lambda() (display (string-ints 
#x0400))))))
diff --git a/test-suite/tests/encoding-utf8.test 
b/test-suite/tests/encoding-utf8.test
index 2189061..efa3728 100644
--- a/test-suite/tests/encoding-utf8.test
+++ b/test-suite/tests/encoding-utf8.test
@@ -35,38 +35,35 @@
 (define s3 "años")
 (define s4 "羅生門")
 
-(with-test-prefix 
- "string length"
+(with-test-prefix "string length"
 
- (pass-if "última"
-         (eq? (string-length s1) 6))
+  (pass-if "última"
+          (eq? (string-length s1) 6))
     
- (pass-if "cédula"
-         (eq? (string-length s2) 6))
+  (pass-if "cédula"
+          (eq? (string-length s2) 6))
 
- (pass-if "años"
-         (eq? (string-length s3) 4))
+  (pass-if "años"
+          (eq? (string-length s3) 4))
 
- (pass-if "羅生門"
-         (eq? (string-length s4) 3)))
+  (pass-if "羅生門"
+          (eq? (string-length s4) 3)))
 
-(with-test-prefix
- "internal encoding"
+(with-test-prefix "internal encoding"
 
- (pass-if "última"
-         (string=? s1 (string-ints #xfa #x6c #x74 #x69 #x6d #x61)))
+  (pass-if "última"
+          (string=? s1 (string-ints #xfa #x6c #x74 #x69 #x6d #x61)))
 
- (pass-if "cédula"
-         (string=? s2 (string-ints #x63 #xe9 #x64 #x75 #x6c #x61)))
+  (pass-if "cédula"
+          (string=? s2 (string-ints #x63 #xe9 #x64 #x75 #x6c #x61)))
 
- (pass-if "años"
-         (string=? s3 (string-ints #x61 #xf1 #x6f #x73)))
+  (pass-if "años"
+          (string=? s3 (string-ints #x61 #xf1 #x6f #x73)))
  
- (pass-if "羅生門"
-         (string=? s4 (string-ints #x7f85 #x751f #x9580))))
+  (pass-if "羅生門"
+          (string=? s4 (string-ints #x7f85 #x751f #x9580))))
 
-(with-test-prefix
- "chars"
+(with-test-prefix "chars"
  
   (pass-if "última"
           (list= eqv? (string->list s1)
@@ -85,41 +82,38 @@
                  (list #\羅 #\生 #\門))))
 
 ;; Check that the output is in UTF-8 encoding
-(with-test-prefix
- "display"
+(with-test-prefix "display"
  
- (pass-if "s1"
-          (list= eqv? 
-                (list #xc3 #xba #x6c #x74 #x69 #x6d #x61)
-                (u8vector->list (with-output-to-locale-u8vector (lambda()
-                                                                  (display 
s1))))))
+  (pass-if "s1"
+          (list= eqv? 
+                 (list #xc3 #xba #x6c #x74 #x69 #x6d #x61)
+                 (u8vector->list (with-output-to-locale-u8vector (lambda()
+                                                                   (display 
s1))))))
  (pass-if "s2"
           (list= eqv? 
                 (list #x63 #xc3 #xa9 #x64 #x75 #x6c #x61)
                 (u8vector->list (with-output-to-locale-u8vector (lambda()
                                                                   (display 
s2)))))))
 
-(with-test-prefix
- "symbols == strings"
+(with-test-prefix "symbols == strings"
 
- (pass-if "última"
-         (eq? (string->symbol s1) 'última))
+  (pass-if "última"
+          (eq? (string->symbol s1) 'última))
 
- (pass-if "cédula"
-         (eq? (string->symbol s2) 'cédula))
+  (pass-if "cédula"
+          (eq? (string->symbol s2) 'cédula))
 
- (pass-if "años"
-         (eq? (string->symbol s3) 'años))
+  (pass-if "años"
+          (eq? (string->symbol s3) 'años))
  
- (pass-if "羅生門"
-         (eq? (string->symbol s4) '羅生門)))
+  (pass-if "羅生門"
+          (eq? (string->symbol s4) '羅生門)))
 
-(with-test-prefix
- "non-ascii variable names"
+(with-test-prefix "non-ascii variable names"
 
- (pass-if "1"
-         (let ((芥川龍之介  1)
-               (ñ 2))
-           (eq? (+  芥川龍之介 ñ) 3))))
+  (pass-if "1"
+          (let ((芥川龍之介  1)
+                (ñ 2))
+            (eq? (+  芥川龍之介 ñ) 3))))
 
 


hooks/post-receive
-- 
GNU Guile




reply via email to

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