source: trunk/source/tests/ansi-tests/streamp.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: 961 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sat Jan 17 17:12:38 2004
4;;;; Contains: Tests for STREAMP
5
6(in-package :cl-test)
7
8(deftest streamp.1
9  (loop for s in (list *debug-io* *error-output* *query-io*
10                       *standard-input* *standard-output*
11                       *trace-output* *terminal-io*)
12        unless (equal (multiple-value-list (notnot-mv (streamp s)))
13                      '(t))
14        collect s)
15  nil)
16
17(deftest streamp.2
18  (check-type-predicate #'streamp 'stream)
19  nil)
20
21(deftest streamp.3
22  (let ((s (open "foo.txt" :direction :output
23                 :if-exists :supersede)))
24    (close s)
25    (notnot-mv (streamp s)))
26  t)
27
28(deftest streamp.4
29  (let ((s (open "foo.txt" :direction :output
30                 :if-exists :supersede)))
31    (unwind-protect
32        (notnot-mv (streamp s))
33      (close s)))
34  t)
35
36;;; Error tests
37
38(deftest streamp.error.1
39  (signals-error (streamp) program-error)
40  t)
41
42(deftest streamp.error.2
43  (signals-error (streamp *standard-input* nil) program-error)
44  t)
Note: See TracBrowser for help on using the repository browser.