Skip to content
Snippets Groups Projects
Commit c3f81f85 authored by pfdietz's avatar pfdietz
Browse files

Load pprint-dispatch tests, add some pprint-fill tests

parent ad53c44a
No related branches found
No related tags found
No related merge requests found
......@@ -25,3 +25,5 @@
(load "print-pathname.lsp")
(load "print-structure.lsp")
(load "printer-control-vars.lsp")
(load "pprint-dispatch.lsp")
(load "pprint-fill.lsp")
\ No newline at end of file
......@@ -31,7 +31,7 @@ random-test:
clean:
@rm -f test.out *.cls *.fasl *.o *.so *~ *.fn *.x86f *.fasl *.ufsl *.abcl *.fas *.lib \#*\#
@rm -rf scratch/
@rm -f foo.txt foo.lsp file-that-was-renamed.txt tmp.dat temp.dat
@rm -f foo.txt foo.lsp file-that-was-renamed.txt tmp.dat tmp2.dat temp.dat
@rm -f gazonk*
@rm -rf TMP/
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Fri Jun 25 22:03:01 2004
;;;; Contains: Tests of PPRINT-FILL
(in-package :cl-test)
;;; When printing a non-list, the result is the same as calling WRITE."
(deftest pprint-fill.1
(my-with-standard-io-syntax
(let ((*print-pretty* t)
(*print-readably* nil))
(loop for obj in *mini-universe*
nconc
(and (not (listp obj))
(let ((s1 (write-to-string obj))
(s2 (with-output-to-string (s) (assert (null (pprint-fill s obj))))))
(unless (equal s1 s2)
(list (list obj s1 s2))))))))
nil)
(deftest pprint-fill.2
(my-with-standard-io-syntax
(let ((*print-pretty* nil)
(*print-readably* nil))
(loop for obj in *mini-universe*
nconc
(and (not (listp obj))
(let ((s1 (write-to-string obj))
(s2 (with-output-to-string (s) (assert (null (pprint-fill s obj))))))
(unless (equal s1 s2)
(list (list obj s1 s2))))))))
nil)
(deftest pprint-fill.3
(my-with-standard-io-syntax
(let ((*print-pretty* nil)
(*print-readably* nil)
(*print-right-margin* 100))
(with-output-to-string
(s)
(assert (null (pprint-fill s '(cl-user::|A|)))))))
"(A)")
(deftest pprint-fill.4
(my-with-standard-io-syntax
(let ((*print-pretty* nil)
(*print-readably* nil)
(*print-right-margin* 100))
(with-output-to-string
(s)
(assert (null (pprint-fill s '(cl-user::|A|) t))))))
"(A)")
(deftest pprint-fill.5
(my-with-standard-io-syntax
(let ((*print-pretty* nil)
(*print-readably* nil)
(*print-right-margin* 100))
(with-output-to-string
(s)
(assert (null (pprint-fill s '(cl-user::|A|) nil))))))
"A")
(deftest pprint-fill.6
(my-with-standard-io-syntax
(let ((*print-pretty* nil)
(*print-readably* nil)
(*print-right-margin* 100))
(with-output-to-string
(s)
(assert (null (pprint-fill s '(1 2 3 4 5)))))))
"(1 2 3 4 5)")
(deftest pprint-fill.7
(my-with-standard-io-syntax
(let ((*print-pretty* nil)
(*print-readably* nil)
(*print-right-margin* 100))
(with-output-to-string
(s)
(assert (null (pprint-fill s '((1) (2) #(3) "abc" 5) nil))))))
"(1) (2) #(3) \"abc\" 5")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment