diff options
Diffstat (limited to 'tests/test_escapes')
-rw-r--r-- | tests/test_escapes/.gitignore | 3 | ||||
-rw-r--r-- | tests/test_escapes/code.php | 7 | ||||
-rw-r--r-- | tests/test_escapes/test.tpl | 7 | ||||
-rw-r--r-- | tests/test_escapes/want | 7 |
4 files changed, 24 insertions, 0 deletions
diff --git a/tests/test_escapes/.gitignore b/tests/test_escapes/.gitignore new file mode 100644 index 0000000..de2a41b --- /dev/null +++ b/tests/test_escapes/.gitignore @@ -0,0 +1,3 @@ +have +*.ast +*.transc.php diff --git a/tests/test_escapes/code.php b/tests/test_escapes/code.php new file mode 100644 index 0000000..05984d1 --- /dev/null +++ b/tests/test_escapes/code.php @@ -0,0 +1,7 @@ +<?php + +function test_func($ste) { + $ste->register_tag("my_echo", function($ste, $params, $sub) { + return $params["text"]; + }); +} diff --git a/tests/test_escapes/test.tpl b/tests/test_escapes/test.tpl new file mode 100644 index 0000000..5458fde --- /dev/null +++ b/tests/test_escapes/test.tpl @@ -0,0 +1,7 @@ +\\\\\\\$foo +\${bar} +\?{foo|bar|baz} +?{|Foo|Bar\|Baz} +<ste:my_echo text="foo\\\"bar\$" /> +<ste:my_echo text='\'' /> +\'
\ No newline at end of file diff --git a/tests/test_escapes/want b/tests/test_escapes/want new file mode 100644 index 0000000..3278c4d --- /dev/null +++ b/tests/test_escapes/want @@ -0,0 +1,7 @@ +\\\$foo +${bar} +?{foo|bar|baz} +Bar|Baz +foo\"bar$ +' +\' |