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
This commit is contained in:
uwetews
2018-08-31 17:29:59 +02:00
parent 5359963c27
commit e250f28db7

View File

@@ -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));
}
}