Skip to content

Commit

Permalink
More mailing tests for #46
Browse files Browse the repository at this point in the history
  • Loading branch information
groue committed Mar 5, 2013
1 parent 47ccd8c commit e2e4442
Showing 1 changed file with 181 additions and 1 deletion.
182 changes: 181 additions & 1 deletion src/tests/Public/v6.0/GRMustacheSuites/variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand Down

0 comments on commit e2e4442

Please sign in to comment.