Move examples into the test fixtures.

This commit is contained in:
Justin Hileman
2012-03-26 19:05:08 -07:00
parent 99a5e9b14a
commit 1430b27f86
77 changed files with 7 additions and 10 deletions
+31
View File
@@ -0,0 +1,31 @@
<?php
/**
* Whitespace test for tag names.
*
* Per http://github.com/janl/mustache.js/issues/issue/34/#comment_244396
* tags should strip leading and trailing whitespace in key names.
*
* `{{> tag }}` and `{{> tag}}` and `{{>tag}}` should all be equivalent.
*/
class Whitespace {
public $foo = 'alpha';
public $bar = 'beta';
public function baz() {
return 'gamma';
}
public function qux() {
return array(
array('key with space' => 'A'),
array('key with space' => 'B'),
array('key with space' => 'C'),
array('key with space' => 'D'),
array('key with space' => 'E'),
array('key with space' => 'F'),
array('key with space' => 'G'),
);
}
}
@@ -0,0 +1 @@
* {{.}}
+10
View File
@@ -0,0 +1,10 @@
{{^ inverted section test }}
These are some things:
{{/inverted section test }}
* {{ foo }}
* {{ bar}}
* {{ baz }}
{{# qux }}
* {{ key with space }}
{{/ qux }}
{{#qux}}.{{/qux}}
+12
View File
@@ -0,0 +1,12 @@
These are some things:
* alpha
* beta
* gamma
* A
* B
* C
* D
* E
* F
* G
.......