source: trunk/source/tests/ansi-tests/finish-output.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: 1.2 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Wed Jan 28 06:38:20 2004
4;;;; Contains: Tests of FINISH-OUTPUT
5
6(in-package :cl-test)
7
8(deftest finish-output.1
9  (finish-output)
10  nil)
11
12(deftest finish-output.2
13  (finish-output t)
14  nil)
15
16(deftest finish-output.3
17  (finish-output nil)
18  nil)
19
20(deftest finish-output.4
21  (loop for s in (list *debug-io* *error-output* *query-io*
22                       *standard-output* *trace-output* *terminal-io*)
23        for results = (multiple-value-list (finish-output s))
24        unless (equal results '(nil))
25        collect s)
26  nil)
27
28(deftest finish-output.5
29  (let ((os (make-string-output-stream)))
30    (let ((*terminal-io* (make-two-way-stream (make-string-input-stream "")
31                                              os)))
32      (finish-output t)))
33  nil)
34
35(deftest finish-output.6
36  (let ((*standard-output* (make-string-output-stream)))
37    (finish-output nil))
38  nil)
39
40;;; Error tests
41
42(deftest finish-output.error.1
43  (signals-error (finish-output nil nil) program-error)
44  t)
45
46(deftest finish-output.error.2
47  (signals-error (finish-output t nil) program-error)
48  t)
49
50(deftest finish-output.error.3
51  (check-type-error #'finish-output
52                    #'(lambda (x) (typep x '(or stream (member nil t)))))
53  nil)
54
Note: See TracBrowser for help on using the repository browser.