source: trunk/source/tests/ansi-tests/input-stream-p.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: 880 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Tue Jan 13 19:39:27 2004
4;;;; Contains: Tests for INPUT-STREAM-P
5
6(in-package :cl-test)
7
8(deftest input-stream-p.1
9  (notnot-mv (input-stream-p *standard-input*))
10  t)
11
12(deftest input-stream-p.2
13  (notnot-mv (input-stream-p *terminal-io*))
14  t)
15
16(deftest input-stream-p.3
17  (with-open-file (s "input-stream-p.lsp" :direction :input)
18                  (notnot-mv (input-stream-p s)))
19  t)
20
21(deftest input-stream-p.4
22  (with-open-file (s "foo.txt" :direction :output
23                     :if-exists :supersede)
24                  (input-stream-p s))
25  nil)
26
27;;; Error tests
28
29(deftest input-stream-p.error.1
30  (signals-error (input-stream-p) program-error)
31  t)
32
33(deftest input-stream-p.error.2
34  (signals-error (input-stream-p *standard-input* nil)
35                 program-error)
36  t)
37
38(deftest input-stream-p.error.3
39  (check-type-error #'input-stream-p #'streamp)
40  nil)
Note: See TracBrowser for help on using the repository browser.