From: David Vázquez Date: Fri, 3 May 2013 11:22:40 +0000 (+0100) Subject: Some string tests X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=d3b2f238844c7036711885c73c1d39812259b43b;p=jscl.git Some string tests --- diff --git a/src/string.lisp b/src/string.lisp index 1aa09ac..04aa7f1 100644 --- a/src/string.lisp +++ b/src/string.lisp @@ -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)))) diff --git a/tests/strings.lisp b/tests/strings.lisp index 4c5fe15..e955d34 100644 --- a/tests/strings.lisp +++ b/tests/strings.lisp @@ -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")))