1 ;;;; This file is for testing bivalent stream functionality, using
2 ;;;; test machinery which might have side effects (e.g. executing
3 ;;;; DEFUN, writing files). Note that the tests here might reach into
4 ;;;; unexported functionality, and should not be used as a guide for
7 ;;;; This software is part of the SBCL system. See the README file for
10 ;;;; While most of SBCL is derived from the CMU CL system, the test
11 ;;;; files (like this one) were written from scratch after the fork
14 ;;;; This software is in the public domain and is provided with
15 ;;;; absolutely no warranty. See the COPYING and CREDITS files for
16 ;;;; more information.
18 ;;; Test character decode restarts.
19 (with-open-file (s "bivalent-stream-test.txt" :direction
:output
21 :element-type
:default
:external-format
:utf-8
)
27 (with-open-file (s "bivalent-stream-test.txt" :direction
:input
28 :element-type
:default
29 :external-format
:utf-8
)
30 (assert (eql (read-char s nil s
) #\A
))
31 (assert (eql (read-byte s nil s
) 66))
32 (assert (eql (read-byte s nil s
) #xe0
))
33 (assert (eql (read-char s nil s
) #\C
)))
35 (delete-file "bivalent-stream-test.txt")