summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2014-05-24 13:07:19 +0200
committerKevin Chabowski <kevin@kch42.de>2014-05-24 13:07:19 +0200
commit9f86139b7604ea782a35e09bf9d0c55154197051 (patch)
treeee1202b8539a177f3c240d1fd2c898d7f259ef5e /tests
parentf7ddc264d832d163494904da67ca96856335487b (diff)
downloadste-9f86139b7604ea782a35e09bf9d0c55154197051.tar.gz
ste-9f86139b7604ea782a35e09bf9d0c55154197051.tar.bz2
ste-9f86139b7604ea782a35e09bf9d0c55154197051.zip
Added ste:setlocal and refined test_scope.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_scoping/test.tpl16
-rw-r--r--tests/test_scoping/want9
2 files changed, 23 insertions, 2 deletions
diff --git a/tests/test_scoping/test.tpl b/tests/test_scoping/test.tpl
index 25a46e7..e8a5cf2 100644
--- a/tests/test_scoping/test.tpl
+++ b/tests/test_scoping/test.tpl
@@ -1,6 +1,18 @@
+<ste:set var="a">A</ste:set>
+<ste:set var="b">B</ste:set>
<ste:mktag name="foo">
- <ste:set var="bla">!</ste:set>
+ in foo: \$a = $a
+ in foo: \$b = $b
+ in foo: \$c = $c
+ <ste:set var="a">X</ste:set>
+ <ste:setlocal var="b">Y</ste:setlocal>
+ <ste:set var="c">Z</ste:set>
+ in foo (after set): \$a = $a
+ in foo (after set): \$b = $b
+ in foo (after set): \$c = $c
</ste:mktag>
<ste:foo />
-$bla \ No newline at end of file
+\$a = $a
+\$b = $b
+\$c = $c \ No newline at end of file
diff --git a/tests/test_scoping/want b/tests/test_scoping/want
index e69de29..6e7a154 100644
--- a/tests/test_scoping/want
+++ b/tests/test_scoping/want
@@ -0,0 +1,9 @@
+in foo: $a = A
+in foo: $b = B
+in foo: $c =
+in foo (after set): $a = X
+in foo (after set): $b = Y
+in foo (after set): $c = Z
+$a = X
+$b = B
+$c =