From d3b2f238844c7036711885c73c1d39812259b43b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Fri, 3 May 2013 12:22:40 +0100 Subject: [PATCH] Some string tests --- src/string.lisp | 10 +++++----- tests/strings.lisp | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) 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"))) -- 1.7.10.4