From 2d26169b367af60cbc03d417c09918f50aa3b882 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Tue, 28 Apr 2020 19:29:41 +0200 Subject: Fix parser stumbling over "0" in names PHPs type juggling strikes again :( --- tests/test_tagname/.gitignore | 3 +++ tests/test_tagname/code.php | 20 ++++++++++++++++++++ tests/test_tagname/test.tpl | 4 ++++ tests/test_tagname/want | 4 ++++ 4 files changed, 31 insertions(+) create mode 100644 tests/test_tagname/.gitignore create mode 100644 tests/test_tagname/code.php create mode 100644 tests/test_tagname/test.tpl create mode 100644 tests/test_tagname/want (limited to 'tests/test_tagname') diff --git a/tests/test_tagname/.gitignore b/tests/test_tagname/.gitignore new file mode 100644 index 0000000..de2a41b --- /dev/null +++ b/tests/test_tagname/.gitignore @@ -0,0 +1,3 @@ +have +*.ast +*.transc.php diff --git a/tests/test_tagname/code.php b/tests/test_tagname/code.php new file mode 100644 index 0000000..6001358 --- /dev/null +++ b/tests/test_tagname/code.php @@ -0,0 +1,20 @@ +register_tag( + $name, + function ($ste, $params, $sub) use ($name) { return $name; } + ); + } + +} diff --git a/tests/test_tagname/test.tpl b/tests/test_tagname/test.tpl new file mode 100644 index 0000000..30ca889 --- /dev/null +++ b/tests/test_tagname/test.tpl @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/tests/test_tagname/want b/tests/test_tagname/want new file mode 100644 index 0000000..3233294 --- /dev/null +++ b/tests/test_tagname/want @@ -0,0 +1,4 @@ +foo +ab_cd +foo123baz +x0123 -- cgit v1.2.3-70-g09d2