source: trunk/source/tests/ansi-tests/list-all-packages.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: 1.2 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sat Feb 21 17:47:37 2004
4;;;; Contains: Tests of LIST-ALL-PACKAGES
5
6(in-package :cl-test)
7(declaim (optimize (safety 3)))
8
9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10;;; list-all-packages
11
12;; list-all-packages returns a list
13(deftest list-all-packages.1
14  (numberp (ignore-errors (list-length (list-all-packages))))
15  t)
16
17;; The required packages are present
18(deftest list-all-packages.2
19  (progn
20    (set-up-packages)
21    (notnot
22     (subsetp
23      (list (find-package "CL")
24            (find-package "CL-USER")
25            (find-package "KEYWORD")
26            (find-package "A")
27            (find-package "REGRESSION-TEST")
28            (find-package "CL-TEST")
29            (find-package "B"))
30      (list-all-packages))))
31  t)
32
33;; The list returned has only packages in it
34(deftest list-all-packages.3
35  (notnot-mv (every #'packagep (list-all-packages)))
36  t)
37
38;; It returns a list of the same packages each time it is called
39(deftest list-all-packages.4
40  (let ((p1 (list-all-packages))
41        (p2 (list-all-packages)))
42    (and (subsetp p1 p2)
43         (subsetp p2 p1)))
44  t)
45
46(deftest list-all-packages.error.1
47  (signals-error (list-all-packages nil) program-error)
48  t)
Note: See TracBrowser for help on using the repository browser.