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
0a58110d
Commit
0a58110d
authored
Jul 04, 2005
by
pfdietz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change several tests so they only accumulate 10 results
parent
b2981971
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
7 deletions
+23
-7
ansi-tests/format-d.lsp
ansi-tests/format-d.lsp
+23
-7
No files found.
ansi-tests/format-d.lsp
View file @
0a58110d
...
...
@@ -104,11 +104,14 @@
(deftest format.d.4
(with-standard-io-syntax
(loop for x = (ash 1 (+ 2 (random 80)))
(loop with limit = 10
with count = 0
for x = (ash 1 (+ 2 (random 80)))
for mincol = (random 30)
for i = (- (random (+ x x)) x)
for s1 = (format nil "~@D" i)
for s2 = (format nil (format nil "~~~d@d" mincol) i)
for format-string = (format nil "~~~d@d" mincol)
for s2 = (format nil format-string i)
for pos = (search s1 s2)
repeat 1000
when (or (null pos)
...
...
@@ -117,12 +120,17 @@
(or (/= (length s2) mincol)
(not (eql (position #\Space s2 :test-not #'eql)
(- (length s2) (length s1)))))))
collect (list i mincol s1 s2 pos)))
collect (if (> (incf count) limit)
"Count limit exceeded"
(list i mincol s1 format-string s2 pos))
while (<= count limit)))
nil)
(deftest formatter.d.4
(with-standard-io-syntax
(loop for x = (ash 1 (+ 2 (random 80)))
(loop with limit = 10
with count = 0
for x = (ash 1 (+ 2 (random 80)))
for mincol = (random 30)
for i = (- (random (+ x x)) x)
for s1 = (format nil "~@D" i)
...
...
@@ -137,7 +145,10 @@
(or (/= (length s2) mincol)
(not (eql (position #\Space s2 :test-not #'eql)
(- (length s2) (length s1)))))))
collect (list i mincol s1 s2 pos)))
collect (if (> (incf count) limit)
"Count limit exceeded"
(list i mincol s1 s2 pos))
while (<= count limit)))
nil)
(deftest format.d.5
...
...
@@ -202,7 +213,9 @@
(deftest format.d.7
(let ((fn (formatter "~v,v@D")))
(with-standard-io-syntax
(loop for x = (ash 1 (+ 2 (random 80)))
(loop with limit = 10
with count = 0
for x = (ash 1 (+ 2 (random 80)))
for mincol = (random 30)
for padchar = (random-from-seq +standard-chars+)
for i = (- (random (+ x x)) x)
...
...
@@ -218,7 +231,10 @@
(or (/= (length s2) mincol)
(find padchar s2 :end (- (length s2) (length s1))
:test-not #'eql))))
collect (list i mincol s1 s2 pos))))
collect (if (> (incf count) limit)
"Count limit exceeded"
(list i mincol s1 s2 s3 pos))
while (<= count limit))))
nil)
;;; Comma tests
...
...
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