guile-cvs
[Top][All Lists]
Advanced

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

guile/guile-core/test-suite ChangeLog tests/srf...


From: Martin Grabmueller
Subject: guile/guile-core/test-suite ChangeLog tests/srf...
Date: Mon, 07 May 2001 23:04:15 -0700

CVSROOT:        /cvs
Module name:    guile
Changes by:     Martin Grabmueller <address@hidden>     01/05/07 23:04:15

Modified files:
        guile-core/test-suite: ChangeLog 
        guile-core/test-suite/tests: srfi-13.test 

Log message:
        * tests/srfi-13.test: Added module access kludge, and uncommented
        some tests depending on this.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/test-suite/ChangeLog.diff?cvsroot=OldCVS&tr1=1.77&tr2=1.78&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/test-suite/tests/srfi-13.test.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: guile/guile-core/test-suite/ChangeLog
diff -u guile/guile-core/test-suite/ChangeLog:1.77 
guile/guile-core/test-suite/ChangeLog:1.78
--- guile/guile-core/test-suite/ChangeLog:1.77  Mon May  7 14:52:25 2001
+++ guile/guile-core/test-suite/ChangeLog       Mon May  7 23:04:15 2001
@@ -1,3 +1,8 @@
+2001-05-08  Martin Grabmueller  <address@hidden>
+
+       * tests/srfi-13.test: Added module access kludge, and uncommented
+       some tests depending on this.
+
 2001-05-07  Martin Grabmueller  <address@hidden>
 
        * tests/srfi-13.test: New file testing the SRFI string library.
Index: guile/guile-core/test-suite/tests/srfi-13.test
diff -u guile/guile-core/test-suite/tests/srfi-13.test:1.1 
guile/guile-core/test-suite/tests/srfi-13.test:1.2
--- guile/guile-core/test-suite/tests/srfi-13.test:1.1  Mon May  7 14:52:25 2001
+++ guile/guile-core/test-suite/tests/srfi-13.test      Mon May  7 23:04:15 2001
@@ -20,6 +20,11 @@
 
 (use-modules (srfi srfi-13))
 
+;;; This kludge is needed, because SRFI-13 redefines some bindings in
+;;; the core.
+(define (module-peek module-name sym)
+  (variable-ref (module-variable (resolve-module module-name) sym)))
+
 (define exception:strict-infix-grammar
   (cons 'misc-error "^strict-infix"))
 
@@ -90,6 +95,7 @@
     (string=? (string-tabulate
               (lambda (idx) (integer->char (+ idx 32))) 10) " !\"#$%&'()")))
 
+(define string->list (module-peek '(srfi srfi-13) 'string->list))
 
 (with-test-prefix "string->list"
 
@@ -99,13 +105,11 @@
   (pass-if "nonempty"
      (= (length (string->list "foo")) 3))
 
-;;; FIXME: These do not work, because the standard definition is used,
-;;; apparently.
-;   (pass-if "empty, start index"
-;      (zero? (length (string->list "foo" 3 3))))
+  (pass-if "empty, start index"
+     (zero? (length (string->list "foo" 3 3))))
 
-;   (pass-if "nonempty, start index"
-;      (= (length (string->list "foo" 2)) 1 3))
+   (pass-if "nonempty, start index"
+     (= (length (string->list "foo" 1 3)) 2))
   )
 
 (with-test-prefix "reverse-list->string"
@@ -196,6 +200,7 @@
      (string=? "foo|delim|bar|delim|" (string-join '("foo" "bar") "|delim|"
                                                   'suffix))))
 
+(define string-copy (module-peek '(srfi srfi-13) 'string-copy))
 
 (with-test-prefix "string-copy"
 
@@ -205,13 +210,11 @@
   (pass-if "full string"
     (string=? "foo-bar" (string-copy "foo-bar")))
 
-;;; FIXME: These do not work, because the standard definition is used,
-;;; apparently.
-;   (pass-if "start index"
-;     (string=? "o-bar" (string-copy "foo-bar" 2)))
+  (pass-if "start index"
+    (string=? "o-bar" (string-copy "foo-bar" 2)))
 
-;   (pass-if "start and end index"
-;     (string=? "o-ba" (string-copy "foo-bar" 2 6)))
+  (pass-if "start and end index"
+    (string=? "o-ba" (string-copy "foo-bar" 2 6)))
 )
 
 (with-test-prefix "substring/shared"



reply via email to

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