source: trunk/source/tests/ansi-tests/prin1.lsp @ 8991

Last change on this file since 8991 was 8991, checked in by gz, 11 years ago

Check in the gcl ansi test suite (original, in preparation for making local changes)

File size: 870 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sun Jul 25 11:33:40 2004
4;;;; Contains: Tests of PRIN1
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 prin1.1
13  (random-prin1-test 1000)
14  nil)
15
16(deftest prin1.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                        (prin1 2 t)))))
24  "2")
25
26(deftest prin1.3
27  (with-standard-io-syntax
28   (with-output-to-string
29     (*standard-output*)
30     (prin1 3 nil)))
31  "3")
32
33;;; Error tests
34
35(deftest prin1.error.1
36  (signals-error
37   (with-output-to-string (*standard-output*) (prin1))
38   program-error)
39  t)
40
41(deftest prin1.error.2
42  (signals-error
43   (with-output-to-string (s) (prin1 nil s nil))
44   program-error)
45  t)
Note: See TracBrowser for help on using the repository browser.