OSDN Git Service

* testsuite/pmacros-1.test: Add more .splice tests.
authordevans <devans>
Wed, 20 Jan 2010 06:22:19 +0000 (06:22 +0000)
committerdevans <devans>
Wed, 20 Jan 2010 06:22:19 +0000 (06:22 +0000)
cgen/ChangeLog
cgen/testsuite/pmacros-1.test

index 7a2409a..954444f 100644 (file)
@@ -1,5 +1,7 @@
 2010-01-19  Doug Evans  <dje@sebabeach.org>
 
+       * testsuite/pmacros-1.test: Add more .splice tests.
+
        * read.scm (/cmd-include): Fix absolute path handling.
 
 2010-01-05  Doug Evans  <dje@sebabeach.org>
index 6805744..14003d5 100644 (file)
@@ -78,10 +78,22 @@ cat > ${cpu_file} <<EOF
 (print-match "zz")
 (print-expr (.substring xyzzy 2 4))
 
-(test-name ".splice")
+(test-name ".splice1")
 (print-match "(now is the time)")
 (print-expr (.splice now (.unsplice (is the time))))
 
+;; Arguments to .splice/.unsplice are evaluated.
+(test-name ".splice2")
+(print-match "(now is the time)")
+(define-pmacro splice2-piece now)
+(print-expr (.splice splice2-piece (.unsplice (is the time))))
+
+;; Arguments to .splice/.unsplice are evaluated.
+(test-name ".splice3")
+(print-match "(now is the time)")
+(define-pmacro splice3-piece the)
+(print-expr (.splice now (.unsplice (is splice3-piece time))))
+
 (test-name ".iota")
 (print-match "(0 1 2 3)")
 (print-expr (.iota 4))