[rucksack-cvs] CVS rucksack/tests

CVS User alemmens alemmens at common-lisp.net
Mon Jun 20 17:22:22 UTC 2011


Update of /project/rucksack/cvsroot/rucksack/tests
In directory common-lisp.net:/tmp/cvs-serv17138/tests

Modified Files:
	test.lisp 
Log Message:
Don't assume that non-simple strings always have fill-pointers when  serializing. Thanks to pixel at kepibu.org.

--- /project/rucksack/cvsroot/rucksack/tests/test.lisp	2008/02/11 12:47:53	1.2
+++ /project/rucksack/cvsroot/rucksack/tests/test.lisp	2011/06/20 17:22:22	1.3
@@ -1,4 +1,4 @@
-;; $Id: test.lisp,v 1.2 2008/02/11 12:47:53 alemmens Exp $
+;; $Id: test.lisp,v 1.3 2011/06/20 17:22:22 alemmens Exp $
 
 (in-package :rucksack-test)
 
@@ -42,6 +42,14 @@
 
   (test (not (current-rucksack)))
 
+  ;; Non-simple strings without fill-pointers should be serialized without any problems.
+  (let ((str (make-array '(0)
+                         :element-type 'character
+                         :adjustable t
+                         :fill-pointer nil)))
+    (p-test (p-list str)
+            (equal "" (p-car it))))
+  
   ;;
   ;; P-CONS, P-CAR, P-CDR, P-LIST, P-MAKE-ARRAY, P-AREF
   ;;
@@ -59,7 +67,6 @@
 	  (equal '(a b)
 	       (list (p-aref it 0) (p-aref it 1))))
 
-
   ;;
   ;; Persistent-objects
   ;;





More information about the rucksack-cvs mailing list