~ubuntu-branches/ubuntu/quantal/gclcvs/quantal

« back to all changes in this revision

Viewing changes to ansi-tests/lambda-list-keywords.lsp

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-06-24 15:13:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040624151346-xh0xaaktyyp7aorc
Tags: 2.7.0-26
C_GC_OFFSET is 2 on m68k-linux

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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)