]> mj.ucw.cz Git - temple.git/commitdiff
Updated the test cases.
authorMartin Mares <mj@ucw.cz>
Thu, 2 Oct 2008 19:29:31 +0000 (21:29 +0200)
committerMartin Mares <mj@ucw.cz>
Thu, 2 Oct 2008 19:29:31 +0000 (21:29 +0200)
test
test3

diff --git a/test b/test
index c857c413f2add18f76a62655cecadabe9369c283..67269b096f1299cc85633ef03614db1a278ac95d 100644 (file)
--- a/test
+++ b/test
@@ -20,7 +20,7 @@ won't be broken@
 @@
 
 @# You can embed any perl code in your text:
-@[foreach $x (1..10) { print "$x "; } ]
+@[foreach $x (1..10) { out "$x "; } ]
 
 @# Or if you use @{...}, then the value of the last expression executed
 @# gets printed automatically:
@@ -29,11 +29,13 @@ won't be broken@
 @# You can also interpolate perl variables by using @$variable:
 I was run as @$0.
 
-@# It is possible to call any perl functions (result will be discarded):
-@print("One", "Two", "Three\n")
+@# It is possible to call any perl functions
+@# (any result other than undef will be printed automatically)
+@# Use `out' to write to the output stream
+@out("One", "Two", "Three\n")
 
 @# Or do the same with parameters running up to the end of the line:
-@print "Four", "Five", "Six\n"
+@out "Four", "Five", "Six\n"
 
 @# There are also some conditionals (you can use any perl expressions):
 @if 1
@@ -59,7 +61,7 @@ four
 @load "test3"
 
 @# This one is tricky:
-@print("z\n", <<EOF
+@out("z\n", <<EOF
 a
 b
 c
diff --git a/test3 b/test3
index a41bf385db5bf5bbe2701fa64d4012572ea0c3a9..c297bfc86962354a10b4ff123d9107c717880798 100644 (file)
--- a/test3
+++ b/test3
@@ -1,2 +1,2 @@
-print "oook!\n";
+out "oook!\n";
 1;