|
[Sbcl-commits] CVS: sbcl/tests octets.pure.lisp,1.3,1.4
From: Christophe Rhodes <crhodes@us...> - 2009-08-22 15:54
|
Update of /cvsroot/sbcl/sbcl/tests In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20213/tests Modified Files: octets.pure.lisp Log Message: 1.0.30.48: utf-8 simple-array-nil correctness If an empty range of a simple-array-nil is requested for conversion, we should return an empty octet sequence, not blow up. Index: octets.pure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/octets.pure.lisp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- octets.pure.lisp 1 Dec 2008 15:28:35 -0000 1.3 +++ octets.pure.lisp 22 Aug 2009 15:54:46 -0000 1.4 @@ -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))) |
| Thread | Author | Date |
|---|---|---|
| [Sbcl-commits] CVS: sbcl/tests octets.pure.lisp,1.3,1.4 | Christophe Rhodes <crhodes@us...> |