Artifact 1f229cebccd1599f636a1a97aad69e92d2376dc4e0aae26f1bff4912397e63e2:
- File tests/assets/todo/supplemental.yml — part of check-in [32af418f20] at 2019-07-16 18:17:26 on branch run-up — Starting my own mustache processor in Tcl. Aware of https://github.com/ianka/mustache.tcl it has (IMHO) some shortcomings (*) I hope to address. Now: - Basic parser, not fully complete - Does not handle partials yet. - Does not handle standalone properly yet. - Most of a testsuite based on the original spec and yaml files found at https://github.com/mustache/spec - Start on context object and renderer. Todo: - Frame object and glue for testsuite (translation of the yaml context information into a frame). - May (have to) switch to TclYAML for better type information. ~~~ (*) Interpreter, no separation of compiler/render, reparses the template for nested sections over and over. (user: aku size: 1080)
- File tests/inputs/spec/supplemental.yml — part of check-in [5d7da4d9fd] at 2019-07-22 21:11:17 on branch run-up — mustache::parse - Tweaks to the narrative tracing. - Support for partials. mustache::render - Support for partials. Brought back the supplemental tests. Brought back the test for partials. All tests pass. TODO: Add render unit tests for partials. (user: andreask size: 1080)
- File tests/inputs/spec/todo/supplemental.yml — part of check-in [45032c8f57] at 2019-07-18 23:28:54 on branch run-up — General re-shuffling of input and result files for tests. The original yaml-based test cases are now under `tests/inputs/spec` and everything else will be in sibling directories of it. Similarly the local results (parse structures) associated with the yaml-based tests are now under `tests/results/spec`, and everything else is in sibling directories of it. The `z_` prefix for the local results is now gone as part of that. Started testsuite for the rendering backend. Untested: partials and all forms of sections. (user: andreask size: 1080)
overview: | Additional tests for bugs found by mustache.tcl users. tests: - name: Sections - Trailing Text desc: Nested section causes spurious repeats. <https://github.com/ianka/mustache.tcl/issues/2> data: { o: [ { x: a, i: 1 }, { x: b, i: 0 }, { x: c, i: 1 } ] } template: '{{#o}}{{#i}}{{x}}{{/i}}{{/o}}foo' expected: 'acfoo' - name: Sections - Repeated Sections desc: Nested sections affect repeated outer section. <https://github.com/ianka/mustache.tcl/issues/3> data: { items: [ { item: a, comma: true }, { item: b } ] } template: '{{#items}}{{item}}{{#comma}},{{/comma}}{{/items}}{{#items}}{{item}}{{/items}}{{#items}}{{item}}{{#comma}},{{/comma}}{{/items}}' expected: 'a,baba,b' - name: Sections - Truth values in list contexts desc: Truth values should not throw an error in a list context. data: { chars: [ { char: a, hasdigit: true }, { char: b } ], digits: [ { digit: 1 }, { digit: 2 } ] } template: '{{#chars}}{{char}}{{#hasdigit}}:{{#digits}}{{digit}}{{/digits}};{{/hasdigit}}{{/chars}}' expected: 'a:12;b'