Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
ansi-test
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Karsten Poeck
ansi-test
Commits
93a6891b
Commit
93a6891b
authored
Dec 08, 2004
by
pfdietz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More formatter tests for ~( and ~p
parent
d0225ecd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
3 deletions
+57
-3
ansi-tests/format-p.lsp
ansi-tests/format-p.lsp
+16
-0
ansi-tests/format-paren.lsp
ansi-tests/format-paren.lsp
+41
-3
No files found.
ansi-tests/format-p.lsp
View file @
93a6891b
...
...
@@ -26,6 +26,14 @@
collect (list x s))
nil)
(deftest formatter.p.5
(let ((fn (formatter "~p")))
(loop for x in *universe*
for s = (formatter-call-to-string fn x)
unless (or (eql x 1) (string= s "s"))
collect (list x s)))
nil)
;;; :p
(def-format-test format.p.6
...
...
@@ -74,3 +82,11 @@
unless (or (eql x 1) (string= s "ies"))
collect (list x s))
nil)
(deftest formatter.p.18
(let ((fn (formatter "~@P")))
(loop for x in *universe*
for s = (formatter-call-to-string fn x)
unless (or (eql x 1) (string= s "ies"))
collect (list x s)))
nil)
ansi-tests/format-paren.lsp
View file @
93a6891b
...
...
@@ -7,9 +7,8 @@
(compile-and-load "printer-aux.lsp")
(deftest format.paren.1
(format nil "~(XXyy~AuuVV~)" "ABc dEF ghI")
"xxyyabc def ghiuuvv")
(def-format-test format.paren.1
"~(XXyy~AuuVV~)" ("ABc dEF ghI") "xxyyabc def ghiuuvv")
;;; Conversion of simple characters to downcase
(deftest format.paren.2
...
...
@@ -30,6 +29,26 @@
collect it)
nil)
(deftest formatter.paren.2
(let ((fn (formatter "~(~c~)")))
(loop for i from 0 below (min char-code-limit (ash 1 16))
for c = (code-char i)
when (and c
(eql (char-code c) (char-int c))
(upper-case-p c)
(let ((s1 (formatter-call-to-string fn c))
(s2 (string (char-downcase c))))
(if
(or (not (eql (length s1) 1))
(not (eql (length s2) 1))
(not (eql (elt s1 0)
(elt s2 0))))
(list i c s1 s2)
nil)))
collect it))
nil)
(def-format-test format.paren.3
"~@(this is a TEST.~)" nil "This is a test.")
...
...
@@ -63,6 +82,25 @@
collect it)
nil)
(deftest formatter.paren.8
(let ((fn (formatter "~@:(~c~)")))
(loop for i from 0 below (min char-code-limit (ash 1 16))
for c = (code-char i)
when (and c
(eql (char-code c) (char-int c))
(lower-case-p c)
(let ((s1 (formatter-call-to-string fn c))
(s2 (string (char-upcase c))))
(if
(or (not (eql (length s1) 1))
(not (eql (length s2) 1))
(not (eql (elt s1 0)
(elt s2 0))))
(list i c s1 s2)
nil)))
collect it))
nil)
;;; Nested conversion
(def-format-test format.paren.9
...
...
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