Commit 834ce700 authored by Marius Gerbershagen's avatar Marius Gerbershagen

Move all error cases from CLHS 22.3.5.2 into format-justify.lsp

Having all of them at the same place makes them easier to find.
parent 5c4504cc
......@@ -277,3 +277,26 @@ X CCC")
(signals-error-always (format nil "~i~<X~:;Y~>") error)
t t)
;;; Interaction with ~:T
(deftest format.justify.error.\:t.1
(signals-error-always (format nil "~<XXX~1,1:TYYY~>") error)
t t)
(deftest format.justify.error.\:t.2
(signals-error-always (format nil "~<XXX~:;YYY~>ZZZ~4,5:tWWW") error)
t t)
(deftest format.justify.error.\:t.3
(signals-error-always (format nil "AAAA~1,1:TBBB~<XXX~:;YYY~>ZZZ") error)
t t)
;;; Interaction with ~<...~:>
(deftest format.justify.error.logical-block.1
(signals-error-always (format nil "~<~:;~>~<~:>" nil nil nil) error)
t t)
(deftest format.justify.error.logical-block.2
(signals-error-always (format nil "~<~:>~<~:;~>" nil nil nil) error)
t t)
......@@ -111,17 +111,6 @@
(signals-error-always (format nil "1~<X~<Y~:>Z~>2" nil nil nil) error)
t t)
;;; "an error is also signaled if the ~<...~:;...~> form of ~<...~> is used
;;; in the same format string with ~W, ~_, ~<...~:>, ~I, or ~:T."
(deftest format.logical-block.error.26
(signals-error-always (format nil "~<~:;~>~<~:>" nil nil nil) error)
t t)
(deftest format.logical-block.error.27
(signals-error-always (format nil "~<~:>~<~:;~>" nil nil nil) error)
t t)
;;; Non-error tests
(def-pprint-test format.logical-block.1
......
......@@ -261,20 +261,6 @@
collect (list n1 n2 inc s2 result))
nil)
;;; see 22.3.5.2
(deftest format.\:t.error.1
(signals-error-always (format nil "~<XXX~1,1:TYYY~>") error)
t t)
(deftest format.\:t.error.2
(signals-error-always (format nil "~<XXX~:;YYY~>ZZZ~4,5:tWWW") error)
t t)
(deftest format.\:t.error.3
(signals-error-always (format nil "AAAA~1,1:TBBB~<XXX~:;YYY~>ZZZ") error)
t t)
;;; ~:@t
(def-pprint-test format.\:@t.1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment