Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Karsten Poeck
ansi-test
Commits
f92d9011
Commit
f92d9011
authored
Jan 30, 2005
by
pfdietz
Browse files
Fix bug, add test of semicolon syntax transfer
parent
533210cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
ansi-tests/set-syntax-from-char.lsp
View file @
f92d9011
...
@@ -93,14 +93,36 @@
...
@@ -93,14 +93,36 @@
(read-from-string (concatenate 'string (list c #\Z c)))
(read-from-string (concatenate 'string (list c #\Z c)))
(error (c) c))
(error (c) c))
(handler-case
(handler-case
(read-from-string (concatenate 'string (list c #\
Z
#\|)))
(read-from-string (concatenate 'string (list c #\
z
#\|)))
(error (c) c))
(error (c) c))
(handler-case
(handler-case
(read-from-string (concatenate 'string (list #\| #\Z c)))
(read-from-string (concatenate 'string (list #\| #\Z c)))
(error (c) c)))))
(error (c) c)))))
(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|)))
(list c results))))))
(list c results))))))
nil)
nil)
(deftest set-syntax-from-char.semicolon
(loop for c across +standard-chars+
\ No newline at end of file
nconc
(with-standard-io-syntax
(let ((*readtable* (copy-readtable nil))
(*package* (find-package "CL-TEST"))
(expected (if (eql c #\0) '1 '0))
(c2 (if (eql c #\0) #\1 #\0)))
(let ((results
(list
(set-syntax-from-char c #\;)
(handler-case
(read-from-string (concatenate 'string (list c2 c #\2)))
(error (c) c))
(handler-case
(read-from-string (concatenate 'string (list c2 c #\2 #\Newline #\3)))
(error (c) c))
(handler-case
(read-from-string (concatenate 'string (list c #\2 #\Newline c2)))
(error (c) c)))))
(unless (equal results (list t expected expected expected))
(list c results))))))
nil)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment