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