summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter van de Bruggen <pvande@gmail.com>2010-12-15 10:57:02 -0800
committerPieter van de Bruggen <pvande@gmail.com>2010-12-15 10:57:02 -0800
commit949b73f3a3df91c684869a103ae60087f19b4f40 (patch)
treec4ca160acede40f928ff50f3f00d925cdeb443c8
parentc9ddab317be09adccc66983060534e6c20968b03 (diff)
downloadmustache-spec-949b73f3a3df91c684869a103ae60087f19b4f40.tar.gz
Adding a couple of specs for whitespace in sections.
-rw-r--r--specs/inverted.yml6
-rw-r--r--specs/sections.yml6
2 files changed, 12 insertions, 0 deletions
diff --git a/specs/inverted.yml b/specs/inverted.yml
index 41f03ff..29d1bac 100644
--- a/specs/inverted.yml
+++ b/specs/inverted.yml
@@ -65,6 +65,12 @@ tests:
template: " | {{^boolean}}\t|\t{{/boolean}} | \n"
expected: " | \t|\t | \n"
+ - name: Internal Whitespace
+ desc: Inverted should not alter internal whitespace.
+ data: { boolean: false }
+ template: " | {{^boolean}} {{! Important Whitespace }}\n {{/boolean}} | \n"
+ expected: " | \n | \n"
+
- name: Standalone Lines
desc: Standalone lines should be removed from the template.
data: { boolean: false }
diff --git a/specs/sections.yml b/specs/sections.yml
index cc3d330..3c953ba 100644
--- a/specs/sections.yml
+++ b/specs/sections.yml
@@ -104,6 +104,12 @@ tests:
template: " | {{#boolean}}\t|\t{{/boolean}} | \n"
expected: " | \t|\t | \n"
+ - name: Internal Whitespace
+ desc: Sections should not alter internal whitespace.
+ data: { boolean: true }
+ template: " | {{#boolean}} {{! Important Whitespace }}\n {{/boolean}} | \n"
+ expected: " | \n | \n"
+
- name: Standalone Lines
desc: Standalone lines should be removed from the template.
data: { boolean: true }