X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fexternal-format.impure.lisp;h=845214db2d0763ad80caa351d878173cb0f8157c;hb=134fa6b3f7c5f4bb0652e74227d940a9e7a83563;hp=430078ba5961b88a716d57b62d5b67f6777d8b41;hpb=54b330585ed41edeb93a289f0e59aec67fa9ded9;p=sbcl.git diff --git a/tests/external-format.impure.lisp b/tests/external-format.impure.lisp index 430078b..845214d 100644 --- a/tests/external-format.impure.lisp +++ b/tests/external-format.impure.lisp @@ -35,7 +35,9 @@ (with-open-file (s "external-format-test.txt" :direction :input :external-format xf) (loop for character across standard-characters - do (assert (eql (read-char s) character)))))) + do (let ((got (read-char s))) + (unless (eql character got) + (error "wanted ~S, got ~S" character got))))))) (delete-file "external-format-test.txt") #-sb-unicode @@ -53,14 +55,16 @@ :if-exists :supersede :external-format :utf-8) (dotimes (n offset) (write-char #\a s)) - (dotimes (n 4097) + (dotimes (n (+ 4 sb-impl::+bytes-per-buffer+)) (write-char character s))) (with-open-file (s "external-format-test.txt" :direction :input :external-format :utf-8) (dotimes (n offset) (assert (eql (read-char s) #\a))) - (dotimes (n 4097) - (assert (eql (read-char s) character))) + (dotimes (n (+ 4 sb-impl::+bytes-per-buffer+)) + (let ((got (read-char s))) + (unless (eql got character) + (error "wanted ~S, got ~S (~S)" character got n)))) (assert (eql (read-char s nil s) s)))))) ;;; Test character decode restarts.