source: trunk/source/tests/ansi-tests/pprint.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: 885 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sun Jul 25 11:42:48 2004
4;;;; Contains: Tests of PPRINT
5
6(in-package :cl-test)
7
8(compile-and-load "printer-aux.lsp")
9
10;;; This function is mostly tested elsewhere
11
12(deftest pprint.1
13  (random-pprint-test 1000)
14  nil)
15
16(deftest pprint.2
17  (with-standard-io-syntax
18   (with-output-to-string
19     (os)
20     (with-input-from-string
21      (is "")
22      (with-open-stream (*terminal-io* (make-two-way-stream is os))
23                        (pprint 2 t)))))
24  "
252")
26
27(deftest pprint.3
28  (with-standard-io-syntax
29   (with-output-to-string
30     (*standard-output*)
31     (pprint 3 nil)))
32  "
333")
34
35;;; Error tests
36
37(deftest pprint.error.1
38  (signals-error
39   (with-output-to-string (*standard-output*) (pprint))
40   program-error)
41  t)
42
43(deftest pprint.error.2
44  (signals-error
45   (with-output-to-string (s) (pprint nil s nil))
46   program-error)
47  t)
48
49
Note: See TracBrowser for help on using the repository browser.