Commit 0b296327 authored by pfdietz's avatar pfdietz

Added some tests for WITH-COMPILATION-UNIT

parent e0becd18
......@@ -7,5 +7,6 @@
(load "compile-file.lsp")
(load "load.lsp")
(load "with-compilation-unit.lsp")
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sat Apr 30 07:36:26 2005
;;;; Contains: Tests of WITH-COMPILATION-UNIT
;;; WITH-COMPILATION-UNIT doesn't have much in the way of standardized
;;; semantics, so there's not much to test.
(in-package :cl-test)
(deftest with-compilation-unit.1
(with-compilation-unit ())
nil)
(deftest with-compilation-unit.2
(with-compilation-unit () t)
t)
(deftest with-compilation-unit.3
(with-compilation-unit () (values)))
(deftest with-compilation-unit.4
(with-compilation-unit () (values 1 2 3 4 5))
1 2 3 4 5)
(deftest with-compilation-unit.5
(with-compilation-unit (:override nil) :foo)
:foo)
(deftest with-compilation-unit.6
(with-compilation-unit (:override t) (values 10 17))
10 17)
(deftest with-compilation-unit.7
(let ((x nil))
(values
(block done
(with-compilation-unit
(:override nil)
(setq x 1)
(return-from done 2)
(setq x 2)))
x))
2 1)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment