/[advanced-readtable]/test.lisp
ViewVC logotype

Contents of /test.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19 - (hide annotations)
Mon Jan 28 17:03:50 2013 UTC (14 months, 3 weeks ago) by rklochkov
File size: 1058 byte(s)
Added tests
1 rklochkov 19 (named-readtables:in-readtable :advanced)
2    
3     (5am:in-suite* :advanced-readtable)
4    
5     (defpackage a (:use cl))
6     (in-package a)
7     (5am:test hierarchy1
8     (5am:is (string= (package-name *package*) "A")))
9    
10     (defpackage .b (:use cl))
11     (in-package .b)
12     (5am:test hierarchy2
13     (5am:is (string= (package-name *package*) "A.B")))
14    
15     (in-package ..)
16     (5am:test hierarchy3
17     (5am:is (string= (package-name *package*) "A")))
18    
19     (defun foo () 1)
20    
21     (in-package a.b)
22    
23     (defun foo () 2)
24    
25     (5am:test hierarchy4
26     (5am:is (= (+ (foo) (..::foo) 3)))
27     (5am:is (= (+ (foo) (..b::foo) 4)))
28     (5am:is (eq 'foo '..b::foo)))
29     ; (5am:is (eq 'foo '........b::foo)))
30    
31     (eval-when (:compile-toplevel :load-toplevel :execute)
32     (advanced-readtable:push-import-prefix :a))
33    
34     (5am:test import-prefix
35     (5am:is (eq 'foo 'b::foo)))
36    
37     (eval-when (:compile-toplevel :load-toplevel :execute)
38     (advanced-readtable:push-local-nickname :cl :alias))
39    
40     (5am:test local-nickname
41     (5am:is (eq 'car 'alias:car)))
42    
43     (eval-when (:compile-toplevel :load-toplevel :execute)
44     (advanced-readtable:push-local-nickname :cl :alias))

  ViewVC Help
Powered by ViewVC 1.1.5