|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921 |
- name: no_params
- label: simplest type of template
- input: "{{template}}"
- output: [TemplateOpen(), Text(text="template"), TemplateClose()]
-
- ---
-
- name: one_param_unnamed
- label: basic template with one unnamed parameter
- input: "{{foo|bar}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="bar"), TemplateClose()]
-
- ---
-
- name: one_param_named
- label: basic template with one named parameter
- input: "{{foo|bar=baz}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="bar"), TemplateParamEquals(), Text(text="baz"), TemplateClose()]
-
- ---
-
- name: multiple_unnamed_params
- label: basic template with multiple unnamed parameters
- input: "{{foo|bar|baz|biz|buzz}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="bar"), TemplateParamSeparator(), Text(text="baz"), TemplateParamSeparator(), Text(text="biz"), TemplateParamSeparator(), Text(text="buzz"), TemplateClose()]
-
- ---
-
- name: multiple_named_params
- label: basic template with multiple named parameters
- input: "{{foo|bar=baz|biz=buzz|buff=baff|usr=bin}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="bar"), TemplateParamEquals(), Text(text="baz"), TemplateParamSeparator(), Text(text="biz"), TemplateParamEquals(), Text(text="buzz"), TemplateParamSeparator(), Text(text="buff"), TemplateParamEquals(), Text(text="baff"), TemplateParamSeparator(), Text(text="usr"), TemplateParamEquals(), Text(text="bin"), TemplateClose()]
-
- ---
-
- name: multiple_mixed_params
- label: basic template with multiple unnamed/named parameters
- input: "{{foo|bar=baz|biz|buzz=buff|usr|bin}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="bar"), TemplateParamEquals(), Text(text="baz"), TemplateParamSeparator(), Text(text="biz"), TemplateParamSeparator(), Text(text="buzz"), TemplateParamEquals(), Text(text="buff"), TemplateParamSeparator(), Text(text="usr"), TemplateParamSeparator(), Text(text="bin"), TemplateClose()]
-
- ---
-
- name: multiple_mixed_params2
- label: basic template with multiple unnamed/named parameters in another order
- input: "{{foo|bar|baz|biz=buzz|buff=baff|usr=bin}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="bar"), TemplateParamSeparator(), Text(text="baz"), TemplateParamSeparator(), Text(text="biz"), TemplateParamEquals(), Text(text="buzz"), TemplateParamSeparator(), Text(text="buff"), TemplateParamEquals(), Text(text="baff"), TemplateParamSeparator(), Text(text="usr"), TemplateParamEquals(), Text(text="bin"), TemplateClose()]
-
- ---
-
- name: nested_unnamed_param
- label: nested template as an unnamed parameter
- input: "{{foo|{{bar}}}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), TemplateOpen(), Text(text="bar"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_named_param_value
- label: nested template as a parameter value with a named parameter
- input: "{{foo|bar={{baz}}}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="bar"), TemplateParamEquals(), TemplateOpen(), Text(text="baz"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_named_param_name_and_value
- label: nested templates as a parameter name and value
- input: "{{foo|{{bar}}={{baz}}}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), TemplateOpen(), Text(text="bar"), TemplateClose(), TemplateParamEquals(), TemplateOpen(), Text(text="baz"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_name_start
- label: nested template at the beginning of a template name
- input: "{{{{foo}}bar}}"
- output: [TemplateOpen(), TemplateOpen(), Text(text="foo"), TemplateClose(), Text(text="bar"), TemplateClose()]
-
- ---
-
- name: nested_name_start_unnamed_param
- label: nested template at the beginning of a template name and as an unnamed parameter
- input: "{{{{foo}}bar|{{baz}}}}"
- output: [TemplateOpen(), TemplateOpen(), Text(text="foo"), TemplateClose(), Text(text="bar"), TemplateParamSeparator(), TemplateOpen(), Text(text="baz"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_name_start_named_param_value
- label: nested template at the beginning of a template name and as a parameter value with a named parameter
- input: "{{{{foo}}bar|baz={{biz}}}}"
- output: [TemplateOpen(), TemplateOpen(), Text(text="foo"), TemplateClose(), Text(text="bar"), TemplateParamSeparator(), Text(text="baz"), TemplateParamEquals(), TemplateOpen(), Text(text="biz"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_name_start_named_param_name_and_value
- label: nested template at the beginning of a template name and as a parameter name and value
- input: "{{{{foo}}bar|{{baz}}={{biz}}}}"
- output: [TemplateOpen(), TemplateOpen(), Text(text="foo"), TemplateClose(), Text(text="bar"), TemplateParamSeparator(), TemplateOpen(), Text(text="baz"), TemplateClose(), TemplateParamEquals(), TemplateOpen(), Text(text="biz"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_name_end
- label: nested template at the end of a template name
- input: "{{foo{{bar}}}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateOpen(), Text(text="bar"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_name_end_unnamed_param
- label: nested template at the end of a template name and as an unnamed parameter
- input: "{{foo{{bar}}|{{baz}}}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateOpen(), Text(text="bar"), TemplateClose(), TemplateParamSeparator(), TemplateOpen(), Text(text="baz"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_name_end_named_param_value
- label: nested template at the end of a template name and as a parameter value with a named parameter
- input: "{{foo{{bar}}|baz={{biz}}}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateOpen(), Text(text="bar"), TemplateClose(), TemplateParamSeparator(), Text(text="baz"), TemplateParamEquals(), TemplateOpen(), Text(text="biz"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_name_end_named_param_name_and_value
- label: nested template at the end of a template name and as a parameter name and value
- input: "{{foo{{bar}}|{{baz}}={{biz}}}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateOpen(), Text(text="bar"), TemplateClose(), TemplateParamSeparator(), TemplateOpen(), Text(text="baz"), TemplateClose(), TemplateParamEquals(), TemplateOpen(), Text(text="biz"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_name_mid
- label: nested template in the middle of a template name
- input: "{{foo{{bar}}baz}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateOpen(), Text(text="bar"), TemplateClose(), Text(text="baz"), TemplateClose()]
-
- ---
-
- name: nested_name_mid_unnamed_param
- label: nested template in the middle of a template name and as an unnamed parameter
- input: "{{foo{{bar}}baz|{{biz}}}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateOpen(), Text(text="bar"), TemplateClose(), Text(text="baz"), TemplateParamSeparator(), TemplateOpen(), Text(text="biz"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_name_mid_named_param_value
- label: nested template in the middle of a template name and as a parameter value with a named parameter
- input: "{{foo{{bar}}baz|biz={{buzz}}}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateOpen(), Text(text="bar"), TemplateClose(), Text(text="baz"), TemplateParamSeparator(), Text(text="biz"), TemplateParamEquals(), TemplateOpen(), Text(text="buzz"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_name_mid_named_param_name_and_value
- label: nested template in the middle of a template name and as a parameter name and value
- input: "{{foo{{bar}}baz|{{biz}}={{buzz}}}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateOpen(), Text(text="bar"), TemplateClose(), Text(text="baz"), TemplateParamSeparator(), TemplateOpen(), Text(text="biz"), TemplateClose(), TemplateParamEquals(), TemplateOpen(), Text(text="buzz"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_name_start_end
- label: nested template at the beginning and end of a template name
- input: "{{{{foo}}{{bar}}}}"
- output: [TemplateOpen(), TemplateOpen(), Text(text="foo"), TemplateClose(), TemplateOpen(), Text(text="bar"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_name_start_end_unnamed_param
- label: nested template at the beginning and end of a template name and as an unnamed parameter
- input: "{{{{foo}}{{bar}}|{{baz}}}}"
- output: [TemplateOpen(), TemplateOpen(), Text(text="foo"), TemplateClose(), TemplateOpen(), Text(text="bar"), TemplateClose(), TemplateParamSeparator(), TemplateOpen(), Text(text="baz"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_name_start_end_named_param_value
- label: nested template at the beginning and end of a template name and as a parameter value with a named parameter
- input: "{{{{foo}}{{bar}}|baz={{biz}}}}"
- output: [TemplateOpen(), TemplateOpen(), Text(text="foo"), TemplateClose(), TemplateOpen(), Text(text="bar"), TemplateClose(), TemplateParamSeparator(), Text(text="baz"), TemplateParamEquals(), TemplateOpen(), Text(text="biz"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_name_start_end_named_param_name_and_value
- label: nested template at the beginning and end of a template name and as a parameter name and value
- input: "{{{{foo}}{{bar}}|{{baz}}={{biz}}}}"
- output: [TemplateOpen(), TemplateOpen(), Text(text="foo"), TemplateClose(), TemplateOpen(), Text(text="bar"), TemplateClose(), TemplateParamSeparator(), TemplateOpen(), Text(text="baz"), TemplateClose(), TemplateParamEquals(), TemplateOpen(), Text(text="biz"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_names_multiple
- label: multiple nested templates within nested templates
- input: "{{{{{{{{foo}}bar}}baz}}biz}}"
- output: [TemplateOpen(), TemplateOpen(), TemplateOpen(), TemplateOpen(), Text(text="foo"), TemplateClose(), Text(text="bar"), TemplateClose(), Text(text="baz"), TemplateClose(), Text(text="biz"), TemplateClose()]
-
- ---
-
- name: nested_names_multiple_unnamed_param
- label: multiple nested templates within nested templates with a nested unnamed parameter
- input: "{{{{{{{{foo}}bar}}baz}}biz|{{buzz}}}}"
- output: [TemplateOpen(), TemplateOpen(), TemplateOpen(), TemplateOpen(), Text(text="foo"), TemplateClose(), Text(text="bar"), TemplateClose(), Text(text="baz"), TemplateClose(), Text(text="biz"), TemplateParamSeparator(), TemplateOpen(), Text(text="buzz"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_names_multiple_named_param_value
- label: multiple nested templates within nested templates with a nested parameter value in a named parameter
- input: "{{{{{{{{foo}}bar}}baz}}biz|buzz={{bin}}}}"
- output: [TemplateOpen(), TemplateOpen(), TemplateOpen(), TemplateOpen(), Text(text="foo"), TemplateClose(), Text(text="bar"), TemplateClose(), Text(text="baz"), TemplateClose(), Text(text="biz"), TemplateParamSeparator(), Text(text="buzz"), TemplateParamEquals(), TemplateOpen(), Text(text="bin"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: nested_names_multiple_named_param_name_and_value
- label: multiple nested templates within nested templates with a nested parameter name and value
- input: "{{{{{{{{foo}}bar}}baz}}biz|{{buzz}}={{bin}}}}"
- output: [TemplateOpen(), TemplateOpen(), TemplateOpen(), TemplateOpen(), Text(text="foo"), TemplateClose(), Text(text="bar"), TemplateClose(), Text(text="baz"), TemplateClose(), Text(text="biz"), TemplateParamSeparator(), TemplateOpen(), Text(text="buzz"), TemplateClose(), TemplateParamEquals(), TemplateOpen(), Text(text="bin"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: mixed_nested_templates
- label: mixed assortment of nested templates within template names, parameter names, and values
- input: "{{{{{{{{foo}}bar|baz=biz}}buzz}}usr|{{bin}}}}"
- output: [TemplateOpen(), TemplateOpen(), TemplateOpen(), TemplateOpen(), Text(text="foo"), TemplateClose(), Text(text="bar"), TemplateParamSeparator(), Text(text="baz"), TemplateParamEquals(), Text(text="biz"), TemplateClose(), Text(text="buzz"), TemplateClose(), Text(text="usr"), TemplateParamSeparator(), TemplateOpen(), Text(text="bin"), TemplateClose(), TemplateClose()]
-
- ---
-
- name: newline_start
- label: a newline at the start of a template name
- input: "{{\nfoobar}}"
- output: [TemplateOpen(), Text(text="\nfoobar"), TemplateClose()]
-
- ---
-
- name: newline_end
- label: a newline at the end of a template name
- input: "{{foobar\n}}"
- output: [TemplateOpen(), Text(text="foobar\n"), TemplateClose()]
-
- ---
-
- name: newline_start_end
- label: a newline at the start and end of a template name
- input: "{{\nfoobar\n}}"
- output: [TemplateOpen(), Text(text="\nfoobar\n"), TemplateClose()]
-
- ---
-
- name: newline_mid
- label: a newline at the middle of a template name
- input: "{{foo\nbar}}"
- output: [Text(text="{{foo\nbar}}")]
-
- ---
-
- name: newline_start_mid
- label: a newline at the start and middle of a template name
- input: "{{\nfoo\nbar}}"
- output: [Text(text="{{\nfoo\nbar}}")]
-
- ---
-
- name: newline_mid_end
- label: a newline at the middle and end of a template name
- input: "{{foo\nbar\n}}"
- output: [Text(text="{{foo\nbar\n}}")]
-
- ---
-
- name: newline_start_mid_end
- label: a newline at the start, middle, and end of a template name
- input: "{{\nfoo\nbar\n}}"
- output: [Text(text="{{\nfoo\nbar\n}}")]
-
- ---
-
- name: newline_unnamed_param_start
- label: a newline at the start of an unnamed template parameter
- input: "{{foo|\nbar}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="\nbar"), TemplateClose()]
-
- ---
-
- name: newline_unnamed_param_end
- label: a newline at the end of an unnamed template parameter
- input: "{{foo|bar\n}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="bar\n"), TemplateClose()]
-
- ---
-
- name: newline_unnamed_param_start_end
- label: a newline at the start and end of an unnamed template parameter
- input: "{{foo|\nbar\n}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="\nbar\n"), TemplateClose()]
-
- ---
-
- name: newline_unnamed_param_start_mid
- label: a newline at the start and middle of an unnamed template parameter
- input: "{{foo|\nb\nar}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="\nb\nar"), TemplateClose()]
-
- ---
-
- name: newline_unnamed_param_mid_end
- label: a newline at the middle and end of an unnamed template parameter
- input: "{{foo|b\nar\n}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="b\nar\n"), TemplateClose()]
-
- ---
-
- name: newline_unnamed_param_start_mid_end
- label: a newline at the start, middle, and end of an unnamed template parameter
- input: "{{foo|\nb\nar\n}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="\nb\nar\n"), TemplateClose()]
-
- ---
-
- name: newline_start_unnamed_param_start
- label: a newline at the start of a template name and at the start of an unnamed template parameter
- input: "{{\nfoo|\nbar}}"
- output: [TemplateOpen(), Text(text="\nfoo"), TemplateParamSeparator(), Text(text="\nbar"), TemplateClose()]
-
- ---
-
- name: newline_start_unnamed_param_end
- label: a newline at the start of a template name and at the end of an unnamed template parameter
- input: "{{\nfoo|bar\n}}"
- output: [TemplateOpen(), Text(text="\nfoo"), TemplateParamSeparator(), Text(text="bar\n"), TemplateClose()]
-
- ---
-
- name: newline_start_unnamed_param_start_end
- label: a newline at the start of a template name and at the start and end of an unnamed template parameter
- input: "{{\nfoo|\nbar\n}}"
- output: [TemplateOpen(), Text(text="\nfoo"), TemplateParamSeparator(), Text(text="\nbar\n"), TemplateClose()]
-
- ---
-
- name: newline_start_unnamed_param_start_mid
- label: a newline at the start of a template name and at the start and middle of an unnamed template parameter
- input: "{{\nfoo|\nb\nar}}"
- output: [TemplateOpen(), Text(text="\nfoo"), TemplateParamSeparator(), Text(text="\nb\nar"), TemplateClose()]
-
- ---
-
- name: newline_start_unnamed_param_mid_end
- label: a newline at the start of a template name and at the middle and end of an unnamed template parameter
- input: "{{\nfoo|b\nar\n}}"
- output: [TemplateOpen(), Text(text="\nfoo"), TemplateParamSeparator(), Text(text="b\nar\n"), TemplateClose()]
-
- ---
-
- name: newline_start_unnamed_param_start_mid_end
- label: a newline at the start of a template name and at the start, middle, and end of an unnamed template parameter
- input: "{{\nfoo|\nb\nar\n}}"
- output: [TemplateOpen(), Text(text="\nfoo"), TemplateParamSeparator(), Text(text="\nb\nar\n"), TemplateClose()]
-
- ---
-
- name: newline_end_unnamed_param_start
- label: a newline at the end of a template name and at the start of an unnamed template parameter
- input: "{{foo\n|\nbar}}"
- output: [TemplateOpen(), Text(text="foo\n"), TemplateParamSeparator(), Text(text="\nbar"), TemplateClose()]
-
- ---
-
- name: newline_end_unnamed_param_end
- label: a newline at the end of a template name and at the end of an unnamed template parameter
- input: "{{foo\n|bar\n}}"
- output: [TemplateOpen(), Text(text="foo\n"), TemplateParamSeparator(), Text(text="bar\n"), TemplateClose()]
-
- ---
-
- name: newline_end_unnamed_param_start_end
- label: a newline at the end of a template name and at the start and end of an unnamed template parameter
- input: "{{foo\n|\nbar\n}}"
- output: [TemplateOpen(), Text(text="foo\n"), TemplateParamSeparator(), Text(text="\nbar\n"), TemplateClose()]
-
- ---
-
- name: newline_end_unnamed_param_start_mid
- label: a newline at the end of a template name and at the start and middle of an unnamed template parameter
- input: "{{foo\n|\nb\nar}}"
- output: [TemplateOpen(), Text(text="foo\n"), TemplateParamSeparator(), Text(text="\nb\nar"), TemplateClose()]
-
- ---
-
- name: newline_end_unnamed_param_mid_end
- label: a newline at the end of a template name and at the middle and end of an unnamed template parameter
- input: "{{foo\n|b\nar\n}}"
- output: [TemplateOpen(), Text(text="foo\n"), TemplateParamSeparator(), Text(text="b\nar\n"), TemplateClose()]
-
- ---
-
- name: newline_end_unnamed_param_start_mid_end
- label: a newline at the end of a template name and at the start, middle, and end of an unnamed template parameter
- input: "{{foo\n|\nb\nar\n}}"
- output: [TemplateOpen(), Text(text="foo\n"), TemplateParamSeparator(), Text(text="\nb\nar\n"), TemplateClose()]
-
- ---
-
- name: newline_start_end_unnamed_param_end
- label: a newline at the start and end of a template name and the start of an unnamed template parameter
- input: "{{\nfoo\n|\nbar}}"
- output: [TemplateOpen(), Text(text="\nfoo\n"), TemplateParamSeparator(), Text(text="\nbar"), TemplateClose()]
-
- ---
-
- name: newline_start_end_unnamed_param_end
- label: a newline at the start and end of a template name and the end of an unnamed template parameter
- input: "{{\nfoo\n|bar\n}}"
- output: [TemplateOpen(), Text(text="\nfoo\n"), TemplateParamSeparator(), Text(text="bar\n"), TemplateClose()]
-
- ---
-
- name: newline_start_end_unnamed_param_start_end
- label: a newline at the start and end of a template name and the start and end of an unnamed template parameter
- input: "{{\nfoo\n|\nbar\n}}"
- output: [TemplateOpen(), Text(text="\nfoo\n"), TemplateParamSeparator(), Text(text="\nbar\n"), TemplateClose()]
-
- ---
-
- name: newline_start_end_unnamed_param_start_mid
- label: a newline at the start and end of a template name and the start and middle of an unnamed template parameter
- input: "{{\nfoo\n|\nb\nar}}"
- output: [TemplateOpen(), Text(text="\nfoo\n"), TemplateParamSeparator(), Text(text="\nb\nar"), TemplateClose()]
-
- ---
-
- name: newline_start_end_unnamed_param_mid_end
- label: a newline at the start and end of a template name and the middle and end of an unnamed template parameter
- input: "{{\nfoo\n|b\nar\n}}"
- output: [TemplateOpen(), Text(text="\nfoo\n"), TemplateParamSeparator(), Text(text="b\nar\n"), TemplateClose()]
-
- ---
-
- name: newline_start_end_unnamed_param_start_mid_end
- label: a newline at the start and end of a template name and the start, middle, and end of an unnamed template parameter
- input: "{{\nfoo\n|\nb\nar\n}}"
- output: [TemplateOpen(), Text(text="\nfoo\n"), TemplateParamSeparator(), Text(text="\nb\nar\n"), TemplateClose()]
-
- ---
-
- name: newline_mid_unnamed_param_start
- label: a newline at the middle of a template name and at the start of an unnamed template parameter
- input: "{{f\noo|\nbar}}"
- output: [Text(text="{{f\noo|\nbar}}")]
-
- ---
-
- name: newline_start_mid_unnamed_param_start
- label: a newline at the start and middle of a template name and at the start of an unnamed template parameter
- input: "{{\nf\noo|\nbar}}"
- output: [Text(text="{{\nf\noo|\nbar}}")]
-
- ---
-
- name: newline_start_end_unnamed_param_start
- label: a newline at the middle and of a template name and at the start of an unnamed template parameter
- input: "{{f\noo\n|\nbar}}"
- output: [Text(text="{{f\noo\n|\nbar}}")]
-
- ---
-
- name: newline_start_mid_end_unnamed_param_start
- label: a newline at the start, middle, and end of a template name and at the start of an unnamed template parameter
- input: "{{\nf\noo\n|\nbar}}"
- output: [Text(text="{{\nf\noo\n|\nbar}}")]
-
- ---
-
- name: newline_named_param_value_start
- label: a newline at the start of a named parameter value
- input: "{{foo|1=\nbar}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="1"), TemplateParamEquals(), Text(text="\nbar"), TemplateClose()]
-
- ---
-
- name: newline_named_param_value_end
- label: a newline at the end of a named parameter value
- input: "{{foo|1=bar\n}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="1"), TemplateParamEquals(), Text(text="bar\n"), TemplateClose()]
-
- ---
-
- name: newline_named_param_value_start_end
- label: a newline at the start and end of a named parameter value
- input: "{{foo|1=\nbar\n}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="1"), TemplateParamEquals(), Text(text="\nbar\n"), TemplateClose()]
-
- ---
-
- name: newline_named_param_value_start_mid
- label: a newline at the start and middle of a named parameter value
- input: "{{foo|1=\nb\nar}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="1"), TemplateParamEquals(), Text(text="\nb\nar"), TemplateClose()]
-
- ---
-
- name: newline_named_param_value_mid_end
- label: a newline at the middle and end of a named parameter value
- input: "{{foo|1=b\nar\n}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="1"), TemplateParamEquals(), Text(text="b\nar\n"), TemplateClose()]
-
- ---
-
- name: newline_named_param_value_start_mid_end
- label: a newline at the start, middle, and end of a named parameter value
- input: "{{foo|1=\nb\nar\n}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="1"), TemplateParamEquals(), Text(text="\nb\nar\n"), TemplateClose()]
-
- ---
-
- name: newline_named_param_name_start
- label: a newline at the start of a parameter name
- input: "{{foo|\nbar=baz}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="\nbar"), TemplateParamEquals(), Text(text="baz"), TemplateClose()]
-
- ---
-
- name: newline_named_param_name_end
- label: a newline at the end of a parameter name
- input: "{{foo|bar\n=baz}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="bar\n"), TemplateParamEquals(), Text(text="baz"), TemplateClose()]
-
- ---
-
- name: newline_named_param_name_start_end
- label: a newline at the start and end of a parameter name
- input: "{{foo|\nbar\n=baz}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="\nbar\n"), TemplateParamEquals(), Text(text="baz"), TemplateClose()]
-
- ---
-
- name: newline_named_param_name_mid
- label: a newline at the middle of a parameter name
- input: "{{foo|b\nar=baz}}"
- output: [Text(text="{{foo|b\nar=baz}}")]
-
- ---
-
- name: newline_named_param_name_start_mid
- label: a newline at the start and middle of a parameter name
- input: "{{foo|\nb\nar=baz}}"
- output: [Text(text="{{foo|\nb\nar=baz}}")]
-
- ---
-
- name: newline_named_param_name_mid_end
- label: a newline at the middle and end of a parameter name
- input: "{{foo|b\nar\n=baz}}"
- output: [Text(text="{{foo|b\nar\n=baz}}")]
-
- ---
-
- name: newline_named_param_name_start_mid_end
- label: a newline at the start, middle, and end of a parameter name
- input: "{{foo|\nb\nar\n=baz}}"
- output: [Text(text="{{foo|\nb\nar\n=baz}}")]
-
- ---
-
- name: newline_named_param_name_start_param_value_end
- label: a newline at the start of a parameter name and the end of a parameter value
- input: "{{foo|\nbar=baz\n}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="\nbar"), TemplateParamEquals(), Text(text="baz\n"), TemplateClose()]
-
- ---
-
- name: newline_named_param_name_end_param_value_end
- label: a newline at the end of a parameter name and the end of a parameter value
- input: "{{foo|bar\n=baz\n}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="bar\n"), TemplateParamEquals(), Text(text="baz\n"), TemplateClose()]
-
- ---
-
- name: newline_named_param_name_start_end_param_value_end
- label: a newline at the start and end of a parameter name and the end of a parameter value
- input: "{{foo|\nbar\n=baz\n}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="\nbar\n"), TemplateParamEquals(), Text(text="baz\n"), TemplateClose()]
-
- ---
-
- name: newline_named_param_name_start_mid_param_value_end
- label: a newline at the start and middle of a parameter name and the end of a parameter value
- input: "{{foo|\nb\nar=baz\n}}"
- output: [Text(text="{{foo|\nb\nar=baz\n}}")]
-
- ---
-
- name: newline_named_param_name_mid_end_param_value_end
- label: a newline at the middle and end of a parameter name and the end of a parameter value
- input: "{{foo|b\nar\n=baz\n}}"
- output: [Text(text="{{foo|b\nar\n=baz\n}}")]
-
- ---
-
- name: newline_named_param_name_start_mid_end_param_value_end
- label: a newline at the start, middle, and end of a parameter name and at the end of a parameter value
- input: "{{foo|\nb\nar\n=baz\n}}"
- output: [Text(text="{{foo|\nb\nar\n=baz\n}}")]
-
- ---
-
- name: newline_named_param_name_start_param_value_start
- label: a newline at the start of a parameter name and at the start of a parameter value
- input: "{{foo|\nbar=\nbaz}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="\nbar"), TemplateParamEquals(), Text(text="\nbaz"), TemplateClose()]
-
- ---
-
- name: newline_named_param_name_end_param_value_start
- label: a newline at the end of a parameter name and at the start of a parameter value
- input: "{{foo|bar\n=\nbaz}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="bar\n"), TemplateParamEquals(), Text(text="\nbaz"), TemplateClose()]
-
- ---
-
- name: newline_named_param_name_start_end_param_value_start
- label: a newline at the start and end of a parameter name and at the start of a parameter value
- input: "{{foo|\nbar\n=\nbaz}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="\nbar\n"), TemplateParamEquals(), Text(text="\nbaz"), TemplateClose()]
-
- ---
-
- name: newline_named_param_name_start_mid_param_value_start
- label: a newline at the start and middle of a parameter name and at the start of a parameter value
- input: "{{foo|\nb\nar=\nbaz}}"
- output: [Text(text="{{foo|\nb\nar=\nbaz}}")]
-
- ---
-
- name: newline_named_param_name_mid_end_param_value_start
- label: a newline at the middle and end of a parameter name and at the start of a parameter value
- input: "{{foo|b\nar\n=\nbaz}}"
- output: [Text(text="{{foo|b\nar\n=\nbaz}}")]
-
- ---
-
- name: newline_named_param_name_start_mid_end_param_value_start
- label: a newline at the start, middle, and end of a parameter name and at the start of a parameter value
- input: "{{foo|\nb\nar\n=\nbaz}}"
- output: [Text(text="{{foo|\nb\nar\n=\nbaz}}")]
-
- ---
-
- name: newline_named_param_name_start_param_value_start_end
- label: a newline at the start of a parameter name and at the start and end of a parameter value
- input: "{{foo|\nbar=\nbaz\n}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="\nbar"), TemplateParamEquals(), Text(text="\nbaz\n"), TemplateClose()]
-
- ---
-
- name: newline_named_param_name_end_param_value_start_end
- label: a newline at the end of a parameter name and at the start and end of a parameter value
- input: "{{foo|bar\n=\nbaz\n}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="bar\n"), TemplateParamEquals(), Text(text="\nbaz\n"), TemplateClose()]
-
- ---
-
- name: newline_named_param_name_start_end_param_value_start_end
- label: a newline at the start and end of a parameter name and at the start and end of a parameter value
- input: "{{foo|\nbar\n=\nbaz\n}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="\nbar\n"), TemplateParamEquals(), Text(text="\nbaz\n"), TemplateClose()]
-
- ---
-
- name: newline_named_param_name_start_mid_param_value_start_end
- label: a newline at the start and middle of a parameter name and at the start and end of a parameter value
- input: "{{foo|\nb\nar=\nbaz\n}}"
- output: [Text(text="{{foo|\nb\nar=\nbaz\n}}")]
-
- ---
-
- name: newline_named_param_name_mid_end_param_value_start_end
- label: a newline at the middle and end of a parameter name and at the start and end of a parameter value
- input: "{{foo|b\nar\n=\nbaz\n}}"
- output: [Text(text="{{foo|b\nar\n=\nbaz\n}}")]
-
- ---
-
- name: newline_named_param_name_start_mid_end_param_value_start_end
- label: a newline at the start, middle, and end of a parameter name and at the start and end of a parameter value
- input: "{{foo|\nb\nar\n=\nbaz\n}}"
- output: [Text(text="{{foo|\nb\nar\n=\nbaz\n}}")]
-
- ---
-
- name: newline_named_param_name_start_param_value_mid
- label: a newline at the start of a parameter name and at the middle of a parameter value
- input: "{{foo|\nbar=ba\nz}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="\nbar"), TemplateParamEquals(), Text(text="ba\nz"), TemplateClose()]
-
- ---
-
- name: newline_named_param_name_end_param_value_mid
- label: a newline at the end of a parameter name and at the middle of a parameter value
- input: "{{foo|bar\n=ba\nz}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="bar\n"), TemplateParamEquals(), Text(text="ba\nz"), TemplateClose()]
-
- ---
-
- name: newline_named_param_name_start_end_param_value_mid
- label: a newline at the start and end of a parameter name and at the middle of a parameter value
- input: "{{foo|\nbar\n=ba\nz}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="\nbar\n"), TemplateParamEquals(), Text(text="ba\nz"), TemplateClose()]
-
- ---
-
- name: newline_named_param_name_start_mid_param_value_mid
- label: a newline at the start and middle of a parameter name and at the middle of a parameter value
- input: "{{foo|\nb\nar=ba\nz}}"
- output: [Text(text="{{foo|\nb\nar=ba\nz}}")]
-
- ---
-
- name: newline_named_param_name_mid_end_param_value_mid
- label: a newline at the middle and end of a parameter name and at the middle of a parameter value
- input: "{{foo|b\nar\n=ba\nz}}"
- output: [Text(text="{{foo|b\nar\n=ba\nz}}")]
-
- ---
-
- name: newline_named_param_start_mid_end_param_value_mid
- label: a newline at the start, middle, and end of a parameter name and at the middle of a parameter value
- input: "{{foo|\nb\nar\n=ba\nz}}"
- output: [Text(text="{{foo|\nb\nar\n=ba\nz}}")]
-
- ---
-
- name: newline_wildcard
- label: a random, complex assortment of templates and newlines
- input: "{{\nfoo\n|\nbar\n=\nb\naz\n|\nb\nuz\n}}"
- output: [TemplateOpen(), Text(text="\nfoo\n"), TemplateParamSeparator(), Text(text="\nbar\n"), TemplateParamEquals(), Text(text="\nb\naz\n"), TemplateParamSeparator(), Text(text="\nb\nuz\n"), TemplateClose()]
-
- ---
-
- name: newline_wildcard_redux
- label: an even more random and complex assortment of templates and newlines
- input: "{{\nfoo\n|\n{{\nbar\n|\nbaz\n=\nb\niz\n}}\n=\nb\nuzz\n}}"
- output: [TemplateOpen(), Text(text="\nfoo\n"), TemplateParamSeparator(), Text(text="\n"), TemplateOpen(), Text(text="\nbar\n"), TemplateParamSeparator(), Text(text="\nbaz\n"), TemplateParamEquals(), Text(text="\nb\niz\n"), TemplateClose(), Text(text="\n"), TemplateParamEquals(), Text(text="\nb\nuzz\n"), TemplateClose()]
-
- ---
-
- name: invalid_name_left_brace_middle
- label: invalid characters in template name: left brace in middle
- input: "{{foo{bar}}"
- output: [Text(text="{{foo{bar}}")]
-
- ---
-
- name: invalid_name_right_brace_middle
- label: invalid characters in template name: right brace in middle
- input: "{{foo}bar}}"
- output: [Text(text="{{foo}bar}}")]
-
- ---
-
- name: invalid_name_left_braces
- label: invalid characters in template name: two left braces in middle
- input: "{{foo{b{ar}}"
- output: [Text(text="{{foo{b{ar}}")]
-
- ---
-
- name: invalid_name_left_bracket_middle
- label: invalid characters in template name: left bracket in middle
- input: "{{foo[bar}}"
- output: [Text(text="{{foo[bar}}")]
-
- ---
-
- name: invalid_name_right_bracket_middle
- label: invalid characters in template name: right bracket in middle
- input: "{{foo]bar}}"
- output: [Text(text="{{foo]bar}}")]
-
- ---
-
- name: invalid_name_left_bracket_start
- label: invalid characters in template name: left bracket at start
- input: "{{[foobar}}"
- output: [Text(text="{{[foobar}}")]
-
- ---
-
- name: invalid_name_right_bracket_start
- label: invalid characters in template name: right bracket at end
- input: "{{foobar]}}"
- output: [Text(text="{{foobar]}}")]
-
- ---
-
- name: valid_name_left_brace_start
- label: valid characters in template name: left brace at start
- input: "{{{foobar}}"
- output: [Text(text="{"), TemplateOpen(), Text(text="foobar"), TemplateClose()]
-
- ---
-
- name: valid_unnamed_param_left_brace
- label: valid characters in unnamed template parameter: left brace
- input: "{{foo|ba{r}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="ba{r"), TemplateClose()]
-
- ---
-
- name: valid_unnamed_param_braces
- label: valid characters in unnamed template parameter: left and right braces
- input: "{{foo|ba{r}}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="ba{r"), TemplateClose(), Text(text="}")]
-
- ---
-
- name: valid_param_name_braces
- label: valid characters in template parameter name: left and right braces
- input: "{{foo|ba{r}=baz}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="ba{r}"), TemplateParamEquals(), Text(text="baz"), TemplateClose()]
-
- ---
-
- name: valid_param_name_brackets
- label: valid characters in unnamed template parameter: left and right brackets
- input: "{{foo|ba[r]}}"
- output: [TemplateOpen(), Text(text="foo"), TemplateParamSeparator(), Text(text="ba[r]"), TemplateClose()]
-
- ---
-
- name: incomplete_plain
- label: incomplete templates that should fail gracefully: no close whatsoever
- input: "{{stuff}} {{foobar"
- output: [TemplateOpen(), Text(text="stuff"), TemplateClose(), Text(text=" {{foobar")]
-
- ---
-
- name: incomplete_right_brace
- label: incomplete templates that should fail gracefully: only one right brace
- input: "{{stuff}} {{foobar}"
- output: [TemplateOpen(), Text(text="stuff"), TemplateClose(), Text(text=" {{foobar}")]
-
- ---
-
- name: incomplete_pipe
- label: incomplete templates that should fail gracefully: a pipe
- input: "{{stuff}} {{foobar|"
- output: [TemplateOpen(), Text(text="stuff"), TemplateClose(), Text(text=" {{foobar|")]
-
- ---
-
- name: incomplete_unnamed_param
- label: incomplete templates that should fail gracefully: an unnamed parameter
- input: "{{stuff}} {{foo|bar"
- output: [TemplateOpen(), Text(text="stuff"), TemplateClose(), Text(text=" {{foo|bar")]
-
- ---
-
- name: incomplete_unnamed_param_pipe
- label: incomplete templates that should fail gracefully: an unnamed parameter, then a pipe
- input: "{{stuff}} {{foo|bar|"
- output: [TemplateOpen(), Text(text="stuff"), TemplateClose(), Text(text=" {{foo|bar|")]
-
- ---
-
- name: incomplete_valueless_param
- label: incomplete templates that should fail gracefully: an a named parameter with no value
- input: "{{stuff}} {{foo|bar="
- output: [TemplateOpen(), Text(text="stuff"), TemplateClose(), Text(text=" {{foo|bar=")]
-
- ---
-
- name: incomplete_valueless_param_pipe
- label: incomplete templates that should fail gracefully: a named parameter with no value, then a pipe
- input: "{{stuff}} {{foo|bar=|"
- output: [TemplateOpen(), Text(text="stuff"), TemplateClose(), Text(text=" {{foo|bar=|")]
-
- ---
-
- name: incomplete_named_param
- label: incomplete templates that should fail gracefully: a named parameter with a value
- input: "{{stuff}} {{foo|bar=baz"
- output: [TemplateOpen(), Text(text="stuff"), TemplateClose(), Text(text=" {{foo|bar=baz")]
-
- ---
-
- name: incomplete_named_param_pipe
- label: incomplete templates that should fail gracefully: a named parameter with a value, then a paipe
- input: "{{stuff}} {{foo|bar=baz|"
- output: [TemplateOpen(), Text(text="stuff"), TemplateClose(), Text(text=" {{foo|bar=baz|")]
-
- ---
-
- name: incomplete_two_unnamed_params
- label: incomplete templates that should fail gracefully: two unnamed parameters
- input: "{{stuff}} {{foo|bar|baz"
- output: [TemplateOpen(), Text(text="stuff"), TemplateClose(), Text(text=" {{foo|bar|baz")]
-
- ---
-
- name: incomplete_unnamed_param_valueless_param
- label: incomplete templates that should fail gracefully: an unnamed parameter, then a named parameter with no value
- input: "{{stuff}} {{foo|bar|baz="
- output: [TemplateOpen(), Text(text="stuff"), TemplateClose(), Text(text=" {{foo|bar|baz=")]
-
- ---
-
- name: incomplete_unnamed_param_named_param
- label: incomplete templates that should fail gracefully: an unnamed parameter, then a named parameter with a value
- input: "{{stuff}} {{foo|bar|baz=biz"
- output: [TemplateOpen(), Text(text="stuff"), TemplateClose(), Text(text=" {{foo|bar|baz=biz")]
-
- ---
-
- name: incomplete_named_param_unnamed_param
- label: incomplete templates that should fail gracefully: a named parameter with a value, then an unnamed parameter
- input: "{{stuff}} {{foo|bar=baz|biz"
- output: [TemplateOpen(), Text(text="stuff"), TemplateClose(), Text(text=" {{foo|bar=baz|biz")]
-
- ---
-
- name: incomplete_named_param_valueless_param
- label: incomplete templates that should fail gracefully: a named parameter with a value, then a named parameter with no value
- input: "{{stuff}} {{foo|bar=baz|biz="
- output: [TemplateOpen(), Text(text="stuff"), TemplateClose(), Text(text=" {{foo|bar=baz|biz=")]
-
- ---
-
- name: incomplete_two_named_params
- label: incomplete templates that should fail gracefully: two named parameters with values
- input: "{{stuff}} {{foo|bar=baz|biz=buzz"
- output: [TemplateOpen(), Text(text="stuff"), TemplateClose(), Text(text=" {{foo|bar=baz|biz=buzz")]
|