/[gcl]/gcl/ansi-tests/set-syntax-from-char.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/set-syntax-from-char.lsp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by pfdietz, Sun Jan 30 13:58:23 2005 UTC revision 1.4 by pfdietz, Sun Jan 30 14:08:48 2005 UTC
# Line 93  Line 93 
93                      (read-from-string (concatenate 'string (list c #\Z c)))                      (read-from-string (concatenate 'string (list c #\Z c)))
94                      (error (c) c))                      (error (c) c))
95                     (handler-case                     (handler-case
96                      (read-from-string (concatenate 'string (list c #\Z #\|)))                      (read-from-string (concatenate 'string (list c #\z #\|)))
97                      (error (c) c))                      (error (c) c))
98                     (handler-case                     (handler-case
99                      (read-from-string (concatenate 'string (list #\| #\Z c)))                      (read-from-string (concatenate 'string (list #\| #\Z c)))
100                      (error (c) c)))))                      (error (c) c)))))
101               (unless (or (eql c #\Z) (equal results '(t |Z| |Z| |Z|)))               (unless (or (eql c #\Z) (eql c #\z) (equal results '(t |Z| |z| |Z|)))
102                 (list c results))))))                 (list c results))))))
103    nil)    nil)
104    
   
                   
105    (deftest set-syntax-from-char.semicolon
106      (loop for c across +standard-chars+
107            nconc
108            (with-standard-io-syntax
109             (let ((*readtable* (copy-readtable nil))
110                   (*package* (find-package "CL-TEST"))
111                   (expected (if (eql c #\0) '1 '0))
112                   (c2 (if (eql c #\0) #\1 #\0)))
113               (let ((results
114                      (list
115                       (set-syntax-from-char c #\;)
116                       (handler-case
117                        (read-from-string (concatenate 'string (list c2 c #\2)))
118                        (error (c) c))
119                       (handler-case
120                        (read-from-string (concatenate 'string (list c2 c #\2 #\Newline #\3)))
121                        (error (c) c))
122                       (handler-case
123                        (read-from-string (concatenate 'string (list c #\2 #\Newline c2)))
124                        (error (c) c)))))
125                 (unless (equal results (list t expected expected expected))
126                   (list c results))))))
127      nil)
128                      

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26