From 2fc242a6ae62df961109644759c50db7578a79dd Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Sat, 22 May 2010 22:51:26 -0400 Subject: [PATCH] Added test case for resetting pragmas when reusing a single Mustache instance to render multiple templates. --- test/MustachePragmaTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/MustachePragmaTest.php b/test/MustachePragmaTest.php index 58f380e..39e1dbd 100644 --- a/test/MustachePragmaTest.php +++ b/test/MustachePragmaTest.php @@ -39,4 +39,10 @@ class MustachePragmaTest extends PHPUnit_Framework_TestCase { $this->assertEquals("1\n23", $m->render("1\n2{{%DOT-NOTATION}}\n3"), 'Wrong newline removed with pragma tag'); } + public function testPragmaReset() { + $m = new Mustache('', array('symbol' => '>>>')); + $this->assertEquals('>>>', $m->render('{{{symbol}}}')); + $this->assertEquals('>>>', $m->render('{{%UNESCAPED}}{{symbol}}')); + $this->assertEquals('>>>', $m->render('{{{symbol}}}')); + } } \ No newline at end of file