소스 검색

Merge remote-tracking branch 'KevBurnsJr/fixing_delimiters' into feature/delimiter-cleanup

Justin Hileman 14 년 전
부모
커밋
f0dc81b6bd
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      test/MustacheTest.php

+ 9 - 0
test/MustacheTest.php

@@ -402,6 +402,15 @@ class MustacheTest extends PHPUnit_Framework_TestCase {
 		$this->assertEquals('success', $m->render('{{=<% %>=}}<% result %>'));
 	}
 
+	/**
+	 * @group delimiters
+	 */
+	public function testStickyDelimiters() {
+		$m = new Mustache(null, array('result' => 'FAIL'));
+		$this->assertEquals('{{ result }}', $m->render('{{=[[ ]]=}}{{ result }}[[={{ }}=]]'));
+		$this->assertEquals('{{ result }}', $m->render('{{=[[ ]]=}}{{#result}}FAIL{{/result}}{{result}}[[={{ }}=]]'));
+	}
+
 	/**
 	 * @group sections
 	 * @dataProvider poorlyNestedSections