summaryrefslogtreecommitdiffstats
path: root/tests/019/progv.tl
blob: 7ab3aafe825f7c90332dab6ef06f101604d4f942 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
(load "../common")

(defvar a 42)
(defvar b 73)

(mtest
  (progv '(a) '(1) a) 1
  (progv '(a b) '(1 2) (cons a b)) (1 . 2)
  (progv '(x) '(1) (let ((x 4)) (symbol-value 'x))) 1)

(let ((n (list 'a 'b))
      (v (list 1 2)))
  (mtest
    (progv n v (cons a b)) (1 . 2)))

(defvarl x)

(let ((x 'lexical)
     (vars (list 'x))
     (vals (list 'dynamic)))
  (test
    (progv vars vals (list x (symbol-value 'x)))
    (lexical dynamic)))

(compile-only
  (eval-only
    (with-compile-opts (nil unused)
      (compile-file (base-name *load-path*) "temp.tlo"))
    (remove-path "temp.tlo")))