From 53b22b1bf883736de97cb1712496315b67a2008e Mon Sep 17 00:00:00 2001 From: Pieter van de Bruggen Date: Tue, 8 Mar 2011 21:12:49 -0800 Subject: Added tests for standalone tags at string boundaries. --- specs/inverted.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'specs/inverted.yml') diff --git a/specs/inverted.yml b/specs/inverted.yml index 1204214..f4b246d 100644 --- a/specs/inverted.yml +++ b/specs/inverted.yml @@ -146,6 +146,18 @@ tests: template: "|\r\n{{^boolean}}\r\n{{/boolean}}\r\n|" expected: "|\r\n|" + - name: Standalone Without Previous Line + desc: Standalone tags should not require a newline to precede them. + data: { boolean: false } + template: " {{^boolean}}\n^{{/boolean}}\n/" + expected: "^\n/" + + - name: Standalone Without Newline + desc: Standalone tags should not require a newline to follow them. + data: { boolean: false } + template: "^{{^boolean}}\n/\n {{/boolean}}" + expected: "^\n/\n" + # Whitespace Insensitivity - name: Padding -- cgit v1.2.1