Last change
on this file since 8991 was
8991,
checked in by gz, 13 years ago
|
Check in the gcl ansi test suite (original, in preparation for making local changes)
|
File size:
1.3 KB
|
Line | |
---|
1 | ;-*- Mode: Lisp -*- |
---|
2 | ;;;; Author: Paul Dietz |
---|
3 | ;;;; Created: Wed Jan 28 06:43:17 2004 |
---|
4 | ;;;; Contains: Tests of CLEAR-OUTPUT |
---|
5 | |
---|
6 | (in-package :cl-test) |
---|
7 | |
---|
8 | (deftest clear-output.1 |
---|
9 | (progn (finish-output) (clear-output)) |
---|
10 | nil) |
---|
11 | |
---|
12 | (deftest clear-output.2 |
---|
13 | (progn (finish-output) (clear-output t)) |
---|
14 | nil) |
---|
15 | |
---|
16 | (deftest clear-output.3 |
---|
17 | (progn (finish-output) (clear-output nil)) |
---|
18 | nil) |
---|
19 | |
---|
20 | (deftest clear-output.4 |
---|
21 | (loop for s in (list *debug-io* *error-output* *query-io* |
---|
22 | *standard-output* *trace-output* *terminal-io*) |
---|
23 | for dummy = (finish-output s) |
---|
24 | for results = (multiple-value-list (clear-output s)) |
---|
25 | unless (equal results '(nil)) |
---|
26 | collect s) |
---|
27 | nil) |
---|
28 | |
---|
29 | (deftest clear-output.5 |
---|
30 | (let ((os (make-string-output-stream))) |
---|
31 | (let ((*terminal-io* (make-two-way-stream (make-string-input-stream "") |
---|
32 | os))) |
---|
33 | (clear-output t))) |
---|
34 | nil) |
---|
35 | |
---|
36 | (deftest clear-output.6 |
---|
37 | (let ((*standard-output* (make-string-output-stream))) |
---|
38 | (clear-output nil)) |
---|
39 | nil) |
---|
40 | |
---|
41 | ;;; Error tests |
---|
42 | |
---|
43 | (deftest clear-output.error.1 |
---|
44 | (signals-error (clear-output nil nil) program-error) |
---|
45 | t) |
---|
46 | |
---|
47 | (deftest clear-output.error.2 |
---|
48 | (signals-error (clear-output t nil) program-error) |
---|
49 | t) |
---|
50 | |
---|
51 | (deftest clear-output.error.3 |
---|
52 | (check-type-error #'clear-output #'(lambda (x) (typep x '(or stream (member nil t))))) |
---|
53 | nil) |
---|
Note: See
TracBrowser
for help on using the repository browser.