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
85dc21ea
Commit
85dc21ea
authored
Feb 07, 2005
by
pfdietz
Browse files
Add another single-escape test, for escape inside strings
parent
862b7663
Changes
1
Hide whitespace changes
Inline
Side-by-side
ansi-tests/set-syntax-from-char.lsp
View file @
85dc21ea
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
((or string symbol) (name-char (string c)))
((or string symbol) (name-char (string c)))
(t nil)))
(t nil)))
(when c
(when c
(format t "~A ~A~%" c (char-name c))
;;
(format t "~A ~A~%" c (char-name c))
`(def-set-syntax-from-char-test
`(def-set-syntax-from-char-test
,(intern (concatenate 'string "SET-SYNTAX-FROM-CHAR-TRAIT-X-" (or (char-name c)
,(intern (concatenate 'string "SET-SYNTAX-FROM-CHAR-TRAIT-X-" (or (char-name c)
(string c)))
(string c)))
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
;;; Turning characters into single escape characters
;;; Turning characters into single escape characters
(deftest set-syntax-from-char.single-escape
(deftest set-syntax-from-char.single-escape
.1
(loop for c across +standard-chars+
(loop for c across +standard-chars+
nconc
nconc
(with-standard-io-syntax
(with-standard-io-syntax
...
@@ -80,6 +80,23 @@
...
@@ -80,6 +80,23 @@
(list (list c results)))))))
(list (list c results)))))))
nil)
nil)
(deftest set-syntax-from-char.single-escape.2
(loop for c across +standard-chars+
unless (eql c #\")
nconc
(with-standard-io-syntax
(let ((*readtable* (copy-readtable nil))
(*package* (find-package "CL-TEST")))
(let ((results
(list
(set-syntax-from-char c #\\)
(read-from-string (concatenate 'string
(list #\" c #\" #\"))))))
(unless (equal results '(t "\""))
(list (list c results)))))))
nil)
(deftest set-syntax-from-char.multiple-escape
(deftest set-syntax-from-char.multiple-escape
(loop for c across +standard-chars+
(loop for c across +standard-chars+
nconc
nconc
...
@@ -454,5 +471,3 @@
...
@@ -454,5 +471,3 @@
(list (list c results)))
(list (list c results)))
)))
)))
nil)
nil)
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