Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
ansi-test
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Karsten Poeck
ansi-test
Commits
0bf2a819
Commit
0bf2a819
authored
Jan 28, 2004
by
pfdietz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for LISTEN
parent
383251b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
0 deletions
+62
-0
ansi-tests/listen.lsp
ansi-tests/listen.lsp
+60
-0
ansi-tests/load-streams.lsp
ansi-tests/load-streams.lsp
+2
-0
No files found.
ansi-tests/listen.lsp
0 → 100644
View file @
0bf2a819
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Tue Jan 27 21:16:39 2004
;;;; Contains: Tests of LISTEN
(in-package :cl-test)
(deftest listen.1
(with-input-from-string (s "") (listen s))
nil)
(deftest listen.2
(with-input-from-string (s "x") (notnot-mv (listen s)))
t)
(deftest listen.3
(with-input-from-string (*standard-input* "") (listen))
nil)
(deftest listen.4
(with-input-from-string (*standard-input* "A") (notnot-mv (listen)))
t)
(deftest listen.5
(progn (clear-input) (listen))
nil)
(deftest listen.6
(with-input-from-string
(s "x")
(values
(read-char s)
(listen s)
(unread-char #\x s)
(notnot (listen s))
(read-char s)))
#\x nil nil t #\x)
(deftest listen.7
(with-open-file
(s "listen.lsp")
(values
(notnot (listen s))
(handler-case
(locally (declare (optimize safety))
(loop (read-char s)))
(end-of-file () (listen s)))))
t nil)
;;; Error tests
(deftest listen.error.1
(signals-error (listen *standard-input* nil) program-error)
t)
ansi-tests/load-streams.lsp
View file @
0bf2a819
...
@@ -29,3 +29,5 @@
...
@@ -29,3 +29,5 @@
(load "file-string-length.lsp")
(load "file-string-length.lsp")
(load "open.lsp")
(load "open.lsp")
(load "stream-external-format.lsp")
(load "stream-external-format.lsp")
(load "with-open-file.lsp")
(load "listen.lsp")
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment