summaryrefslogtreecommitdiff
path: root/specs/partials.json
diff options
context:
space:
mode:
authormrb <michaelrbernstein@gmail.com>2011-02-03 07:12:21 -0500
committermrb <michaelrbernstein@gmail.com>2011-02-03 07:12:21 -0500
commit54e8666c315a373e2d4dc93d3d6dd90ca1496918 (patch)
tree65f2a7dd6bdcf2c7b4c404e0b30a313b0e60a2af /specs/partials.json
parent7d96ec1c31329e9f96a1167f20ea26841fdde6bd (diff)
downloadmustache-spec-54e8666c315a373e2d4dc93d3d6dd90ca1496918.tar.gz
json versions of yaml specs
Diffstat (limited to 'specs/partials.json')
-rw-r--r--specs/partials.json1
1 files changed, 1 insertions, 0 deletions
diff --git a/specs/partials.json b/specs/partials.json
new file mode 100644
index 0000000..6f695cd
--- /dev/null
+++ b/specs/partials.json
@@ -0,0 +1 @@
+{"tests":[{"name":"Basic Behavior","data":{},"expected":"\"from partial\"","template":"\"{{>text}}\"","desc":"The greater-than operator should expand to the named partial.","partials":{"text":"from partial"}},{"name":"Context","data":{"text":"content"},"expected":"\"*content*\"","template":"\"{{>partial}}\"","desc":"The greater-than operator should operate within the current context.","partials":{"partial":"*{{text}}*"}},{"name":"Recursion","data":{"content":"X","nodes":[{"content":"Y","nodes":[]}]},"expected":"X<Y<>>","template":"{{>node}}","desc":"The greater-than operator should properly recurse.","partials":{"node":"{{content}}<{{#nodes}}{{>node}}{{/nodes}}>"}},{"name":"Surrounding Whitespace","data":{},"expected":"| \t|\t |","template":"| {{>partial}} |","desc":"The greater-than operator should not alter surrounding whitespace.","partials":{"partial":"\t|\t"}},{"name":"Inline Indentation","data":{"data":"|"},"expected":" | >\n>\n","template":" {{data}} {{> partial}}\n","desc":"Whitespace should be left untouched.","partials":{"partial":">\n>"}},{"name":"Standalone Indentation","data":{"content":"<\n->"},"expected":"\\\n |\n <\n->\n |\n/\n","template":"\\\n {{>partial}}\n/\n","desc":"Each line of the partial should be indented before rendering.","partials":{"partial":"|\n{{{content}}}\n|\n"}},{"name":"Padding Whitespace","data":{"boolean":true},"expected":"|[]|","template":"|{{> partial }}|","desc":"Superfluous in-tag whitespace should be ignored.","partials":{"partial":"[]"}}]} \ No newline at end of file