瀏覽代碼

adding tests for space failure

Jeremy Bush 15 年之前
父節點
當前提交
c51d1e61b7

+ 14 - 0
examples/sections_spaces/Sections_Spaces.php

@@ -0,0 +1,14 @@
+<?php
+
+class Sections_Spaces extends Mustache {
+	public $start = "It worked the first time.";
+
+	public function middle() {
+		return array(
+			array('item' => "And it worked the second time."),
+			array('item' => "As well as the third."),
+		);
+	}
+
+	public $final = "Then, surprisingly, it worked the final time.";
+}

+ 9 - 0
examples/sections_spaces/sections_spaces.mustache

@@ -0,0 +1,9 @@
+ * {{ start }}
+{{# middle }}
+ * {{ item }}
+{{/ middle }}
+* {{ final }}
+
+ * {{ start }}
+{{# middle }} * {{ item }}{{/ middle }}
+* {{ final }}

+ 8 - 0
examples/sections_spaces/sections_spaces.txt

@@ -0,0 +1,8 @@
+ * It worked the first time.
+ * And it worked the second time.
+ * As well as the third.
+* Then, surprisingly, it worked the final time.
+
+ * It worked the first time.
+ * And it worked the second time. * As well as the third.
+* Then, surprisingly, it worked the final time.