From e2e4442794d247727c52077c87fcf5ecf6c8b619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Tue, 5 Mar 2013 07:11:47 +0100 Subject: [PATCH] More mailing tests for #46 --- .../v6.0/GRMustacheSuites/variables.json | 182 +++++++++++++++++- 1 file changed, 181 insertions(+), 1 deletion(-) diff --git a/src/tests/Public/v6.0/GRMustacheSuites/variables.json b/src/tests/Public/v6.0/GRMustacheSuites/variables.json index 0c3b42f5..884ce22d 100644 --- a/src/tests/Public/v6.0/GRMustacheSuites/variables.json +++ b/src/tests/Public/v6.0/GRMustacheSuites/variables.json @@ -124,60 +124,240 @@ "template": "{{present}}\n{{missing}}", "expected": "---\n" }, + { + "name": "Lines containing a single empty variable tag are not rendered.", + "data": { }, + "template": "---\n{{missing}}", + "expected": "---\n" + }, { "name": "Lines containing a single empty variable tag are not rendered.", "data": { "present": "---" }, "template": "{{missing}}\n{{present}}", "expected": "---" }, + { + "name": "Lines containing a single empty variable tag are not rendered.", + "data": { }, + "template": "{{missing}}\n---", + "expected": "---" + }, { "name": "Lines containing a single empty variable tag are not rendered.", "data": { "present": "---" }, "template": "{{present}}\n{{missing}}\n", "expected": "---\n" }, + { + "name": "Lines containing a single empty variable tag are not rendered.", + "data": { }, + "template": "---\n{{missing}}\n", + "expected": "---\n" + }, { "name": "Lines containing a single empty variable tag are not rendered.", "data": { "present": "---" }, "template": "{{missing}}\n{{present}}\n", "expected": "---\n" }, + { + "name": "Lines containing a single empty variable tag are not rendered.", + "data": { }, + "template": "{{missing}}\n---\n", + "expected": "---\n" + }, { "name": "Lines containing a single empty variable tag are not rendered.", "data": { "present": "---" }, "template": "{{present}}\n{{missing}}\n{{missing}}\n{{present}}\n{{missing}}\n{{present}}\n", "expected": "---\n---\n---\n" }, + { + "name": "Lines containing a single empty variable tag are not rendered.", + "data": { }, + "template": "---\n{{missing}}\n{{missing}}\n---\n{{missing}}\n---\n", + "expected": "---\n---\n---\n" + }, + { + "name": "Lines containing a single empty variable tag prefixed by white space are not rendered.", + "data": { "present": "---" }, + "template": " {{present}}\n {{missing}}", + "expected": " ---\n" + }, + { + "name": "Lines containing a single empty variable tag prefixed by white space are not rendered.", + "data": { }, + "template": " ---\n {{missing}}", + "expected": " ---\n" + }, + { + "name": "Lines containing a single empty variable tag prefixed by white space are not rendered.", + "data": { "present": "---" }, + "template": " {{missing}}\n {{present}}", + "expected": " ---" + }, + { + "name": "Lines containing a single empty variable tag prefixed by white space are not rendered.", + "data": { }, + "template": " {{missing}}\n ---", + "expected": " ---" + }, + { + "name": "Lines containing a single empty variable tag prefixed by white space are not rendered.", + "data": { "present": "---" }, + "template": " {{present}}\n {{missing}}\n", + "expected": " ---\n" + }, + { + "name": "Lines containing a single empty variable tag prefixed by white space are not rendered.", + "data": { }, + "template": " ---\n {{missing}}\n", + "expected": " ---\n" + }, + { + "name": "Lines containing a single empty variable tag prefixed by white space are not rendered.", + "data": { "present": "---" }, + "template": " {{missing}}\n {{present}}\n", + "expected": " ---\n" + }, + { + "name": "Lines containing a single empty variable tag prefixed by white space are not rendered.", + "data": { }, + "template": " {{missing}}\n ---\n", + "expected": " ---\n" + }, + { + "name": "Lines containing a single empty variable tag prefixed by white space are not rendered.", + "data": { "present": "---" }, + "template": " {{present}}\n {{missing}}\n {{missing}}\n {{missing}}\n {{present}}\n {{missing}}\n {{present}}\n", + "expected": " ---\n ---\n ---\n" + }, + { + "name": "Lines containing a single empty variable tag prefixed by white space are not rendered.", + "data": { }, + "template": " ---\n {{missing}}\n {{missing}}\n {{missing}}\n ---\n {{missing}}\n ---\n", + "expected": " ---\n ---\n ---\n" + }, + { + "name": "Lines containing a single empty variable tag followed by white space are not rendered.", + "data": { "present": "---" }, + "template": "{{present}} \n{{missing}} ", + "expected": "--- \n" + }, + { + "name": "Lines containing a single empty variable tag followed by white space are not rendered.", + "data": { }, + "template": "--- \n{{missing}} ", + "expected": "--- \n" + }, + { + "name": "Lines containing a single empty variable tag followed by white space are not rendered.", + "data": { "present": "---" }, + "template": "{{missing}} \n{{present}} ", + "expected": "--- " + }, + { + "name": "Lines containing a single empty variable tag followed by white space are not rendered.", + "data": { }, + "template": "{{missing}} \n--- ", + "expected": "--- " + }, + { + "name": "Lines containing a single empty variable tag followed by white space are not rendered.", + "data": { "present": "---" }, + "template": "{{present}} \n{{missing}} \n", + "expected": "--- \n" + }, + { + "name": "Lines containing a single empty variable tag followed by white space are not rendered.", + "data": { }, + "template": "--- \n{{missing}} \n", + "expected": "--- \n" + }, + { + "name": "Lines containing a single empty variable tag followed by white space are not rendered.", + "data": { "present": "---" }, + "template": "{{missing}} \n{{present}} \n", + "expected": "--- \n" + }, + { + "name": "Lines containing a single empty variable tag followed by white space are not rendered.", + "data": { }, + "template": "{{missing}} \n--- \n", + "expected": "--- \n" + }, + { + "name": "Lines containing a single empty variable tag followed by white space are not rendered.", + "data": { "present": "---" }, + "template": "{{present}} \n{{missing}} \n{{missing}} \n{{missing}} \n{{present}} \n{{missing}} \n{{present}} \n", + "expected": "--- \n--- \n--- \n" + }, + { + "name": "Lines containing a single empty variable tag followed by white space are not rendered.", + "data": { }, + "template": "--- \n{{missing}} \n{{missing}} \n{{missing}} \n--- \n{{missing}} \n--- \n", + "expected": "--- \n--- \n--- \n" + }, { "name": "Lines containing a single empty variable tag surrounded by white space are not rendered.", "data": { "present": "---" }, "template": " {{present}} \n {{missing}} ", "expected": " --- \n" }, + { + "name": "Lines containing a single empty variable tag surrounded by white space are not rendered.", + "data": { }, + "template": " --- \n {{missing}} ", + "expected": " --- \n" + }, { "name": "Lines containing a single empty variable tag surrounded by white space are not rendered.", "data": { "present": "---" }, "template": " {{missing}} \n {{present}} ", "expected": " --- " }, + { + "name": "Lines containing a single empty variable tag surrounded by white space are not rendered.", + "data": { }, + "template": " {{missing}} \n --- ", + "expected": " --- " + }, { "name": "Lines containing a single empty variable tag surrounded by white space are not rendered.", "data": { "present": "---" }, "template": " {{present}} \n {{missing}} \n", "expected": " --- \n" }, + { + "name": "Lines containing a single empty variable tag surrounded by white space are not rendered.", + "data": { }, + "template": " --- \n {{missing}} \n", + "expected": " --- \n" + }, { "name": "Lines containing a single empty variable tag surrounded by white space are not rendered.", "data": { "present": "---" }, "template": " {{missing}} \n {{present}} \n", "expected": " --- \n" }, + { + "name": "Lines containing a single empty variable tag surrounded by white space are not rendered.", + "data": { }, + "template": " {{missing}} \n --- \n", + "expected": " --- \n" + }, { "name": "Lines containing a single empty variable tag surrounded by white space are not rendered.", "data": { "present": "---" }, "template": " {{present}} \n {{missing}} \n {{missing}} \n {{missing}} \n {{present}} \n {{missing}} \n {{present}} \n", "expected": " --- \n --- \n --- \n" }, + { + "name": "Lines containing a single empty variable tag surrounded by white space are not rendered.", + "data": { }, + "template": " --- \n {{missing}} \n {{missing}} \n {{missing}} \n --- \n {{missing}} \n --- \n", + "expected": " --- \n --- \n --- \n" + }, { // first failing example from https://github.com/groue/GRMustache/issues/46#issuecomment-14354838 "name": "Prefixes of skipped lines do not pollute surrounding lines", @@ -187,7 +367,7 @@ }, { // second failing example from https://github.com/groue/GRMustache/issues/46#issuecomment-14354838 - "name": "Prefixes of skipped lines do not pollute surrounding lines", + "name": "Non-blank suffixes do not prevent blank line skipping", "data": { "present": "---" }, "template": "{{missing}}\n...{{present}}...\n{{missing}}\n...{{present}}...\n{{missing}}\n", "expected": "...---...\n...---...\n"