From e250f28db7dd1e60dcc6bc776e219fcf863de646 Mon Sep 17 00:00:00 2001 From: uwetews Date: Fri, 31 Aug 2018 17:29:59 +0200 Subject: [PATCH] added test - bugfix some custom left and right delimiters like '{^' '^}' did not work https://github.com/smarty-php/smarty/issues/450 https://github.com/smarty-php/smarty/pull/482 --- tests/UnitTests/Compiler/Delimiter/DelimiterTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/UnitTests/Compiler/Delimiter/DelimiterTest.php b/tests/UnitTests/Compiler/Delimiter/DelimiterTest.php index 3bddff1b..11e333ef 100644 --- a/tests/UnitTests/Compiler/Delimiter/DelimiterTest.php +++ b/tests/UnitTests/Compiler/Delimiter/DelimiterTest.php @@ -89,4 +89,14 @@ class DelimiterTest extends PHPUnit_Smarty $tpl = $this->smarty->createTemplate('eval:{=assign var=foo value="hello world" nocache=}{=$foo=}'); $this->assertEquals("hello world", $this->smarty->fetch($tpl)); } + /** + * test {= =} delimiter for conficts with option flags + */ + public function testDelimiterIssue450() + { + $this->smarty->left_delimiter = '{^'; + $this->smarty->right_delimiter = '^}'; + $tpl = $this->smarty->createTemplate('eval:{^assign var=foo value="hello world" nocache^}{^$foo^}'); + $this->assertEquals("hello world", $this->smarty->fetch($tpl)); + } }