X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.pure.lisp;h=ecea1bdf382e7277ababfcd3896ee6a5a8503cb0;hb=f2db6743b1fadeea9e72cb583d857851c87efcd4;hp=34ae4a87025dad6d8be68a7d06991c3d8817a5c7;hpb=3d9b54df5e825dfb1f458d91d2bb09877f4348b2;p=sbcl.git diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 34ae4a8..ecea1bd 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -3331,3 +3331,19 @@ (declare (optimize speed safety)) (setf (slot-value x 'bar) y)))) (assert (= 1 notes)))) + +(with-test (:name :concatenate-string-opt) + (flet ((test (type grep) + (let* ((fun (compile nil `(lambda (a b c d e) + (concatenate ',type a b c d e)))) + (args '("foo" #(#\.) "bar" (#\-) "quux")) + (res (apply fun args))) + (assert (search grep (with-output-to-string (out) + (disassemble fun :stream out)))) + (assert (equal (apply #'concatenate type args) + res)) + (assert (typep res type))))) + (test 'string "%CONCATENATE-TO-STRING") + (test 'simple-string "%CONCATENATE-TO-STRING") + (test 'base-string "%CONCATENATE-TO-BASE-STRING") + (test 'simple-base-string "%CONCATENATE-TO-BASE-STRING")))