Some string tests
authorDavid Vázquez <davazp@gmail.com>
Fri, 3 May 2013 11:22:40 +0000 (12:22 +0100)
committerDavid Vázquez <davazp@gmail.com>
Fri, 3 May 2013 11:22:40 +0000 (12:22 +0100)
src/string.lisp
tests/strings.lisp

index 1aa09ac..04aa7f1 100644 (file)
@@ -29,8 +29,8 @@
   (let ((g!string (gensym))
         (g!index (gensym))
         (g!value (gensym)))
-    (list (list g!string g!index)
-          (list string index)
-          (list g!value)
-          `(aset ,g!string ,g!index ,g!value)
-          `(char ,g!string ,g!index))))
+    (values (list g!string g!index)
+            (list string index)
+            (list g!value)
+            `(aset ,g!string ,g!index ,g!value)
+            `(char ,g!string ,g!index))))
index 4c5fe15..e955d34 100644 (file)
@@ -16,3 +16,8 @@
 (test (string= "foo" "foo"))
 (test (not (string= "Foo" "foo")))
 (test (not (string= "foo" "foox")))
+
+(let ((str "hello"))
+  (setf (char str 0) #\X)
+  (setf (char str 4) #\X)
+  (test (string= str "XellX")))