source: trunk/source/tests/ansi-tests/lambda-list-keywords.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.0 KB
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Mon Oct  7 22:11:31 2002
4;;;; Contains: Tests for LAMBDA-LIST-KEYWORDS
5
6(in-package :cl-test)
7
8;;; The variable is bound
9(deftest lambda-list-keywords.1
10  (not-mv (boundp 'lambda-list-keywords))
11  nil)
12
13;;; The variable is a constant
14(deftest lambda-list-keywords.2
15  (not-mv (constantp 'lambda-list-keywords))
16  nil)
17
18;;; The standard keywords are present in the list
19(deftest lambda-list-keywords.3
20  (and (consp lambda-list-keywords)
21       (not-mv (set-difference '(&allow-other-keys
22                                 &aux &body &environment
23                                 &key &optional &rest &whole)
24                               lambda-list-keywords)))
25  t)
26
27;;; No lambda list keywords are in the keyword package
28;;; (deftest lambda-list-keywords.4
29;;;  (some #'keywordp lambda-list-keywords)
30;;;  nil)
31
32;;; Every keyword starts with an ampersand
33(deftest lambda-list-keywords.5
34  (notevery #'(lambda (sym)
35                (and (symbolp sym)
36                     (let ((name (symbol-name sym)))
37                       (and (> (length name) 0)
38                            (eql (aref name 0) #\&)))))
39            lambda-list-keywords)
40  nil)
Note: See TracBrowser for help on using the repository browser.