Commit | Line | Data |
---|---|---|
5aa10005 RD |
1 | (in-package :parenscript-test) |
2 | ||
3 | (eval-when (:compile-toplevel :load-toplevel :execute) | |
4 | (def-suite package-system-tests)) | |
5 | ||
6 | (in-suite package-system-tests) | |
7 | ||
319d2663 VS |
8 | (defpackage "PSTSTPKG" |
9 | (:use #:parenscript)) | |
10 | ||
11 | (test namespace1 () | |
12 | (setf (ps-package-prefix "PSTSTPKG") "prefix_") | |
13 | (is (string= "prefix_var;" (normalize-js-code (ps pststpkg::var))))) | |
14 | ||
15 | (common-lisp:in-package "PSTSTPKG") | |
16 | ||
17 | (ps-test::test-ps-js namespace-and-special-forms | |
18 | (let ((foo (create :bar 1 not-a-keyword something))) | |
19 | (return (and (not foo) (+ (slot-value foo bar) some-other-var)))) | |
20 | " var prefix_foo = | |
21 | { bar : 1, | |
22 | prefix_notAKeyword : prefix_something }; | |
23 | return !prefix_foo && prefix_foo[prefix_bar] + prefix_someOtherVar;") | |
5aa10005 | 24 |