aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2013-09-12 21:15:32 -0700
committerDavid King <imkingdavid@gmail.com>2013-09-12 21:15:32 -0700
commit70399fe66d559ddfccb5e5ebfa5c340ca4c90313 (patch)
tree154c1f820f4c9ef7197d04cee4b8ed1db599c874 /tests
parent12ede5f2a783bbdb8dc8ba9a94b4cd1ffa750e49 (diff)
parentbcb1392351c2da921f477b56ab2c0777e7bbf4fc (diff)
downloadforums-70399fe66d559ddfccb5e5ebfa5c340ca4c90313.tar
forums-70399fe66d559ddfccb5e5ebfa5c340ca4c90313.tar.gz
forums-70399fe66d559ddfccb5e5ebfa5c340ca4c90313.tar.bz2
forums-70399fe66d559ddfccb5e5ebfa5c340ca4c90313.tar.xz
forums-70399fe66d559ddfccb5e5ebfa5c340ca4c90313.zip
Merge pull request #1683 from EXreaction/ticket/11816
[ticket/11816] Fix define/loop checks in IF statements containing parenthesis
Diffstat (limited to 'tests')
-rw-r--r--tests/template/template_test.php2
-rw-r--r--tests/template/templates/define.html9
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index e64493e59a..1649604492 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -158,7 +158,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
array(),
array('test_loop' => array(array(), array(), array(), array(), array(), array(), array()), 'test' => array(array()), 'test.deep' => array(array()), 'test.deep.defines' => array(array())),
array(),
- "xyz\nabc\n\$VALUE == 'abc'abc\nbar\nbar\nabc\ntest!@#$%^&*()_-=+{}[]:;\",<.>/?\n[]|foobar|",
+ "xyz\nabc\n\$VALUE == 'abc'\n(\$VALUE == 'abc')\n!\$DOESNT_EXIST\n(!\$DOESNT_EXIST)\nabc\nbar\nbar\nabc\ntest!@#$%^&*()_-=+{}[]:;\",<.>/?[]|foobar|",
),
array(
'define_advanced.html',
diff --git a/tests/template/templates/define.html b/tests/template/templates/define.html
index f519078a5b..bc20c02ed1 100644
--- a/tests/template/templates/define.html
+++ b/tests/template/templates/define.html
@@ -7,6 +7,15 @@ $VALUE != 'abc'
<!-- ELSEIF $VALUE == 'abc' -->
$VALUE == 'abc'
<!-- ENDIF -->
+<!-- IF ($VALUE == 'abc') -->
+($VALUE == 'abc')
+<!-- ENDIF -->
+<!-- IF !$DOESNT_EXIST -->
+!$DOESNT_EXIST
+<!-- ENDIF -->
+<!-- IF (!$DOESNT_EXIST) -->
+(!$DOESNT_EXIST)
+<!-- ENDIF -->
<!-- INCLUDE define_include.html -->
{$INCLUDED_VALUE}
{$VALUE}