0.8.0.78:
[sbcl/lichteblau.git] / tests / loop.impure.lisp
blob14401657ad3262b012e6f39606d54806ab43c982
1 ;;;; miscellaneous tests of LOOP-related stuff
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
6 ;;;; While most of SBCL is derived from the CMU CL system, the test
7 ;;;; files (like this one) were written from scratch after the fork
8 ;;;; from CMU CL.
9 ;;;;
10 ;;;; This software is in the public domain and is provided with
11 ;;;; absolutely no warranty. See the COPYING and CREDITS files for
12 ;;;; more information.
14 (in-package "CL-USER")
16 ;;; Bug 49b, reported by Peter Van Eynde 2000-07-25, was fixed by
17 ;;; Alexey Dejneka's patch on sbcl-devel 2001-09-30.
18 ;;;
19 ;;; (This test is impure because we create a scratch package to work with.)
20 (let ((package (make-package "loop-test-scratch")))
21 (intern "blah" package)
22 (let ((blah2 (intern "blah2" package)))
23 (export blah2 package))
24 (assert (equal '("blah" "blah2")
25 (sort (loop for sym being each present-symbol of package
26 for sym-name = (symbol-name sym)
27 collect sym-name)
28 #'string<)))
29 (assert (equal '("blah2")
30 (sort (loop for sym being each external-symbol of package for
31 sym-name = (symbol-name sym) collect sym-name)
32 (function string<)))))
34 ;;; success
35 (quit :unix-status 104)