source: trunk/source/tests/ansi-tests/format-goto.lsp @ 8991

Last change on this file since 8991 was 8991, checked in by gz, 12 years ago

Check in the gcl ansi test suite (original, in preparation for making local changes)

File size: 2.5 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Tue Aug 24 06:56:13 2004
4;;;; Contains: Tests of the ~* format directive
5
6(in-package :cl-test)
7
8(compile-and-load "printer-aux.lsp")
9
10;;; ~*
11
12(def-format-test format.*.1
13  "~A~*~A" (1 2 3) "13")
14
15(def-format-test format.*.2
16  "~A~0*~A" (1 2 3) "12" 1)
17
18(def-format-test format.*.3
19  "~A~v*~A" (1 0 2) "12")
20
21(def-format-test format.*.4
22  "~A~v*~A" (1 1 2 3) "13")
23
24(def-format-test format.*.5
25  "~A~v*~A" (1 nil 2 3) "13")
26
27(def-format-test format.*.6
28  "~A~1{~A~*~A~}~A" (0 '(1 2 3) 4) "0134")
29
30(def-format-test format.*.7
31  "~A~1{~A~0*~A~}~A" (0 '(1 2 3) 4) "0124")
32
33(def-format-test format.*.8
34  "~A~{~A~*~A~}~A" (0 '(1 2 3 4 5 6) 7) "013467")
35
36(def-format-test format.*.9
37  "~A~{~A~A~A~A~v*~^~A~A~A~A~}~A" (0 '(1 2 3 4 nil 6 7 8 9 #\A) 5)
38  "01234789A5")
39
40;;; ~:*
41
42(def-format-test format.\:*.1
43  "~A~:*~A" (1 2 3) "11" 2)
44
45(def-format-test format.\:*.2
46  "~A~A~:*~A" (1 2 3) "122" 1)
47
48(def-format-test format.\:*.3
49  "~A~A~0:*~A" (1 2 3) "123")
50
51(def-format-test format.\:*.4
52  "~A~A~2:*~A" (1 2 3) "121" 2)
53
54(def-format-test format.\:*.5
55  "~A~A~v:*~A" (1 2 0 3) "123")
56
57(def-format-test format.\:*.6
58  "~A~A~v:*~A" (6 7 2 3) "677" 2)
59
60(def-format-test format.\:*.7
61  "~A~A~v:*~A" (6 7 nil 3) "67NIL" 1)
62
63(def-format-test format.\:*.8
64  "~A~1{~A~:*~A~}~A" (0 '(1 2 3) 4) "0114")
65
66(def-format-test format.\:*.9
67  "~A~1{~A~A~A~:*~A~}~A" (0 '(1 2 3 4) 5) "012335")
68
69(def-format-test format.\:*.10
70  "~A~1{~A~A~A~2:*~A~A~}~A" (0 '(1 2 3 4) 5) "0123235")
71
72(def-format-test format.\:*.11
73  "~A~{~A~A~A~3:*~A~A~A~A~}~A" (0 '(1 2 3 4) 5) "012312345")
74
75(def-format-test format.\:*.12
76  "~A~{~A~A~A~A~4:*~^~A~A~A~A~}~A" (0 '(1 2 3 4) 5) "0123412345")
77
78(def-format-test format.\:*.13
79  "~A~{~A~A~A~A~v:*~^~A~}~A" (0 '(1 2 3 4 nil) 5) "01234NIL5")
80
81;;; ~@*
82
83(def-format-test format.@*.1
84  "~A~A~@*~A~A" (1 2 3 4) "1212" 2)
85
86(def-format-test format.@*.2
87  "~A~A~1@*~A~A" (1 2 3 4) "1223" 1)
88
89(def-format-test format.@*.3
90  "~A~A~2@*~A~A" (1 2 3 4) "1234")
91
92(def-format-test format.@*.4
93  "~A~A~3@*~A~A" (1 2 3 4 5) "1245")
94
95(def-format-test format.@*.5
96  "~A~A~v@*~A~A" (1 2 nil 3 4) "1212" 3)
97
98(def-format-test format.@*.6
99  "~A~A~v@*~A~A" (1 2 1 3 4) "1221" 2)
100
101(def-format-test format.@*.7
102  "~A~A~v@*~A~A" (6 7 2 3 4) "6723" 1)
103
104(def-format-test format.@*.8
105  "~A~{~A~A~@*~A~A~}~A" (0 '(1 2) 9) "012129")
106
107(def-format-test format.@*.9
108  "~A~{~A~A~0@*~A~A~}~A" (0 '(1 2) 9) "012129")
109
110(def-format-test format.@*.10
111  "~A~1{~A~A~v@*~A~A~}~A" (0 '(1 2 nil) 9) "012129")
112
113(def-format-test format.@*.11
114  "~A~{~A~A~1@*~A~}~A" (0 '(1 2) 9) "01229")
Note: See TracBrowser for help on using the repository browser.