ec57c835676df50ea77dad4a0b00bcd7f8819a82
[sbcl.git] / tests / compiler.impure.lisp
1 ;;;; This file is for compiler tests which have side effects (e.g.
2 ;;;; executing DEFUN) but which don't need any special side-effecting
3 ;;;; environmental stuff (e.g. DECLAIM of particular optimization
4 ;;;; settings). Similar tests which *do* expect special settings may
5 ;;;; be in files compiler-1.impure.lisp, compiler-2.impure.lisp, etc.
6
7 (cl:in-package :cl-user)
8
9 (load "assertoid.lisp")
10
11 ;;; Old CMU CL code assumed that the names of "keyword" arguments are
12 ;;; necessarily self-evaluating symbols, but ANSI Common Lisp allows
13 ;;; them to be any symbols, not necessarily keywords, and thus not
14 ;;; necessarily self-evaluating. Make sure that this works.
15 (defun newfangled-cons (&key ((left-thing x)) ((right-thing y)))
16   (cons x y))
17 (assert (equal (cons 1 2) (newfangled-cons 'right-thing 2 'left-thing 1)))
18
19 ;;; success
20 (quit :unix-status 104)