Commit ebe3124f authored by pfdietz's avatar pfdietz

Begin tests of pprint-indent inside pprint-logical-block forms

parent b508d41b
......@@ -6,42 +6,42 @@
(in-package :cl-test)
(deftest pprint-indent.1
(my-with-standard-io-syntax
(with-standard-io-syntax
(let ((*print-pretty* nil))
(with-open-stream (*standard-output* (make-string-output-stream))
(pprint-indent :block 0))))
nil)
(deftest pprint-indent.2
(my-with-standard-io-syntax
(with-standard-io-syntax
(let ((*print-pretty* nil))
(with-open-stream (*standard-output* (make-broadcast-stream))
(pprint-indent :current 0))))
nil)
(deftest pprint-indent.3
(my-with-standard-io-syntax
(with-standard-io-syntax
(let ((*print-pretty* nil))
(with-open-stream (s (make-string-output-stream))
(pprint-indent :current 10 s))))
nil)
(deftest pprint-indent.4
(my-with-standard-io-syntax
(with-standard-io-syntax
(let ((*print-pretty* nil))
(with-open-stream (s (make-string-output-stream))
(pprint-indent :block 1/2 s))))
nil)
(deftest pprint-indent.5
(my-with-standard-io-syntax
(with-standard-io-syntax
(let ((*print-pretty* nil))
(with-open-stream (s (make-string-output-stream))
(pprint-indent :block 0.1 s))))
nil)
(deftest pprint-indent.6
(my-with-standard-io-syntax
(with-standard-io-syntax
(let ((*print-pretty* nil))
(loop for x in '(1.0s0 1.0f0 1.0d0 1.0l0)
unless
......@@ -54,14 +54,14 @@
nil)
(deftest pprint-indent.7
(my-with-standard-io-syntax
(with-standard-io-syntax
(let ((*print-pretty* nil))
(with-open-stream (*standard-output* (make-broadcast-stream))
(pprint-indent :current 0 nil))))
nil)
(deftest pprint-indent.8
(my-with-standard-io-syntax
(with-standard-io-syntax
(let ((*print-pretty* nil))
(with-open-stream
(os (make-string-output-stream))
......@@ -71,4 +71,47 @@
(pprint-indent :current 0 t))))))
nil)
;;; Now test with pprint-logical-block
(deftest pprint-indent.9
(with-standard-io-syntax
(let ((*print-pretty* t)
(*print-readably* nil)
(*print-right-margin* 100)
(*print-escape* nil)
(*print-case* :upcase)
(*print-miser-width* nil)
(*print-circle* nil))
(with-output-to-string
(os)
(pprint-logical-block
(os '(|M| |M|))
(write '|M| :stream os)
(pprint-indent :current 3 os)
(pprint-newline :mandatory os)
(write '|M| :stream os)))))
"M
M")
(deftest pprint-indent.10
(with-standard-io-syntax
(let ((*print-pretty* t)
(*print-readably* nil)
(*print-right-margin* 100)
(*print-escape* nil)
(*print-case* :upcase)
(*print-miser-width* nil)
(*print-circle* nil))
(with-output-to-string
(os)
(pprint-logical-block
(os '(|M| |M|) :prefix "(" :suffix ")")
(write '|M| :stream os)
(pprint-indent :current 1 os)
(pprint-newline :mandatory os)
(write '|M| :stream os)))))
"(M
M)")
\ No newline at end of file
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