Commit 289dedec authored by pfdietz's avatar pfdietz

Add with-standard-io-syntax wrappers to tests for copy-pprint-dispatch

parent 274efd95
......@@ -6,73 +6,77 @@
(in-package :cl-test)
(deftest copy-pprint-dispatch.1
(let ((obj '(foo bar))
(*package* (find-package :cl-test))
(*print-pretty* t))
(values
(prin1-to-string obj)
(let ((*print-pprint-dispatch* (copy-pprint-dispatch)))
(set-pprint-dispatch
`(eql ,obj)
#'(lambda (s obj2) (let ((*print-pretty* nil))
(format s "#.'~S" obj2))))
(prin1-to-string obj))
(prin1-to-string obj)))
(with-standard-io-syntax
(let ((obj '(foo bar))
(*package* (find-package :cl-test))
(*print-pretty* t))
(values
(prin1-to-string obj)
(let ((*print-pprint-dispatch* (copy-pprint-dispatch)))
(set-pprint-dispatch
`(eql ,obj)
#'(lambda (s obj2) (let ((*print-pretty* nil))
(format s "#.'~S" obj2))))
(prin1-to-string obj))
(prin1-to-string obj))))
"(FOO BAR)"
"#.'(FOO BAR)"
"(FOO BAR)")
(deftest copy-pprint-dispatch.2
(let ((obj '(foo bar))
(*package* (find-package :cl-test))
(*print-pretty* t))
(values
(prin1-to-string obj)
(let ((*print-pprint-dispatch* (copy-pprint-dispatch
*print-pprint-dispatch*)))
(set-pprint-dispatch
`(eql ,obj)
#'(lambda (s obj2) (let ((*print-pretty* nil))
(format s "#.'~S" obj2))))
(prin1-to-string obj))
(prin1-to-string obj)))
(with-standard-io-syntax
(let ((obj '(foo bar))
(*package* (find-package :cl-test))
(*print-pretty* t))
(values
(prin1-to-string obj)
(let ((*print-pprint-dispatch* (copy-pprint-dispatch
*print-pprint-dispatch*)))
(set-pprint-dispatch
`(eql ,obj)
#'(lambda (s obj2) (let ((*print-pretty* nil))
(format s "#.'~S" obj2))))
(prin1-to-string obj))
(prin1-to-string obj))))
"(FOO BAR)"
"#.'(FOO BAR)"
"(FOO BAR)")
(deftest copy-pprint-dispatch.3
(let ((obj '(foo bar))
(*package* (find-package :cl-test))
(*print-pretty* t))
(values
(prin1-to-string obj)
(let ((*print-pprint-dispatch* (copy-pprint-dispatch nil)))
(set-pprint-dispatch
`(eql ,obj)
#'(lambda (s obj2) (let ((*print-pretty* nil))
(format s "#.'~S" obj2))))
(prin1-to-string obj))
(prin1-to-string obj)))
(with-standard-io-syntax
(let ((obj '(foo bar))
(*package* (find-package :cl-test))
(*print-pretty* t))
(values
(prin1-to-string obj)
(let ((*print-pprint-dispatch* (copy-pprint-dispatch nil)))
(set-pprint-dispatch
`(eql ,obj)
#'(lambda (s obj2) (let ((*print-pretty* nil))
(format s "#.'~S" obj2))))
(prin1-to-string obj))
(prin1-to-string obj))))
"(FOO BAR)"
"#.'(FOO BAR)"
"(FOO BAR)")
(deftest copy-pprint-dispatch.4
(let ((obj '(foo bar))
(*package* (find-package :cl-test))
(*print-pretty* t))
(values
(prin1-to-string obj)
(let ((table (copy-pprint-dispatch)))
(set-pprint-dispatch
`(eql ,obj)
#'(lambda (s obj2) (let ((*print-pretty* nil))
(format s "#.'~S" obj2)))
0
table)
(let ((*print-pprint-dispatch* (copy-pprint-dispatch table)))
(prin1-to-string obj)))
(prin1-to-string obj)))
(with-standard-io-syntax
(let ((obj '(foo bar))
(*package* (find-package :cl-test))
(*print-pretty* t))
(values
(prin1-to-string obj)
(let ((table (copy-pprint-dispatch)))
(set-pprint-dispatch
`(eql ,obj)
#'(lambda (s obj2) (let ((*print-pretty* nil))
(format s "#.'~S" obj2)))
0
table)
(let ((*print-pprint-dispatch* (copy-pprint-dispatch table)))
(prin1-to-string obj)))
(prin1-to-string obj))))
"(FOO BAR)"
"#.'(FOO BAR)"
"(FOO BAR)")
......
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