From 4e2bfed23c17929795f2082d6e77937170caeaa9 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Sun, 13 Sep 2020 21:35:16 +0200 Subject: Turn our functional tests into PhpUnit tests --- tests/functional/test_escapes/Test.php | 21 +++++++++++++++++++++ tests/functional/test_escapes/test.tpl | 7 +++++++ tests/functional/test_escapes/want | 7 +++++++ 3 files changed, 35 insertions(+) create mode 100644 tests/functional/test_escapes/Test.php create mode 100644 tests/functional/test_escapes/test.tpl create mode 100644 tests/functional/test_escapes/want (limited to 'tests/functional/test_escapes') diff --git a/tests/functional/test_escapes/Test.php b/tests/functional/test_escapes/Test.php new file mode 100644 index 0000000..5c2a2ab --- /dev/null +++ b/tests/functional/test_escapes/Test.php @@ -0,0 +1,21 @@ +register_tag("my_echo", function ($ste, $params, $sub) { + return $params["text"]; + }); + } +} diff --git a/tests/functional/test_escapes/test.tpl b/tests/functional/test_escapes/test.tpl new file mode 100644 index 0000000..5458fde --- /dev/null +++ b/tests/functional/test_escapes/test.tpl @@ -0,0 +1,7 @@ +\\\\\\\$foo +\${bar} +\?{foo|bar|baz} +?{|Foo|Bar\|Baz} + + +\' \ No newline at end of file diff --git a/tests/functional/test_escapes/want b/tests/functional/test_escapes/want new file mode 100644 index 0000000..3278c4d --- /dev/null +++ b/tests/functional/test_escapes/want @@ -0,0 +1,7 @@ +\\\$foo +${bar} +?{foo|bar|baz} +Bar|Baz +foo\"bar$ +' +\' -- cgit v1.2.3-70-g09d2