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
5e1769a4
Commit
5e1769a4
authored
Dec 12, 2004
by
pfdietz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some tests for APROPOS
parent
d65009d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
0 deletions
+60
-0
ansi-tests/apropos.lsp
ansi-tests/apropos.lsp
+59
-0
ansi-tests/gclload2.lsp
ansi-tests/gclload2.lsp
+1
-0
No files found.
ansi-tests/apropos.lsp
0 → 100644
View file @
5e1769a4
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sun Dec 12 16:17:47 2004
;;;; Contains: Tests for APROPOS
(in-package :cl-test)
(deftest apropos.1
(loop for n from 10
for x = (coerce (loop repeat n collect (random-from-seq +standard-chars+)) 'string)
unless (apropos-list x)
return (with-output-to-string (*standard-output*)
(assert (null (multiple-value-list (apropos x))))))
"")
(deftest apropos.2
(let ((s (with-output-to-string
(*standard-output*)
(assert (null (multiple-value-list (apropos "CAR")))))))
(notnot (search "CAR" s :test #'string-equal)))
t)
(deftest apropos.3
(let ((s (with-output-to-string
(*standard-output*)
(assert (null (multiple-value-list (apropos "CAR" (find-package "CL"))))))))
(notnot (search "CAR" s :test #'string-equal)))
t)
(deftest apropos.4
(let ((result nil))
(do-special-strings
(s "CAR" t)
(setq result (with-output-to-string
(*standard-output*)
(assert (null (multiple-value-list (apropos s))))))
(assert (search "CAR" result :test #'string-equal))))
t)
(deftest apropos.5
(let ((result nil)
(pkg (find-package "COMMON-LISP")))
(do-special-strings
(s "APROPOS" t)
(setq result (with-output-to-string
(*standard-output*)
(assert (null (multiple-value-list (apropos s pkg))))))
(assert (search "APROPOS" result :test #'string-equal))))
t)
;;; Error tests
(deftest apropos.error.1
(signals-error (apropos) program-error)
t)
(deftest apropos.error.2
(signals-error (apropos "SJLJALKSJDKLJASKLDJKLAJDLKJA" (find-package "CL") nil) program-error)
t)
ansi-tests/gclload2.lsp
View file @
5e1769a4
...
@@ -68,6 +68,7 @@
...
@@ -68,6 +68,7 @@
(load "load-reader.lsp")
(load "load-reader.lsp")
;;; Tests of system construction, environment
;;; Tests of system construction, environment
(load "apropos.lsp")
(load "describe.lsp")
(load "describe.lsp")
(load "disassemble.lsp")
(load "disassemble.lsp")
(load "environment-functions.lsp")
(load "environment-functions.lsp")
...
...
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