qt-mustache
qt-mustache copied to clipboard
Fix spec conformance tests
Instead of many small issues, I'm creating this single issue with a task list.
These are the current test failures. Many of them are related to the handling of standalone tags and will be fixed in one fell swoop.
comments.json
- [ ] Standalone
Actual (output) :"Begin.\n\nEnd.\n"
Expected (expected):"Begin.\nEnd.\n" - [ ] Indented Standalone
Actual (output) :"Begin.\n \nEnd.\n"
Expected (expected):"Begin.\nEnd.\n" - [ ] Standalone Line Endings
Actual (output) :"|\r\n\r\n|"
Expected (expected):"|\r\n|" - [ ] Standalone Without Previous Line
Actual (output) :" \n!"
Expected (expected):"!" - [ ] Standalone Without Newline
Actual (output) :"!\n "
Expected (expected):"!\n" - [ ] Multiline Standalone
Actual (output) :"Begin.\n\nEnd.\n"
Expected (expected):"Begin.\nEnd.\n" - [ ] Indented Multiline Standalone
Actual (output) :"Begin.\n \nEnd.\n"
Expected (expected):"Begin.\nEnd.\n"
delimiters.json
- [ ] Sections
Actual (output) :"[\n\n I got interpolated.\n |data|\n\n\n\n\n {{data}}\n I got interpolated.\n\n]\n"
Expected (expected):"[\n I got interpolated.\n |data|\n\n {{data}}\n I got interpolated.\n]\n" - [ ] Inverted Sections
Actual (output) :"[\n\n I got interpolated.\n |data|\n\n\n\n\n {{data}}\n I got interpolated.\n\n]\n"
Expected (expected):"[\n I got interpolated.\n |data|\n\n {{data}}\n I got interpolated.\n]\n" - [ ] Partial Inheritence
Actual (output) :"[ .yes. ]\n\n[ .{{value}}. ]\n"
Expected (expected):"[ .yes. ]\n[ .yes. ]\n" - [x] Post-Partial Behavior
Actual (output) :"[ .yes. .yes. ]\n[ .{{value}}. .yes. ]\n"
Expected (expected):"[ .yes. .yes. ]\n[ .yes. .|value|. ]\n" - [ ] Standalone Tag
Actual (output) :"Begin.\n\nEnd.\n"
Expected (expected):"Begin.\nEnd.\n" - [ ] Indented Standalone Tag
Actual (output) :"Begin.\n \nEnd.\n"
Expected (expected):"Begin.\nEnd.\n" - [ ] Standalone Line Endings
Actual (output) :"|\r\n\r\n|"
Expected (expected):"|\r\n|" - [ ] Standalone Without Previous Line
Actual (output) :" \n="
Expected (expected):"=" - [ ] Standalone Without Newline
Actual (output) :"=\n "
Expected (expected):"=\n"
interpolation.json
- [ ] Dotted Names - Basic Interpolation
Actual (output) :""" == """
Expected (expected):""Joe" == "Joe"" - [ ] Dotted Names - Triple Mustache Interpolation
Actual (output) :""" == """
Expected (expected):""Joe" == "Joe"" - [ ] Dotted Names - Ampersand Interpolation
Actual (output) :""" == """
Expected (expected):""Joe" == "Joe"" - [ ] Dotted Names - Arbitrary Depth
Actual (output) :""" == "Phil""
Expected (expected):""Phil" == "Phil"" - [ ] Dotted Names - Initial Resolution
Actual (output) :""" == "Phil""
Expected (expected):""Phil" == "Phil""
inverted.json
- [x] Context
Actual (output) :""Hi .""
Expected (expected):"""" - [ ] Doubled
Actual (output) :"\n* first\n\n* second\n\n* third\n\n"
Expected (expected):"* first\n* second\n* third\n" - [ ] Dotted Names - Truthy
Actual (output) :""Not Here" == """
Expected (expected):""" == """ - [ ] Standalone Lines
Actual (output) :"| This Is\n\n|\n\n| A Line\n"
Expected (expected):"| This Is\n|\n| A Line\n" - [ ] Standalone Indented Lines
Actual (output) :"| This Is\n \n|\n \n| A Line\n"
Expected (expected):"| This Is\n|\n| A Line\n" - [ ] Standalone Line Endings
Actual (output) :"|\r\n\r\n\r\n|"
Expected (expected):"|\r\n|" - [ ] Standalone Without Previous Line
Actual (output) :" \n^\n/"
Expected (expected):"^\n/" - [ ] Standalone Without Newline
Actual (output) :"^\n/\n "
Expected (expected):"^\n/\n"
partials.json
- [ ] Standalone Line Endings
Actual (output) :"|\r\n>\r\n|"
Expected (expected):"|\r\n>|" - [ ] Standalone Without Previous Line
Actual (output) :" >\n>\n>"
Expected (expected):" >\n >>" - [ ] Standalone Without Newline
Actual (output) :">\n >\n>"
Expected (expected):">\n >\n >" - [ ] Standalone Indentation
Actual (output) :"\\\n |\n<\n->\n|\n\n/\n"
Expected (expected):"\\\n |\n <\n->\n |\n/\n"
sections.json
- [x] Context
Actual (output) :""""
Expected (expected):""Hi Joe."" - [ ] Deeply Nested Contexts
Actual (output) :"\n1\n\n121\n\n12321\n\n1234321\n\n123454321\n\n1234321\n\n12321\n\n121\n\n1\n\n"
Expected (expected):"1\n121\n12321\n1234321\n123454321\n1234321\n12321\n121\n1\n" - [ ] Doubled
Actual (output) :"\n* first\n\n* second\n\n* third\n\n"
Expected (expected):"* first\n* second\n* third\n" - [ ] Implicit Iterator - String
Actual (output) :""()()()()()""
Expected (expected):""(a)(b)(c)(d)(e)"" - [ ] Implicit Iterator - Integer
Actual (output) :""()()()()()""
Expected (expected):""(1)(2)(3)(4)(5)"" - [ ] Implicit Iterator - Decimal
Actual (output) :""()()()()()""
Expected (expected):""(1.1)(2.2)(3.3)(4.4)(5.5)"" - [ ] Dotted Names - Truthy
Actual (output) :""" == "Here""
Expected (expected):""Here" == "Here"" - [ ] Standalone Lines
Actual (output) :"| This Is\n\n|\n\n| A Line\n"
Expected (expected):"| This Is\n|\n| A Line\n" - [ ] Indented Standalone Lines
Actual (output) :"| This Is\n \n|\n \n| A Line\n"
Expected (expected):"| This Is\n|\n| A Line\n" - [ ] Standalone Line Endings
Actual (output) :"|\r\n\r\n\r\n|"
Expected (expected):"|\r\n|" - [ ] Standalone Without Previous Line
Actual (output) :" \n#\n/"
Expected (expected):"#\n/" - [ ] Standalone Without Newline
Actual (output) :"#\n/\n "
Expected (expected):"#\n/\n"
[UPDATE]
Many of this tests are passing now except 3 from partials.json:
- Standalone Without Previous Line
- Standalone Without Newline
- Standalone Indentation
I submitted a PR with a patch to add indentation for partials #29