X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Foctets.pure.lisp;h=c07b82bba6435f33abd3b611a17f2921742208ed;hb=f2db6743b1fadeea9e72cb583d857851c87efcd4;hp=166d01b4bc65fc1d1f41d21b7495b51dbc75e321;hpb=d8ad375f27c0006f8896047686a065b8243c7e0f;p=sbcl.git diff --git a/tests/octets.pure.lisp b/tests/octets.pure.lisp index 166d01b..c07b82b 100644 --- a/tests/octets.pure.lisp +++ b/tests/octets.pure.lisp @@ -220,6 +220,13 @@ ) -;; regression test: STRING->UTF8 didn't properly handle a non-zero -;; START argument. +;;; regression test: STRING->UTF8 didn't properly handle a non-zero +;;; START argument. (assert (equalp #(50) (string-to-octets "42" :start 1 :external-format :utf-8))) + +;;; STRING->UTF8 should cope with NIL strings if a null range is required +(assert (equalp #() (string-to-octets "" :external-format :utf-8))) +(assert (equalp #() (string-to-octets (make-array 0 :element-type nil) + :external-format :utf-8))) +(assert (equalp #() (string-to-octets (make-array 5 :element-type nil) + :start 3 :end 3 :external-format :utf-8)))