From 4707b455b5c84ab863228e2abbc6faba92611560 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sat, 6 Feb 2016 02:15:41 -0600 Subject: [PATCH] Add a new test to check for parsing bug; fix an existing test (#142) --- tests/tokenizer/templates.mwtest | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/tokenizer/templates.mwtest b/tests/tokenizer/templates.mwtest index 1913f5d..dccee37 100644 --- a/tests/tokenizer/templates.mwtest +++ b/tests/tokenizer/templates.mwtest @@ -222,6 +222,13 @@ output: [TemplateOpen(), TemplateOpen(), TemplateOpen(), TemplateOpen(), Text(te --- +name: nested_two_args +label: template whose first parameter is unnamed with two templates, followed by a named parameter +input: "{{a|{{b}}{{c}}|d=e}}" +output: [TemplateOpen(), Text(text="a"), TemplateParamSeparator(), TemplateOpen(), Text(text="b"), TemplateClose(), TemplateOpen(), Text(text="c"), TemplateClose(), TemplateParamSeparator(), Text(text="d"), TemplateParamEquals(), Text(text="e"), TemplateClose()] + +--- + name: newlines_start label: a newline at the start of a template name input: "{{\nfoobar}}" @@ -365,7 +372,7 @@ output: [TemplateOpen(), Text(text="\nfoo\n"), TemplateParamSeparator(), Text(te name: newlines_wildcard_redux_invalid label: a variation of the newlines_wildcard_redux test that is invalid input: "{{\nfoo\n|\n{{\nb\nar\n|\nb\naz\n=\nb\niz\n}}\n=\nb\nuzz\n}}" -output: [Text(text="{{\nfoo\n|\n{{\nb\nar\n|\nb\naz\n=\nb\niz\n}}\n=\nb\nuzz\n}}")] +output: [TemplateOpen(), Text(text="\nfoo\n"), TemplateParamSeparator(), Text(text="\n{{\nb\nar\n"), TemplateParamSeparator(), Text(text="\nb\naz\n"), TemplateParamEquals(), Text(text="\nb\niz\n"), TemplateClose(), Text(text="\n=\nb\nuzz\n}}")] ---