diff --git a/CHANGELOG.md b/CHANGELOG.md index fced404..c697a30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Golden Liquid Change Log +## Version 0.24.0 + +- Updated Shopify/Liquid from GitHub main. +- Updated Python Liquid from GitHub main. +- Updated LiquidJS to 10.21.0. +- Updated liquidpy to 0.8.3. +- Updated Python Liquid2 to 0.3.0. + +- Test the new `find` filter. +- Test the new `find_index` filter. +- Test the new `has` filter. +- Test the new `reject` filter. + ## Version 0.23.1 - Moved folder `liquid` to `shopify_liquid`. diff --git a/README.md b/README.md index 263fc50..9e7e981 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The tests defined in `golden_liquid.json` attempt to cover many of Liquid's limi For our purposes "standard" Liquid is the one described [here](https://shopify.github.io/liquid/) with [Shopify/Liquid](https://github.com/Shopify/liquid) being the reference implementation. Not to be confused with the extended variation of Liquid used for Shopify stores. -All tests pass with Liquid version 5.6.1 and Ruby 3. Some `round` filter test cases fail with Ruby 2.7 due to changes with Ruby's BigDecimal library (see issue [#1590](https://github.com/Shopify/liquid/issues/1590)). If you have Ruby installed, you can run the test suite against the reference implementation by cloning this repository and running the following commands. +All tests pass with Liquid version 5.8.1 and Ruby 3. Some `round` filter test cases fail with Ruby 2.7 due to changes with Ruby's BigDecimal library (see issue [#1590](https://github.com/Shopify/liquid/issues/1590)). If you have Ruby installed, you can run the test suite against the reference implementation by cloning this repository and running the following commands. ``` cd liquid @@ -29,7 +29,7 @@ In `golden_liquid.json` tests are grouped. Each group has a name and an array of ```json { - "version": "0.23.0", + "version": "0.24.0", "test_groups": [ { "name": "liquid.golden.abs_filter", @@ -81,16 +81,16 @@ For each test case: ## Results Summary -This table summarizes the results of running version 0.23.0 of this test suit against the five Liquid engines with runners included in this repository. +This table summarizes the results of running version 0.24.0 of this test suit against the five Liquid engines with runners included in this repository. -| Engine | Version | Passed | Failed | -| --------------------------------------------------------- | ------- | ------ | ------ | -| [Shopify/Liquid](https://github.com/Shopify/liquid) | 5.6.1 | 888 | 0 | -| [LiquidJS](https://github.com/harttle/liquidjs)\*\* | 10.20.1 | 646 | 242 | -| [liquidpy](https://github.com/pwwang/liquidpy) | 0.8.2 | 467 | 421 | -| [LiquidScript](https://github.com/jg-rp/liquidscript) | 1.8.2 | 876 | 12 | -| [Python Liquid](https://github.com/jg-rp/liquid) | 1.12.2 | 888 | 0 | -| [Python Liquid2](https://github.com/jg-rp/python-liquid2) | 0.1.0 | 842 | 46 | +| Engine | Version | Passed | Failed | +| --------------------------------------------------------- | ------------------ | ------ | ------ | +| [Shopify/Liquid](https://github.com/Shopify/liquid) | 5.8.1 | 960 | 0 | +| [LiquidJS](https://github.com/harttle/liquidjs)\*\* | 10.21.0 | 688 | 272 | +| [liquidpy](https://github.com/pwwang/liquidpy) | 0.8.2 | 423 | 537 | +| [LiquidScript](https://github.com/jg-rp/liquidscript) | 1.8.2 | 880 | 80 | +| [Python Liquid](https://github.com/jg-rp/liquid) | 2.0.0 (unreleased) | 960 | 0 | +| [Python Liquid2](https://github.com/jg-rp/python-liquid2) | 0.3.0 | 882 | 78 | \*\* It's worth noting that many, but not all, of the failed test cases for LiquidJS are due to the way it handles excess and/or unexpected filter arguments, and its lack of distinct float and int types. diff --git a/golden_liquid.json b/golden_liquid.json index d880646..1a77453 100644 --- a/golden_liquid.json +++ b/golden_liquid.json @@ -1,5 +1,5 @@ { - "version": "0.23.0", + "version": "0.24.0", "test_groups": [ { "name": "liquid.golden.abs_filter", @@ -2383,16 +2383,21 @@ ] }, { - "name": "liquid.golden.first_filter", + "name": "liquid.golden.find_filter", "tests": [ { - "name": "array of strings", - "template": "{{ arr | first }}", - "want": "a", + "name": "array of hashes, int value, match", + "template": "{% assign b = a | find: 'z', 42 %}{{ b.foo }}", + "want": "bar", "context": { - "arr": [ - "a", - "b" + "a": [ + { + "x": 99 + }, + { + "z": 42, + "foo": "bar" + } ] }, "partials": {}, @@ -2400,16 +2405,19 @@ "strict": false }, { - "name": "array of things", - "template": "{{ arr | first }}", - "want": "a", + "name": "array of hashes, with a nil", + "template": "{% assign b = a | find: 'z', 42 %}{{ b.foo }}", + "want": "", "context": { - "arr": [ - "a", - "b", - 1, - [], - {} + "a": [ + { + "x": 99 + }, + null, + { + "z": 42, + "foo": "bar" + } ] }, "partials": {}, @@ -2417,198 +2425,278 @@ "strict": false }, { - "name": "empty left value", - "template": "{{ arr | first }}", - "want": "", + "name": "array of strings, default value", + "template": "{{ a | find: 'z' }}", + "want": "z", "context": { - "arr": [] + "a": [ + "x", + "y", + "z" + ] }, "partials": {}, "error": false, "strict": false }, { - "name": "first of a hash", - "template": "{% assign x = a | first %}({{ x[0] }},{{ x[1] }})", - "want": "(b,1)", + "name": "array of strings, default value, no match", + "template": "{{ a | find: 'foo' }}", + "want": "", "context": { - "a": { - "b": 1, - "c": 2 - } + "a": [ + "x", + "y", + "zoo" + ] }, "partials": {}, "error": false, "strict": false }, { - "name": "first of a string", - "template": "{{ 'hello' | first }}", - "want": "", - "context": {}, + "name": "array of strings, substring match, default value", + "template": "{{ a | find: 'oo' }}", + "want": "zoo", + "context": { + "a": [ + "x", + "y", + "zoo" + ] + }, "partials": {}, "error": false, "strict": false }, { - "name": "left value is not an array", - "template": "{{ arr | first }}", - "want": "", + "name": "hash input, default value, match", + "template": "{% assign b = a | find: 'z' %}{{ b.z }}", + "want": "42", "context": { - "arr": 12 + "a": { + "z": 42 + } }, "partials": {}, "error": false, "strict": false }, { - "name": "left value is undefined", - "template": "{{ nosuchthing | first }}", + "name": "hash input, default value, no match", + "template": "{% assign b = a | find: 'foo' %}{{ b }}", "want": "", - "context": {}, + "context": { + "a": { + "z": 42 + } + }, "partials": {}, "error": false, "strict": false }, { - "name": "range literal first filter left value", - "template": "{{ (1..3) | first }}", - "want": "1", - "context": {}, + "name": "hash input, explicit nil, match", + "template": "{% assign b = a | find: 'z', nil %}{{ b.z }}", + "want": "", + "context": { + "a": { + "z": null + } + }, "partials": {}, "error": false, "strict": false - } - ] - }, - { - "name": "liquid.golden.floor_filter", - "tests": [ + }, { - "name": "negative float", - "template": "{{ -5.4 | floor }}", - "want": "-6", - "context": {}, + "name": "hash input, int value, match", + "template": "{% assign b = a | find: 'z', 42 %}{{ b.z }}", + "want": "42", + "context": { + "a": { + "z": 42 + } + }, "partials": {}, "error": false, "strict": false }, { - "name": "negative integer", - "template": "{{ -5 | floor }}", - "want": "-5", - "context": {}, + "name": "mixed array, default value", + "template": "{{ a | find: 'z' }}", + "want": "", + "context": { + "a": [ + "x", + null, + "z", + false, + true + ] + }, "partials": {}, "error": false, "strict": false }, { - "name": "negative string float", - "template": "{{ \"-5.1\" | floor }}", - "want": "-6", - "context": {}, + "name": "string input, default value, match", + "template": "{{ a | find: 'z' }}", + "want": "zoo", + "context": { + "a": "zoo" + }, "partials": {}, "error": false, "strict": false }, { - "name": "not a string, int or float", - "template": "{{ a | floor }}", - "want": "0", + "name": "string input, string value, match", + "template": "{{ a | find: 'z', 'z' }}", + "want": "zoo", "context": { - "a": {} + "a": "zoo" }, "partials": {}, "error": false, "strict": false }, { - "name": "positive float", - "template": "{{ 5.4 | floor }}", - "want": "5", - "context": {}, + "name": "string input, string value, no match", + "template": "{{ a | find: 'z', 'y' }}", + "want": "", + "context": { + "a": "zoo" + }, "partials": {}, "error": false, "strict": false - }, + } + ] + }, + { + "name": "liquid.golden.find_index_filter", + "tests": [ { - "name": "positive integer", - "template": "{{ 5 | floor }}", - "want": "5", - "context": {}, + "name": "array of hashes, explicit nil, match", + "template": "{{ a | find_index: 'z', nil }}", + "want": "", + "context": { + "a": [ + "foo", + "bar", + { + "z": null + } + ] + }, "partials": {}, "error": false, "strict": false }, { - "name": "positive string float", - "template": "{{ \"5.1\" | floor }}", - "want": "5", - "context": {}, + "name": "array of hashes, int value, match", + "template": "{{ a | find_index: 'z', 42 }}", + "want": "1", + "context": { + "a": [ + { + "x": 99 + }, + { + "z": 42, + "foo": "bar" + } + ] + }, "partials": {}, "error": false, "strict": false }, { - "name": "string not a number", - "template": "{{ \"hello\" | floor }}", - "want": "0", - "context": {}, + "name": "array of hashes, with a nil", + "template": "{% assign b = a | find_index: 'z', 42 %}{{ b.foo }}", + "want": "", + "context": { + "a": [ + { + "x": 99 + }, + null, + { + "z": 42, + "foo": "bar" + } + ] + }, "partials": {}, "error": false, "strict": false }, { - "name": "undefined left value", - "template": "{{ nosuchthing | floor }}", - "want": "0", - "context": {}, + "name": "array of strings, default value", + "template": "{{ a | find_index: 'z' }}", + "want": "2", + "context": { + "a": [ + "x", + "y", + "z" + ] + }, "partials": {}, "error": false, "strict": false }, { - "name": "unexpected argument", - "template": "{{ -3.1 | floor: 1 }}", + "name": "array of strings, default value, no match", + "template": "{{ a | find_index: 'foo' }}", "want": "", - "context": {}, + "context": { + "a": [ + "x", + "y", + "zoo" + ] + }, "partials": {}, - "error": true, + "error": false, "strict": false }, { - "name": "zero", - "template": "{{ 0 | floor }}", - "want": "0", - "context": {}, + "name": "array of strings, substring match, default value", + "template": "{{ a | find_index: 'oo' }}", + "want": "2", + "context": { + "a": [ + "x", + "y", + "zoo" + ] + }, "partials": {}, "error": false, "strict": false - } - ] - }, - { - "name": "liquid.golden.for_tag", - "tests": [ + }, { - "name": "access parentloop", - "template": "{% for i in (1..2)%}{% for j in (1..2) %}{{ i }} {{j}} {{ forloop.parentloop.index }} {{ forloop.index }} {% endfor %}{% endfor %}", - "want": "1 1 1 1 1 2 1 2 2 1 2 1 2 2 2 2 ", - "context": {}, + "name": "hash input, default value, match", + "template": "{{ a | find_index: 'z' }}", + "want": "0", + "context": { + "a": { + "z": 42 + } + }, "partials": {}, "error": false, "strict": false }, { - "name": "assign inside loop", - "template": "{% for tag in product.tags %}{% assign x = tag %}{% endfor %}{{ x }}", - "want": "garden", + "name": "hash input, default value, no match", + "template": "{{ a | find_index: 'foo' }}", + "want": "", "context": { - "product": { - "tags": [ - "sports", - "garden" - ] + "a": { + "z": 42 } }, "partials": {}, @@ -2616,24 +2704,25 @@ "strict": false }, { - "name": "blank empty loops", - "template": "{% for i in (0..10) %} {% endfor %}", + "name": "hash input, explicit nil, match", + "template": "{{ a | find_index: 'z', nil }}", "want": "", - "context": {}, + "context": { + "a": { + "z": null + } + }, "partials": {}, "error": false, "strict": false }, { - "name": "break", - "template": "{% for tag in product.tags %}{% if tag == 'sports' %}{% break %}{% else %}{{ tag }} {% endif %}{% else %}no images{% endfor %}", - "want": "", + "name": "hash input, int value, match", + "template": "{{ a | find_index: 'z', 42 }}", + "want": "0", "context": { - "product": { - "tags": [ - "sports", - "garden" - ] + "a": { + "z": 42 } }, "partials": {}, @@ -2641,34 +2730,344 @@ "strict": false }, { - "name": "comma separated arguments", - "template": "{% for i in (1..6), limit: 4, offset: 2 %}{{ i }} {% endfor %}", - "want": "3 4 5 6 ", - "context": {}, + "name": "mixed array, default value", + "template": "{{ a | find_index: 'z' }}", + "want": "", + "context": { + "a": [ + "x", + null, + "z", + false, + true + ] + }, "partials": {}, "error": false, "strict": false }, { - "name": "continue", - "template": "{% for tag in product.tags %}{% if tag == 'sports' %}{% continue %}{% else %}{{ tag }} {% endif %}{% else %}no images{% endfor %}", - "want": "garden ", + "name": "string input, default value, match", + "template": "{{ a | find_index: 'z' }}", + "want": "0", "context": { - "product": { - "tags": [ - "sports", - "garden" - ] - } + "a": "zoo" }, "partials": {}, "error": false, "strict": false }, { - "name": "continue a loop", - "template": "{% for item in array limit: 3 %}a{{ item }} {% endfor %}{% for item in array offset: continue %}b{{ item }} {% endfor %}", - "want": "a1 a2 a3 b4 b5 b6 ", + "name": "string input, string value, match", + "template": "{{ a | find_index: 'z', 'z' }}", + "want": "0", + "context": { + "a": "zoo" + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "string input, string value, no match", + "template": "{{ a | find_index: 'z', 'y' }}", + "want": "", + "context": { + "a": "zoo" + }, + "partials": {}, + "error": false, + "strict": false + } + ] + }, + { + "name": "liquid.golden.first_filter", + "tests": [ + { + "name": "array of strings", + "template": "{{ arr | first }}", + "want": "a", + "context": { + "arr": [ + "a", + "b" + ] + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "array of things", + "template": "{{ arr | first }}", + "want": "a", + "context": { + "arr": [ + "a", + "b", + 1, + [], + {} + ] + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "empty left value", + "template": "{{ arr | first }}", + "want": "", + "context": { + "arr": [] + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "first of a hash", + "template": "{% assign x = a | first %}({{ x[0] }},{{ x[1] }})", + "want": "(b,1)", + "context": { + "a": { + "b": 1, + "c": 2 + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "first of a string", + "template": "{{ 'hello' | first }}", + "want": "", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "left value is not an array", + "template": "{{ arr | first }}", + "want": "", + "context": { + "arr": 12 + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "left value is undefined", + "template": "{{ nosuchthing | first }}", + "want": "", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "range literal first filter left value", + "template": "{{ (1..3) | first }}", + "want": "1", + "context": {}, + "partials": {}, + "error": false, + "strict": false + } + ] + }, + { + "name": "liquid.golden.floor_filter", + "tests": [ + { + "name": "negative float", + "template": "{{ -5.4 | floor }}", + "want": "-6", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "negative integer", + "template": "{{ -5 | floor }}", + "want": "-5", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "negative string float", + "template": "{{ \"-5.1\" | floor }}", + "want": "-6", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "not a string, int or float", + "template": "{{ a | floor }}", + "want": "0", + "context": { + "a": {} + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "positive float", + "template": "{{ 5.4 | floor }}", + "want": "5", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "positive integer", + "template": "{{ 5 | floor }}", + "want": "5", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "positive string float", + "template": "{{ \"5.1\" | floor }}", + "want": "5", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "string not a number", + "template": "{{ \"hello\" | floor }}", + "want": "0", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "undefined left value", + "template": "{{ nosuchthing | floor }}", + "want": "0", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "unexpected argument", + "template": "{{ -3.1 | floor: 1 }}", + "want": "", + "context": {}, + "partials": {}, + "error": true, + "strict": false + }, + { + "name": "zero", + "template": "{{ 0 | floor }}", + "want": "0", + "context": {}, + "partials": {}, + "error": false, + "strict": false + } + ] + }, + { + "name": "liquid.golden.for_tag", + "tests": [ + { + "name": "access parentloop", + "template": "{% for i in (1..2)%}{% for j in (1..2) %}{{ i }} {{j}} {{ forloop.parentloop.index }} {{ forloop.index }} {% endfor %}{% endfor %}", + "want": "1 1 1 1 1 2 1 2 2 1 2 1 2 2 2 2 ", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "assign inside loop", + "template": "{% for tag in product.tags %}{% assign x = tag %}{% endfor %}{{ x }}", + "want": "garden", + "context": { + "product": { + "tags": [ + "sports", + "garden" + ] + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "blank empty loops", + "template": "{% for i in (0..10) %} {% endfor %}", + "want": "", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "break", + "template": "{% for tag in product.tags %}{% if tag == 'sports' %}{% break %}{% else %}{{ tag }} {% endif %}{% else %}no images{% endfor %}", + "want": "", + "context": { + "product": { + "tags": [ + "sports", + "garden" + ] + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "comma separated arguments", + "template": "{% for i in (1..6), limit: 4, offset: 2 %}{{ i }} {% endfor %}", + "want": "3 4 5 6 ", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "continue", + "template": "{% for tag in product.tags %}{% if tag == 'sports' %}{% continue %}{% else %}{{ tag }} {% endif %}{% else %}no images{% endfor %}", + "want": "garden ", + "context": { + "product": { + "tags": [ + "sports", + "garden" + ] + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "continue a loop", + "template": "{% for item in array limit: 3 %}a{{ item }} {% endfor %}{% for item in array offset: continue %}b{{ item }} {% endfor %}", + "want": "a1 a2 a3 b4 b5 b6 ", "context": { "array": [ 1, @@ -3462,10 +3861,342 @@ "strict": false }, { - "name": "some comma separated arguments", - "template": "{% for i in (1..6) limit: 4, offset: 2, %}{{ i }} {% endfor %}", - "want": "3 4 5 6 ", - "context": {}, + "name": "some comma separated arguments", + "template": "{% for i in (1..6) limit: 4, offset: 2, %}{{ i }} {% endfor %}", + "want": "3 4 5 6 ", + "context": {}, + "partials": {}, + "error": false, + "strict": false + } + ] + }, + { + "name": "liquid.golden.has_filter", + "tests": [ + { + "name": "array of hashes, false property", + "template": "{{ a | has: false }}", + "want": "false", + "context": { + "a": [ + { + "x": 99 + }, + { + "z": 42 + } + ] + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "array of hashes, int property", + "template": "{{ a | has: 42 }}", + "want": "false", + "context": { + "a": [ + { + "x": 99 + }, + { + "z": 42 + } + ] + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "array of hashes, int value, match", + "template": "{{ a | has: 'z', 42 }}", + "want": "true", + "context": { + "a": [ + { + "x": 99 + }, + { + "z": 42 + } + ] + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "array of hashes, int value, no match", + "template": "{{ a | has: 'z', 7 }}", + "want": "false", + "context": { + "a": [ + { + "x": 99 + }, + { + "z": 42 + } + ] + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "array of hashes, nil property", + "template": "{{ a | has: nil }}", + "want": "false", + "context": { + "a": [ + { + "x": 99 + }, + { + "z": 42 + } + ] + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "array of hashes, with a nil", + "template": "{{ a | has: 'z', 42 }}", + "want": "", + "context": { + "a": [ + { + "x": 99 + }, + null, + { + "z": 42 + } + ] + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "array of ints, default value", + "template": "{{ a | has: 2 }}", + "want": "true", + "context": { + "a": [ + 1, + 2, + 3 + ] + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "array of ints, string argument, default value", + "template": "{{ a | has: '2' }}", + "want": "", + "context": { + "a": [ + 1, + 2, + 3 + ] + }, + "partials": {}, + "error": true, + "strict": false + }, + { + "name": "array of strings, default value", + "template": "{{ a | has: 'z' }}", + "want": "true", + "context": { + "a": [ + "x", + "y", + "z" + ] + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "array of strings, default value, no match", + "template": "{{ a | has: ':(' }}", + "want": "false", + "context": { + "a": [ + "x", + "y", + "z" + ] + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "array of strings, default value, substring match", + "template": "{{ a | has: 'z' }}", + "want": "true", + "context": { + "a": [ + "x", + "y", + "zoo" + ] + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "hash input, default value, match", + "template": "{{ a | has: 'z' }}", + "want": "true", + "context": { + "a": { + "z": 42 + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "hash input, default value, no match", + "template": "{{ a | has: 'z' }}", + "want": "false", + "context": { + "a": { + "x": 42 + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "hash input, explicit nil, match", + "template": "{{ a | has: 'z', nil }}", + "want": "false", + "context": { + "a": { + "z": null + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "hash input, explicit nil, no match", + "template": "{{ a | has: 'z', nil }}", + "want": "true", + "context": { + "a": { + "z": 42 + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "hash input, false value, match", + "template": "{{ a | has: 'z', false }}", + "want": "true", + "context": { + "a": { + "z": false + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "hash input, int value, match", + "template": "{{ a | has: 'z', 42 }}", + "want": "true", + "context": { + "a": { + "z": 42 + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "hash input, int value, no match", + "template": "{{ a | has: 'z', 99 }}", + "want": "false", + "context": { + "a": { + "z": 42 + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "hash input, string value, no type coercion", + "template": "{{ a | has: 'z', '42' }}", + "want": "false", + "context": { + "a": { + "z": 42 + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "mixed array, default value", + "template": "{{ a | has: 'z' }}", + "want": "", + "context": { + "a": [ + "x", + null, + "z", + false, + true + ] + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "string input, default value, match", + "template": "{{ a | has: 'z' }}", + "want": "true", + "context": { + "a": "zoo" + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "string input, default value, no match", + "template": "{{ a | has: 'z' }}", + "want": "false", + "context": { + "a": "foo" + }, "partials": {}, "error": false, "strict": false @@ -5990,208 +6721,447 @@ "strict": false }, { - "name": "render a float literal", - "template": "{{ 1.23 }}", - "want": "1.23", + "name": "render a float literal", + "template": "{{ 1.23 }}", + "want": "1.23", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "render a global variable with a filter", + "template": "{{ product.title | upcase }}", + "want": "FOO", + "context": { + "product": { + "title": "foo" + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "render a negative integer literal", + "template": "{{ -123 }}", + "want": "-123", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "render a range object", + "template": "{{ (1..5) | join: '#' }}", + "want": "1#2#3#4#5", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "render a range object that uses a float", + "template": "{{ (1.4..5) | join: '#' }}", + "want": "1#2#3#4#5", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "render a range object that uses an identifier", + "template": "{{ (foo..5) | join: '#' }}", + "want": "2#3#4#5", + "context": { + "foo": 2 + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "render a string literal", + "template": "{{ 'hello' }}", + "want": "hello", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "render a variable from the global namespace", + "template": "{{ product.title }}", + "want": "foo", + "context": { + "product": { + "title": "foo" + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "render a variable from the local namespace", + "template": "{% assign name = 'Brian' %}{{ name }}", + "want": "Brian", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "render an integer literal", + "template": "{{ 123 }}", + "want": "123", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "render an output start sequence as a string literal", + "template": "{{ '{{' }}", + "want": "{{", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "render an undefined property", + "template": "{{ product.age }}", + "want": "", + "context": { + "product": { + "title": "foo" + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "render an undefined variable", + "template": "{{ age }}", + "want": "", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "render nil", + "template": "{{ nil }}", + "want": "", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "reverse a range", + "template": "{{ (foo..5) | reverse | join: '#' }}", + "want": "5#4#3#2", + "context": { + "foo": 2 + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "top-level quoted, bracketed variable name with whitespace", + "template": "{{ ['bar baz'] }}", + "want": "42", + "context": { + "bar baz": 42 + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "top-level quoted, bracketed variable name with whitespace followed by dot notation", + "template": "{{ ['bar baz'].qux }}", + "want": "42", + "context": { + "bar baz": { + "qux": 42 + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "traverse variables with bracketed identifiers", + "template": "{{ site.data.menu[include.menu][include.locale] }}", + "want": "it works!", + "context": { + "site": { + "data": { + "menu": { + "foo": { + "bar": "it works!" + } + } + } + }, + "include": { + "menu": "foo", + "locale": "bar" + } + }, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "unexpected left value for the `join` filter passes through", + "template": "{{ 12 | join: '#' }}", + "want": "12", + "context": {}, + "partials": {}, + "error": false, + "strict": false + } + ] + }, + { + "name": "liquid.golden.plus_filter", + "tests": [ + { + "name": "arg string not a number", + "template": "{{ \"10\" | plus: \"foo\" }}", + "want": "10", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "float value and float arg", + "template": "{{ 10.1 | plus: 2.2 }}", + "want": "12.3", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "integer value and float arg", + "template": "{{ 10 | plus: 2.0 }}", + "want": "12.0", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "integer value and integer arg", + "template": "{{ 10 | plus: 2 }}", + "want": "12", + "context": {}, + "partials": {}, + "error": false, + "strict": false + }, + { + "name": "integer value and negative integer arg", + "template": "{{ 10 | plus: -2 }}", + "want": "8", "context": {}, "partials": {}, "error": false, "strict": false }, { - "name": "render a global variable with a filter", - "template": "{{ product.title | upcase }}", - "want": "FOO", + "name": "not a string, int or float", + "template": "{{ a | plus: 1 }}", + "want": "1", "context": { - "product": { - "title": "foo" - } + "a": {} }, "partials": {}, "error": false, "strict": false }, { - "name": "render a negative integer literal", - "template": "{{ -123 }}", - "want": "-123", + "name": "string not a number", + "template": "{{ \"foo\" | plus: \"2.0\" }}", + "want": "2.0", "context": {}, "partials": {}, "error": false, "strict": false }, { - "name": "render a range object", - "template": "{{ (1..5) | join: '#' }}", - "want": "1#2#3#4#5", + "name": "string value and string arg", + "template": "{{ \"10.1\" | plus: \"2.2\" }}", + "want": "12.3", "context": {}, "partials": {}, "error": false, "strict": false }, { - "name": "render a range object that uses a float", - "template": "{{ (1.4..5) | join: '#' }}", - "want": "1#2#3#4#5", + "name": "too many args", + "template": "{{ 5 | plus: 1, '5' }}", + "want": "", "context": {}, "partials": {}, - "error": false, + "error": true, "strict": false }, { - "name": "render a range object that uses an identifier", - "template": "{{ (foo..5) | join: '#' }}", - "want": "2#3#4#5", - "context": { - "foo": 2 - }, + "name": "undefined argument", + "template": "{{ 10 | plus: nosuchthing }}", + "want": "10", + "context": {}, "partials": {}, "error": false, "strict": false }, { - "name": "render a string literal", - "template": "{{ 'hello' }}", - "want": "hello", + "name": "undefined left value", + "template": "{{ nosuchthing | plus: 2 }}", + "want": "2", "context": {}, "partials": {}, "error": false, "strict": false - }, + } + ] + }, + { + "name": "liquid.golden.prepend_filter", + "tests": [ { - "name": "render a variable from the global namespace", - "template": "{{ product.title }}", - "want": "foo", - "context": { - "product": { - "title": "foo" - } - }, + "name": "argument not a string", + "template": "{{ \"hello\" | prepend: 5 }}", + "want": "5hello", + "context": {}, "partials": {}, "error": false, "strict": false }, { - "name": "render a variable from the local namespace", - "template": "{% assign name = 'Brian' %}{{ name }}", - "want": "Brian", + "name": "concat", + "template": "{{ \"hello\" | prepend: \"there\" }}", + "want": "therehello", "context": {}, "partials": {}, "error": false, "strict": false }, { - "name": "render an integer literal", - "template": "{{ 123 }}", - "want": "123", + "name": "missing argument", + "template": "{{ \"hello\" | prepend }}", + "want": "", "context": {}, "partials": {}, - "error": false, + "error": true, "strict": false }, { - "name": "render an output start sequence as a string literal", - "template": "{{ '{{' }}", - "want": "{{", + "name": "not a string", + "template": "{{ 5 | prepend: 'there' }}", + "want": "there5", "context": {}, "partials": {}, "error": false, "strict": false }, { - "name": "render an undefined property", - "template": "{{ product.age }}", + "name": "too many arguments", + "template": "{{ \"hello\" | prepend: \"how\", \"are\", \"you\" }}", "want": "", - "context": { - "product": { - "title": "foo" - } - }, + "context": {}, "partials": {}, - "error": false, + "error": true, "strict": false }, { - "name": "render an undefined variable", - "template": "{{ age }}", - "want": "", + "name": "undefined argument", + "template": "{{ \"hi\" | prepend: nosuchthing }}", + "want": "hi", "context": {}, "partials": {}, "error": false, "strict": false }, { - "name": "render nil", - "template": "{{ nil }}", - "want": "", + "name": "undefined left value", + "template": "{{ nosuchthing | prepend: \"hi\" }}", + "want": "hi", "context": {}, "partials": {}, "error": false, "strict": false - }, + } + ] + }, + { + "name": "liquid.golden.range_objects", + "tests": [ { - "name": "reverse a range", - "template": "{{ (foo..5) | reverse | join: '#' }}", - "want": "5#4#3#2", + "name": "end is less than start", + "template": "{{ (start..end) | join: '#' }}", + "want": "", "context": { - "foo": 2 + "start": 5, + "end": 1 }, "partials": {}, "error": false, "strict": false }, { - "name": "top-level quoted, bracketed variable name with whitespace", - "template": "{{ ['bar baz'] }}", - "want": "42", + "name": "end is not a number", + "template": "{{ (start..end) | join: '#' }}", + "want": "", "context": { - "bar baz": 42 + "start": "1", + "end": "foo" }, "partials": {}, "error": false, "strict": false }, { - "name": "top-level quoted, bracketed variable name with whitespace followed by dot notation", - "template": "{{ ['bar baz'].qux }}", - "want": "42", + "name": "start and end are negative", + "template": "{{ (start..end) | join: '#' }}", + "want": "-5#-4#-3#-2", "context": { - "bar baz": { - "qux": 42 - } + "start": -5, + "end": -2 }, "partials": {}, "error": false, "strict": false }, { - "name": "traverse variables with bracketed identifiers", - "template": "{{ site.data.menu[include.menu][include.locale] }}", - "want": "it works!", + "name": "start is negative", + "template": "{{ (start..end) | join: '#' }}", + "want": "-5#-4#-3#-2#-1#0#1", "context": { - "site": { - "data": { - "menu": { - "foo": { - "bar": "it works!" - } - } - } - }, - "include": { - "menu": "foo", - "locale": "bar" - } + "start": -5, + "end": 1 }, "partials": {}, "error": false, "strict": false }, { - "name": "unexpected left value for the `join` filter passes through", - "template": "{{ 12 | join: '#' }}", - "want": "12", - "context": {}, + "name": "start is not a number", + "template": "{{ (start..end) | join: '#' }}", + "want": "0#1#2#3#4#5", + "context": { + "start": "foo", + "end": 5 + }, "partials": {}, "error": false, "strict": false @@ -6199,290 +7169,449 @@ ] }, { - "name": "liquid.golden.plus_filter", + "name": "liquid.golden.raw_tag", "tests": [ { - "name": "arg string not a number", - "template": "{{ \"10\" | plus: \"foo\" }}", - "want": "10", + "name": "continue after raw", + "template": "{% raw %} {% some raw content %} {% endraw %}a literal", + "want": " {% some raw content %} a literal", "context": {}, "partials": {}, "error": false, "strict": false }, { - "name": "float value and float arg", - "template": "{{ 10.1 | plus: 2.2 }}", - "want": "12.3", + "name": "literal", + "template": "{% raw %}foo{% endraw %}", + "want": "foo", "context": {}, "partials": {}, "error": false, "strict": false }, { - "name": "integer value and float arg", - "template": "{{ 10 | plus: 2.0 }}", - "want": "12.0", + "name": "partial tag", + "template": "{% raw %} %} {% }} {{ {% endraw %}", + "want": " %} {% }} {{ ", "context": {}, "partials": {}, "error": false, "strict": false }, { - "name": "integer value and integer arg", - "template": "{{ 10 | plus: 2 }}", - "want": "12", + "name": "statement", + "template": "{% raw %}{{ foo }}{% endraw %}", + "want": "{{ foo }}", "context": {}, "partials": {}, "error": false, "strict": false }, { - "name": "integer value and negative integer arg", - "template": "{{ 10 | plus: -2 }}", - "want": "8", + "name": "tag", + "template": "{% raw %}{% assign x = 1 %}{% endraw %}", + "want": "{% assign x = 1 %}", "context": {}, "partials": {}, "error": false, "strict": false + } + ] + }, + { + "name": "liquid.golden.reject_filter", + "tests": [ + { + "name": "array containing an int, default value", + "template": "{{ a | reject: 'c' }}", + "want": "", + "context": { + "a": [ + "x", + "y", + "cat", + 1 + ] + }, + "partials": {}, + "error": true, + "strict": false }, { - "name": "not a string, int or float", - "template": "{{ a | plus: 1 }}", - "want": "1", + "name": "array containing null, default value", + "template": "{{ a | reject: 'c' }}", + "want": "", "context": { - "a": {} + "a": [ + "x", + "y", + "cat", + null + ] }, "partials": {}, "error": false, "strict": false }, { - "name": "string not a number", - "template": "{{ \"foo\" | plus: \"2.0\" }}", - "want": "2.0", - "context": {}, + "name": "array of hashes, default value", + "template": "{% assign b = a | reject: 'title' %}{% for obj in b %}{% for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}", + "want": "(title,false), (title,), (heading,baz), ", + "context": { + "a": [ + { + "title": "foo" + }, + { + "title": false + }, + { + "title": null + }, + { + "heading": "baz" + } + ] + }, "partials": {}, "error": false, "strict": false }, { - "name": "string value and string arg", - "template": "{{ \"10.1\" | plus: \"2.2\" }}", - "want": "12.3", - "context": {}, + "name": "array of hashes, explicit false", + "template": "{% assign b = a | reject: 'title', false %}{% for obj in b %}{% for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}", + "want": "(title,bar), (title,), (heading,baz), ", + "context": { + "a": [ + { + "title": false + }, + { + "title": "bar" + }, + { + "title": null + }, + { + "heading": "baz" + } + ] + }, "partials": {}, "error": false, "strict": false }, { - "name": "too many args", - "template": "{{ 5 | plus: 1, '5' }}", - "want": "", - "context": {}, + "name": "array of hashes, explicit nil", + "template": "{% assign b = a | reject: 'title', nil %}{% for obj in b %}{% for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}", + "want": "(title,false), (title,), (heading,baz), ", + "context": { + "a": [ + { + "title": "foo" + }, + { + "title": false + }, + { + "title": null + }, + { + "heading": "baz" + } + ] + }, "partials": {}, - "error": true, + "error": false, "strict": false }, { - "name": "undefined argument", - "template": "{{ 10 | plus: nosuchthing }}", - "want": "10", - "context": {}, + "name": "array of hashes, explicit true", + "template": "{% assign b = a | reject: 'title', true %}{% for obj in b %}{% for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}", + "want": "(title,bar), (title,), ", + "context": { + "a": [ + { + "title": true + }, + { + "title": "bar" + }, + { + "title": null + } + ] + }, "partials": {}, "error": false, "strict": false }, { - "name": "undefined left value", - "template": "{{ nosuchthing | plus: 2 }}", - "want": "2", - "context": {}, + "name": "array of hashes, missing property", + "template": "{% assign b = a | reject: 'title', 'bar' %}{% for obj in b %}{% for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}", + "want": "(heading,foo), (title,), ", + "context": { + "a": [ + { + "heading": "foo" + }, + { + "title": "bar" + }, + { + "title": null + } + ] + }, "partials": {}, "error": false, "strict": false - } - ] - }, - { - "name": "liquid.golden.prepend_filter", - "tests": [ + }, { - "name": "argument not a string", - "template": "{{ \"hello\" | prepend: 5 }}", - "want": "5hello", - "context": {}, + "name": "array of hashes, string value", + "template": "{% assign b = a | reject: 'title', 'bar' %}{% for obj in b %}{% for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}", + "want": "(title,foo), (title,), (heading,baz), ", + "context": { + "a": [ + { + "title": "foo" + }, + { + "title": "bar" + }, + { + "title": null + }, + { + "heading": "baz" + } + ] + }, "partials": {}, "error": false, "strict": false }, { - "name": "concat", - "template": "{{ \"hello\" | prepend: \"there\" }}", - "want": "therehello", - "context": {}, + "name": "array of strings, default value", + "template": "{% assign b = a | reject: 'c' %}{% for obj in b %}{{ obj }}, {% endfor %}", + "want": "x, y, ", + "context": { + "a": [ + "x", + "y", + "cat" + ] + }, "partials": {}, "error": false, "strict": false }, { - "name": "missing argument", - "template": "{{ \"hello\" | prepend }}", + "name": "first argument is undefined", + "template": "{% assign b = a | reject: nosuchthing %}{% for obj in b %}{{ obj }}, {% endfor %}", "want": "", - "context": {}, - "partials": {}, - "error": true, - "strict": false - }, - { - "name": "not a string", - "template": "{{ 5 | prepend: 'there' }}", - "want": "there5", - "context": {}, + "context": { + "a": [ + "x", + "y", + "cat" + ] + }, "partials": {}, "error": false, "strict": false }, { - "name": "too many arguments", - "template": "{{ \"hello\" | prepend: \"how\", \"are\", \"you\" }}", + "name": "input is a hash, default value", + "template": "{% assign b = h | reject: 'bar' %}{% for obj in b %}{{ obj }}, {% endfor %}", "want": "", - "context": {}, + "context": { + "h": { + "foo": 1, + "bar": 2, + "baz": 3 + } + }, "partials": {}, - "error": true, + "error": false, "strict": false }, { - "name": "undefined argument", - "template": "{{ \"hi\" | prepend: nosuchthing }}", - "want": "hi", - "context": {}, + "name": "input is a hash, default value, nil match", + "template": "{% assign b = h | reject: 'bar' %}{% for obj in b %}{% for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}", + "want": "(foo,1), (bar,), (baz,3), ", + "context": { + "h": { + "foo": 1, + "bar": null, + "baz": 3 + } + }, "partials": {}, "error": false, "strict": false }, { - "name": "undefined left value", - "template": "{{ nosuchthing | prepend: \"hi\" }}", - "want": "hi", - "context": {}, + "name": "input is a hash, default value, no match", + "template": "{% assign b = h | reject: 'barbar' %}{% for obj in b %}{% for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}", + "want": "(foo,1), (bar,2), (baz,3), ", + "context": { + "h": { + "foo": 1, + "bar": 2, + "baz": 3 + } + }, "partials": {}, "error": false, "strict": false - } - ] - }, - { - "name": "liquid.golden.range_objects", - "tests": [ + }, { - "name": "end is less than start", - "template": "{{ (start..end) | join: '#' }}", - "want": "", + "name": "input is a hash, explicit nil match", + "template": "{% assign b = h | reject: 'bar', nil %}{% for obj in b %}{% for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}", + "want": "(foo,1), (bar,), (baz,3), ", "context": { - "start": 5, - "end": 1 + "h": { + "foo": 1, + "bar": null, + "baz": 3 + } }, "partials": {}, "error": false, "strict": false }, { - "name": "end is not a number", - "template": "{{ (start..end) | join: '#' }}", + "name": "input is a hash, int value, match", + "template": "{% assign b = h | reject: 'bar', 2 %}{% for obj in b %}{% for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}", "want": "", "context": { - "start": "1", - "end": "foo" + "h": { + "foo": 1, + "bar": 2, + "baz": 3 + } }, "partials": {}, "error": false, "strict": false }, { - "name": "start and end are negative", - "template": "{{ (start..end) | join: '#' }}", - "want": "-5#-4#-3#-2", + "name": "input is a hash, int value, no match", + "template": "{% assign b = h | reject: 'bar', 1 %}{% for obj in b %}{% for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}", + "want": "(foo,1), (bar,2), (baz,3), ", "context": { - "start": -5, - "end": -2 + "h": { + "foo": 1, + "bar": 2, + "baz": 3 + } }, "partials": {}, "error": false, "strict": false }, { - "name": "start is negative", - "template": "{{ (start..end) | join: '#' }}", - "want": "-5#-4#-3#-2#-1#0#1", - "context": { - "start": -5, - "end": 1 - }, + "name": "input is undefined", + "template": "{% assign b = nosuchthing | reject: 'c' %}{% for obj in b %}{{ obj }}, {% endfor %}", + "want": "", + "context": {}, "partials": {}, "error": false, "strict": false }, { - "name": "start is not a number", - "template": "{{ (start..end) | join: '#' }}", - "want": "0#1#2#3#4#5", + "name": "missing argument", + "template": "{% assign b = a | reject %}{% for obj in b %}{{ obj }}, {% endfor %}", + "want": "", "context": { - "start": "foo", - "end": 5 + "a": [ + "x", + "y", + "cat" + ] }, "partials": {}, - "error": false, + "error": true, "strict": false - } - ] - }, - { - "name": "liquid.golden.raw_tag", - "tests": [ + }, { - "name": "continue after raw", - "template": "{% raw %} {% some raw content %} {% endraw %}a literal", - "want": " {% some raw content %} a literal", - "context": {}, + "name": "nested array of hashes gets flattened", + "template": "{% assign b = a | reject: 'title', 'bar' %}{% for obj in b %}{% for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}", + "want": "(title,foo), (title,), ", + "context": { + "a": [ + [ + { + "title": "foo" + }, + { + "title": "bar" + } + ], + [ + [ + { + "title": null + } + ] + ] + ] + }, "partials": {}, "error": false, "strict": false }, { - "name": "literal", - "template": "{% raw %}foo{% endraw %}", - "want": "foo", - "context": {}, + "name": "second argument is undefined", + "template": "{% assign b = a | reject: 'title', nosuchthing %}{% for obj in b %}{% for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}", + "want": "(title,), ", + "context": { + "a": [ + { + "title": "foo" + }, + { + "title": "bar" + }, + { + "title": null + } + ] + }, "partials": {}, "error": false, "strict": false }, { - "name": "partial tag", - "template": "{% raw %} %} {% }} {{ {% endraw %}", - "want": " %} {% }} {{ ", - "context": {}, + "name": "string input becomes a single element array, no match", + "template": "{% assign b = s | reject: 'xx' %}{% for obj in b %}{{ obj }}, {% endfor %}", + "want": "foobar, ", + "context": { + "s": "foobar" + }, "partials": {}, "error": false, "strict": false }, { - "name": "statement", - "template": "{% raw %}{{ foo }}{% endraw %}", - "want": "{{ foo }}", - "context": {}, + "name": "string input becomes a single element array, substring match", + "template": "{% assign b = s | reject: 'oo' %}{% for obj in b %}{{ obj }}, {% endfor %}", + "want": "", + "context": { + "s": "foobar" + }, "partials": {}, "error": false, "strict": false }, { - "name": "tag", - "template": "{% raw %}{% assign x = 1 %}{% endraw %}", - "want": "{% assign x = 1 %}", + "name": "too many arguments", + "template": "{% assign b = a | reject: 'x', 'y', 'z' %}{% for obj in b %}{{ obj }}, {% endfor %}", + "want": "", "context": {}, "partials": {}, - "error": false, + "error": true, "strict": false } ] diff --git a/golden_liquid.yaml b/golden_liquid.yaml index 023d866..921880a 100644 --- a/golden_liquid.yaml +++ b/golden_liquid.yaml @@ -1,4 +1,4 @@ -version: 0.23.0 +version: 0.24.0 test_groups: - name: liquid.golden.abs_filter tests: @@ -1781,6 +1781,279 @@ test_groups: partials: {} error: true strict: false +- name: liquid.golden.find_filter + tests: + - name: array of hashes, int value, match + template: '{% assign b = a | find: ''z'', 42 %}{{ b.foo }}' + want: bar + context: + a: + - x: 99 + - z: 42 + foo: bar + partials: {} + error: false + strict: false + - name: array of hashes, with a nil + template: '{% assign b = a | find: ''z'', 42 %}{{ b.foo }}' + want: '' + context: + a: + - x: 99 + - null + - z: 42 + foo: bar + partials: {} + error: false + strict: false + - name: array of strings, default value + template: '{{ a | find: ''z'' }}' + want: z + context: + a: + - x + - y + - z + partials: {} + error: false + strict: false + - name: array of strings, default value, no match + template: '{{ a | find: ''foo'' }}' + want: '' + context: + a: + - x + - y + - zoo + partials: {} + error: false + strict: false + - name: array of strings, substring match, default value + template: '{{ a | find: ''oo'' }}' + want: zoo + context: + a: + - x + - y + - zoo + partials: {} + error: false + strict: false + - name: hash input, default value, match + template: '{% assign b = a | find: ''z'' %}{{ b.z }}' + want: '42' + context: + a: + z: 42 + partials: {} + error: false + strict: false + - name: hash input, default value, no match + template: '{% assign b = a | find: ''foo'' %}{{ b }}' + want: '' + context: + a: + z: 42 + partials: {} + error: false + strict: false + - name: hash input, explicit nil, match + template: '{% assign b = a | find: ''z'', nil %}{{ b.z }}' + want: '' + context: + a: + z: null + partials: {} + error: false + strict: false + - name: hash input, int value, match + template: '{% assign b = a | find: ''z'', 42 %}{{ b.z }}' + want: '42' + context: + a: + z: 42 + partials: {} + error: false + strict: false + - name: mixed array, default value + template: '{{ a | find: ''z'' }}' + want: '' + context: + a: + - x + - null + - z + - false + - true + partials: {} + error: false + strict: false + - name: string input, default value, match + template: '{{ a | find: ''z'' }}' + want: zoo + context: + a: zoo + partials: {} + error: false + strict: false + - name: string input, string value, match + template: '{{ a | find: ''z'', ''z'' }}' + want: zoo + context: + a: zoo + partials: {} + error: false + strict: false + - name: string input, string value, no match + template: '{{ a | find: ''z'', ''y'' }}' + want: '' + context: + a: zoo + partials: {} + error: false + strict: false +- name: liquid.golden.find_index_filter + tests: + - name: array of hashes, explicit nil, match + template: '{{ a | find_index: ''z'', nil }}' + want: '' + context: + a: + - foo + - bar + - z: null + partials: {} + error: false + strict: false + - name: array of hashes, int value, match + template: '{{ a | find_index: ''z'', 42 }}' + want: '1' + context: + a: + - x: 99 + - z: 42 + foo: bar + partials: {} + error: false + strict: false + - name: array of hashes, with a nil + template: '{% assign b = a | find_index: ''z'', 42 %}{{ b.foo }}' + want: '' + context: + a: + - x: 99 + - null + - z: 42 + foo: bar + partials: {} + error: false + strict: false + - name: array of strings, default value + template: '{{ a | find_index: ''z'' }}' + want: '2' + context: + a: + - x + - y + - z + partials: {} + error: false + strict: false + - name: array of strings, default value, no match + template: '{{ a | find_index: ''foo'' }}' + want: '' + context: + a: + - x + - y + - zoo + partials: {} + error: false + strict: false + - name: array of strings, substring match, default value + template: '{{ a | find_index: ''oo'' }}' + want: '2' + context: + a: + - x + - y + - zoo + partials: {} + error: false + strict: false + - name: hash input, default value, match + template: '{{ a | find_index: ''z'' }}' + want: '0' + context: + a: + z: 42 + partials: {} + error: false + strict: false + - name: hash input, default value, no match + template: '{{ a | find_index: ''foo'' }}' + want: '' + context: + a: + z: 42 + partials: {} + error: false + strict: false + - name: hash input, explicit nil, match + template: '{{ a | find_index: ''z'', nil }}' + want: '' + context: + a: + z: null + partials: {} + error: false + strict: false + - name: hash input, int value, match + template: '{{ a | find_index: ''z'', 42 }}' + want: '0' + context: + a: + z: 42 + partials: {} + error: false + strict: false + - name: mixed array, default value + template: '{{ a | find_index: ''z'' }}' + want: '' + context: + a: + - x + - null + - z + - false + - true + partials: {} + error: false + strict: false + - name: string input, default value, match + template: '{{ a | find_index: ''z'' }}' + want: '0' + context: + a: zoo + partials: {} + error: false + strict: false + - name: string input, string value, match + template: '{{ a | find_index: ''z'', ''z'' }}' + want: '0' + context: + a: zoo + partials: {} + error: false + strict: false + - name: string input, string value, no match + template: '{{ a | find_index: ''z'', ''y'' }}' + want: '' + context: + a: zoo + partials: {} + error: false + strict: false - name: liquid.golden.first_filter tests: - name: array of strings @@ -2620,6 +2893,225 @@ test_groups: partials: {} error: false strict: false +- name: liquid.golden.has_filter + tests: + - name: array of hashes, false property + template: '{{ a | has: false }}' + want: 'false' + context: + a: + - x: 99 + - z: 42 + partials: {} + error: false + strict: false + - name: array of hashes, int property + template: '{{ a | has: 42 }}' + want: 'false' + context: + a: + - x: 99 + - z: 42 + partials: {} + error: false + strict: false + - name: array of hashes, int value, match + template: '{{ a | has: ''z'', 42 }}' + want: 'true' + context: + a: + - x: 99 + - z: 42 + partials: {} + error: false + strict: false + - name: array of hashes, int value, no match + template: '{{ a | has: ''z'', 7 }}' + want: 'false' + context: + a: + - x: 99 + - z: 42 + partials: {} + error: false + strict: false + - name: array of hashes, nil property + template: '{{ a | has: nil }}' + want: 'false' + context: + a: + - x: 99 + - z: 42 + partials: {} + error: false + strict: false + - name: array of hashes, with a nil + template: '{{ a | has: ''z'', 42 }}' + want: '' + context: + a: + - x: 99 + - null + - z: 42 + partials: {} + error: false + strict: false + - name: array of ints, default value + template: '{{ a | has: 2 }}' + want: 'true' + context: + a: + - 1 + - 2 + - 3 + partials: {} + error: false + strict: false + - name: array of ints, string argument, default value + template: '{{ a | has: ''2'' }}' + want: '' + context: + a: + - 1 + - 2 + - 3 + partials: {} + error: true + strict: false + - name: array of strings, default value + template: '{{ a | has: ''z'' }}' + want: 'true' + context: + a: + - x + - y + - z + partials: {} + error: false + strict: false + - name: array of strings, default value, no match + template: '{{ a | has: '':('' }}' + want: 'false' + context: + a: + - x + - y + - z + partials: {} + error: false + strict: false + - name: array of strings, default value, substring match + template: '{{ a | has: ''z'' }}' + want: 'true' + context: + a: + - x + - y + - zoo + partials: {} + error: false + strict: false + - name: hash input, default value, match + template: '{{ a | has: ''z'' }}' + want: 'true' + context: + a: + z: 42 + partials: {} + error: false + strict: false + - name: hash input, default value, no match + template: '{{ a | has: ''z'' }}' + want: 'false' + context: + a: + x: 42 + partials: {} + error: false + strict: false + - name: hash input, explicit nil, match + template: '{{ a | has: ''z'', nil }}' + want: 'false' + context: + a: + z: null + partials: {} + error: false + strict: false + - name: hash input, explicit nil, no match + template: '{{ a | has: ''z'', nil }}' + want: 'true' + context: + a: + z: 42 + partials: {} + error: false + strict: false + - name: hash input, false value, match + template: '{{ a | has: ''z'', false }}' + want: 'true' + context: + a: + z: false + partials: {} + error: false + strict: false + - name: hash input, int value, match + template: '{{ a | has: ''z'', 42 }}' + want: 'true' + context: + a: + z: 42 + partials: {} + error: false + strict: false + - name: hash input, int value, no match + template: '{{ a | has: ''z'', 99 }}' + want: 'false' + context: + a: + z: 42 + partials: {} + error: false + strict: false + - name: hash input, string value, no type coercion + template: '{{ a | has: ''z'', ''42'' }}' + want: 'false' + context: + a: + z: 42 + partials: {} + error: false + strict: false + - name: mixed array, default value + template: '{{ a | has: ''z'' }}' + want: '' + context: + a: + - x + - null + - z + - false + - true + partials: {} + error: false + strict: false + - name: string input, default value, match + template: '{{ a | has: ''z'' }}' + want: 'true' + context: + a: zoo + partials: {} + error: false + strict: false + - name: string input, default value, no match + template: '{{ a | has: ''z'' }}' + want: 'false' + context: + a: foo + partials: {} + error: false + strict: false - name: liquid.golden.identifiers tests: - name: ascii lowercase @@ -4887,6 +5379,273 @@ test_groups: partials: {} error: false strict: false +- name: liquid.golden.reject_filter + tests: + - name: array containing an int, default value + template: '{{ a | reject: ''c'' }}' + want: '' + context: + a: + - x + - y + - cat + - 1 + partials: {} + error: true + strict: false + - name: array containing null, default value + template: '{{ a | reject: ''c'' }}' + want: '' + context: + a: + - x + - y + - cat + - null + partials: {} + error: false + strict: false + - name: array of hashes, default value + template: '{% assign b = a | reject: ''title'' %}{% for obj in b %}{% for itm + in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}' + want: '(title,false), (title,), (heading,baz), ' + context: + a: + - title: foo + - title: false + - title: null + - heading: baz + partials: {} + error: false + strict: false + - name: array of hashes, explicit false + template: '{% assign b = a | reject: ''title'', false %}{% for obj in b %}{% for + itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}' + want: '(title,bar), (title,), (heading,baz), ' + context: + a: + - title: false + - title: bar + - title: null + - heading: baz + partials: {} + error: false + strict: false + - name: array of hashes, explicit nil + template: '{% assign b = a | reject: ''title'', nil %}{% for obj in b %}{% for + itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}' + want: '(title,false), (title,), (heading,baz), ' + context: + a: + - title: foo + - title: false + - title: null + - heading: baz + partials: {} + error: false + strict: false + - name: array of hashes, explicit true + template: '{% assign b = a | reject: ''title'', true %}{% for obj in b %}{% for + itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}' + want: '(title,bar), (title,), ' + context: + a: + - title: true + - title: bar + - title: null + partials: {} + error: false + strict: false + - name: array of hashes, missing property + template: '{% assign b = a | reject: ''title'', ''bar'' %}{% for obj in b %}{% + for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}' + want: '(heading,foo), (title,), ' + context: + a: + - heading: foo + - title: bar + - title: null + partials: {} + error: false + strict: false + - name: array of hashes, string value + template: '{% assign b = a | reject: ''title'', ''bar'' %}{% for obj in b %}{% + for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}' + want: '(title,foo), (title,), (heading,baz), ' + context: + a: + - title: foo + - title: bar + - title: null + - heading: baz + partials: {} + error: false + strict: false + - name: array of strings, default value + template: '{% assign b = a | reject: ''c'' %}{% for obj in b %}{{ obj }}, {% endfor + %}' + want: 'x, y, ' + context: + a: + - x + - y + - cat + partials: {} + error: false + strict: false + - name: first argument is undefined + template: '{% assign b = a | reject: nosuchthing %}{% for obj in b %}{{ obj }}, + {% endfor %}' + want: '' + context: + a: + - x + - y + - cat + partials: {} + error: false + strict: false + - name: input is a hash, default value + template: '{% assign b = h | reject: ''bar'' %}{% for obj in b %}{{ obj }}, {% + endfor %}' + want: '' + context: + h: + foo: 1 + bar: 2 + baz: 3 + partials: {} + error: false + strict: false + - name: input is a hash, default value, nil match + template: '{% assign b = h | reject: ''bar'' %}{% for obj in b %}{% for itm in + obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}' + want: '(foo,1), (bar,), (baz,3), ' + context: + h: + foo: 1 + bar: null + baz: 3 + partials: {} + error: false + strict: false + - name: input is a hash, default value, no match + template: '{% assign b = h | reject: ''barbar'' %}{% for obj in b %}{% for itm + in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}' + want: '(foo,1), (bar,2), (baz,3), ' + context: + h: + foo: 1 + bar: 2 + baz: 3 + partials: {} + error: false + strict: false + - name: input is a hash, explicit nil match + template: '{% assign b = h | reject: ''bar'', nil %}{% for obj in b %}{% for itm + in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}' + want: '(foo,1), (bar,), (baz,3), ' + context: + h: + foo: 1 + bar: null + baz: 3 + partials: {} + error: false + strict: false + - name: input is a hash, int value, match + template: '{% assign b = h | reject: ''bar'', 2 %}{% for obj in b %}{% for itm + in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}' + want: '' + context: + h: + foo: 1 + bar: 2 + baz: 3 + partials: {} + error: false + strict: false + - name: input is a hash, int value, no match + template: '{% assign b = h | reject: ''bar'', 1 %}{% for obj in b %}{% for itm + in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}' + want: '(foo,1), (bar,2), (baz,3), ' + context: + h: + foo: 1 + bar: 2 + baz: 3 + partials: {} + error: false + strict: false + - name: input is undefined + template: '{% assign b = nosuchthing | reject: ''c'' %}{% for obj in b %}{{ obj + }}, {% endfor %}' + want: '' + context: {} + partials: {} + error: false + strict: false + - name: missing argument + template: '{% assign b = a | reject %}{% for obj in b %}{{ obj }}, {% endfor %}' + want: '' + context: + a: + - x + - y + - cat + partials: {} + error: true + strict: false + - name: nested array of hashes gets flattened + template: '{% assign b = a | reject: ''title'', ''bar'' %}{% for obj in b %}{% + for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}' + want: '(title,foo), (title,), ' + context: + a: + - - title: foo + - title: bar + - - - title: null + partials: {} + error: false + strict: false + - name: second argument is undefined + template: '{% assign b = a | reject: ''title'', nosuchthing %}{% for obj in b + %}{% for itm in obj %}({{ itm[0] }},{{ itm[1] }}), {% endfor %}{% endfor %}' + want: '(title,), ' + context: + a: + - title: foo + - title: bar + - title: null + partials: {} + error: false + strict: false + - name: string input becomes a single element array, no match + template: '{% assign b = s | reject: ''xx'' %}{% for obj in b %}{{ obj }}, {% + endfor %}' + want: 'foobar, ' + context: + s: foobar + partials: {} + error: false + strict: false + - name: string input becomes a single element array, substring match + template: '{% assign b = s | reject: ''oo'' %}{% for obj in b %}{{ obj }}, {% + endfor %}' + want: '' + context: + s: foobar + partials: {} + error: false + strict: false + - name: too many arguments + template: '{% assign b = a | reject: ''x'', ''y'', ''z'' %}{% for obj in b %}{{ + obj }}, {% endfor %}' + want: '' + context: {} + partials: {} + error: true + strict: false - name: liquid.golden.remove_filter tests: - name: argument not a string diff --git a/liquidjs/README.md b/liquidjs/README.md index 485f67e..b9a6f29 100644 --- a/liquidjs/README.md +++ b/liquidjs/README.md @@ -1,4 +1,4 @@ -# LiquidJS Version 10.20.1 +# LiquidJS Version 10.21.0 ``` npm install @@ -496,6 +496,83 @@ npx jest --noStackTrace Received function did not throw + ● liquid.golden.find_filter › array of hashes, with a nil + + expect(received).toBe(expected) // Object.is equality + + Expected: "" + Received: "bar" + + ● liquid.golden.find_filter › array of strings, default value + + expect(received).toBe(expected) // Object.is equality + + Expected: "z" + Received: "" + + ● liquid.golden.find_filter › array of strings, substring match, default value + + expect(received).toBe(expected) // Object.is equality + + Expected: "zoo" + Received: "" + + ● liquid.golden.find_filter › string input, default value, match + + expect(received).toBe(expected) // Object.is equality + + Expected: "zoo" + Received: "" + + ● liquid.golden.find_filter › string input, string value, match + + expect(received).toBe(expected) // Object.is equality + + Expected: "zoo" + Received: "" + + ● liquid.golden.find_index_filter › array of hashes, explicit nil, match + + expect(received).toBe(expected) // Object.is equality + + Expected: "" + Received: "0" + + ● liquid.golden.find_index_filter › array of strings, default value + + expect(received).toBe(expected) // Object.is equality + + Expected: "2" + Received: "" + + ● liquid.golden.find_index_filter › array of strings, substring match, default value + + expect(received).toBe(expected) // Object.is equality + + Expected: "2" + Received: "" + + ● liquid.golden.find_index_filter › hash input, explicit nil, match + + expect(received).toBe(expected) // Object.is equality + + Expected: "" + Received: "0" + + ● liquid.golden.find_index_filter › string input, default value, match + + expect(received).toBe(expected) // Object.is equality + + Expected: "0" + Received: "" + + ● liquid.golden.find_index_filter › string input, string value, match + + expect(received).toBe(expected) // Object.is equality + + Expected: "0" + Received: "" + ● liquid.golden.first_filter › first of a hash expect(received).toBe(expected) // Object.is equality @@ -589,6 +666,68 @@ npx jest --noStackTrace Expected: "i=1 j=1 k=1 i=1 j=1 k=2 i=1 j=2 k=1 i=1 j=2 k=2 i=2 j=1 k=1 i=2 j=1 k=2 i=2 j=2 k=1 i=2 j=2 k=2 " Received: "i= j= k=1 i= j= k=2 i= j= k=1 i= j= k=2 i= j= k=1 i= j= k=2 i= j= k=1 i= j= k=2 " + ● liquid.golden.has_filter › array of hashes, with a nil + + expect(received).toBe(expected) // Object.is equality + + Expected: "" + Received: "true" + + ● liquid.golden.has_filter › array of ints, default value + + expect(received).toBe(expected) // Object.is equality + + Expected: "true" + Received: "false" + + ● liquid.golden.has_filter › array of ints, string argument, default value + + expect(received).toThrow() + + Received function did not throw + + ● liquid.golden.has_filter › array of strings, default value + + expect(received).toBe(expected) // Object.is equality + + Expected: "true" + Received: "false" + + ● liquid.golden.has_filter › array of strings, default value, substring match + + expect(received).toBe(expected) // Object.is equality + + Expected: "true" + Received: "false" + + ● liquid.golden.has_filter › hash input, explicit nil, match + + expect(received).toBe(expected) // Object.is equality + + Expected: "false" + Received: "true" + + ● liquid.golden.has_filter › hash input, explicit nil, no match + + expect(received).toBe(expected) // Object.is equality + + Expected: "true" + Received: "false" + + ● liquid.golden.has_filter › mixed array, default value + + expect(received).toBe(expected) // Object.is equality + + Expected: "" + Received: "false" + + ● liquid.golden.has_filter › string input, default value, match + + expect(received).toBe(expected) // Object.is equality + + Expected: "true" + Received: "false" + ● liquid.golden.identifiers › capture leading hyphen expect(received).toThrow() @@ -964,6 +1103,73 @@ npx jest --noStackTrace Expected: "0#1#2#3#4#5" Received: "" + ● liquid.golden.reject_filter › array containing an int, default value + + expect(received).toThrow() + + Received function did not throw + + ● liquid.golden.reject_filter › array containing null, default value + + expect(received).toBe(expected) // Object.is equality + + Expected: "" + Received: "xycat" + + ● liquid.golden.reject_filter › array of hashes, explicit nil + + expect(received).toBe(expected) // Object.is equality + + Expected: "(title,false), (title,), (heading,baz), " + Received: "(title,foo), (title,false), " + + ● liquid.golden.reject_filter › array of strings, default value + + expect(received).toBe(expected) // Object.is equality + + Expected: "x, y, " + Received: "x, y, cat, " + + ● liquid.golden.reject_filter › first argument is undefined + + expect(received).toBe(expected) // Object.is equality + + Expected: "" + Received: "x, y, cat, " + + ● liquid.golden.reject_filter › input is a hash, explicit nil match + + expect(received).toBe(expected) // Object.is equality + + Expected: "(foo,1), (bar,), (baz,3), " + Received: "" + + ● liquid.golden.reject_filter › missing argument + + expect(received).toThrow() + + Received function did not throw + + ● liquid.golden.reject_filter › nested array of hashes gets flattened + + expect(received).toBe(expected) // Object.is equality + + Expected: "(title,foo), (title,), " + Received: "(,), (,), ([object Object],), " + + ● liquid.golden.reject_filter › string input becomes a single element array, substring match + + expect(received).toBe(expected) // Object.is equality + + Expected: "" + Received: "foobar, " + + ● liquid.golden.reject_filter › too many arguments + + expect(received).toThrow() + + Received function did not throw + ● liquid.golden.remove_filter › missing argument expect(received).toThrow() @@ -1769,8 +1975,8 @@ npx jest --noStackTrace TokenizationError: raw "{%- raw -%}{{ hello }}{%- end..." not closed, line:2, col:14 Test Suites: 1 failed, 1 total -Tests: 242 failed, 646 passed, 888 total +Tests: 272 failed, 688 passed, 960 total Snapshots: 0 total -Time: 3.106 s, estimated 7 s +Time: 3.219 s Ran all test suites. ``` diff --git a/liquidjs/package-lock.json b/liquidjs/package-lock.json index c408043..d9e0d61 100644 --- a/liquidjs/package-lock.json +++ b/liquidjs/package-lock.json @@ -14,7 +14,7 @@ "@typescript-eslint/parser": "^5.30.7", "eslint": "^8.20.0", "jest": "^28.1.3", - "liquidjs": "^10.20.1", + "liquidjs": "^10.21.0", "ts-jest": "^28.0.7", "typescript": "^4.7.4" } @@ -3358,9 +3358,9 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, "node_modules/liquidjs": { - "version": "10.20.1", - "resolved": "https://registry.npmjs.org/liquidjs/-/liquidjs-10.20.1.tgz", - "integrity": "sha512-eZ33jfxjj0It8tkY+I4gbKWfXvMmOvQvvraxVFSLcTjZWCjdWMLBnevk48qw9AQIwIHFp58vZc59vH9Qwdq7mw==", + "version": "10.21.0", + "resolved": "https://registry.npmjs.org/liquidjs/-/liquidjs-10.21.0.tgz", + "integrity": "sha512-DouqxNU2jfoZzb1LinVjOc/f6ssitGIxiDJT+kEKyYqPSSSd+WmGOAhtWbVm1/n75svu4aQ+FyQ3ctd3wh1bbw==", "dependencies": { "commander": "^10.0.0" }, diff --git a/liquidjs/package.json b/liquidjs/package.json index 7891800..8452ef6 100644 --- a/liquidjs/package.json +++ b/liquidjs/package.json @@ -15,7 +15,7 @@ "@typescript-eslint/parser": "^5.30.7", "eslint": "^8.20.0", "jest": "^28.1.3", - "liquidjs": "^10.20.1", + "liquidjs": "^10.21.0", "ts-jest": "^28.0.7", "typescript": "^4.7.4" } diff --git a/liquidpy/Pipfile b/liquidpy/Pipfile index 0f02706..6bf9681 100644 --- a/liquidpy/Pipfile +++ b/liquidpy/Pipfile @@ -4,9 +4,9 @@ verify_ssl = true name = "pypi" [packages] -liquidpy = "*" python-dateutil = "*" pytest = "*" +liquidpy = "*" [dev-packages] black = "*" diff --git a/liquidpy/Pipfile.lock b/liquidpy/Pipfile.lock index 0be6cad..fb25567 100644 --- a/liquidpy/Pipfile.lock +++ b/liquidpy/Pipfile.lock @@ -42,86 +42,87 @@ }, "jinja2": { "hashes": [ - "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369", - "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d" + "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb", + "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb" ], "markers": "python_version >= '3.7'", - "version": "==3.1.4" + "version": "==3.1.5" }, "liquidpy": { "hashes": [ - "sha256:641e090b63c2fd2c01b3046f9ae2d0dbfb2f388031d719e956c5d0cb2a5d2600", - "sha256:ff7c1752bed93f4e2e90b35919b081e50ad290b82acbd4402c6fa37b2762a497" + "sha256:b6472188d0de6e19dd56d582eeec7c4cc6f263b0c358a6a476e8d8793a78b4f6", + "sha256:e8f716d2ff7b95b2145650ca60f9f9c3222daf3afabc94f592c6cde1612d8b37" ], "index": "pypi", "markers": "python_version >= '3.7' and python_version < '4.0'", - "version": "==0.8.2" + "version": "==0.8.3" }, "markupsafe": { "hashes": [ - "sha256:00e046b6dd71aa03a41079792f8473dc494d564611a8f89bbbd7cb93295ebdcf", - "sha256:075202fa5b72c86ad32dc7d0b56024ebdbcf2048c0ba09f1cde31bfdd57bcfff", - "sha256:0e397ac966fdf721b2c528cf028494e86172b4feba51d65f81ffd65c63798f3f", - "sha256:17b950fccb810b3293638215058e432159d2b71005c74371d784862b7e4683f3", - "sha256:1f3fbcb7ef1f16e48246f704ab79d79da8a46891e2da03f8783a5b6fa41a9532", - "sha256:2174c595a0d73a3080ca3257b40096db99799265e1c27cc5a610743acd86d62f", - "sha256:2b7c57a4dfc4f16f7142221afe5ba4e093e09e728ca65c51f5620c9aaeb9a617", - "sha256:2d2d793e36e230fd32babe143b04cec8a8b3eb8a3122d2aceb4a371e6b09b8df", - "sha256:30b600cf0a7ac9234b2638fbc0fb6158ba5bdcdf46aeb631ead21248b9affbc4", - "sha256:397081c1a0bfb5124355710fe79478cdbeb39626492b15d399526ae53422b906", - "sha256:3a57fdd7ce31c7ff06cdfbf31dafa96cc533c21e443d57f5b1ecc6cdc668ec7f", - "sha256:3c6b973f22eb18a789b1460b4b91bf04ae3f0c4234a0a6aa6b0a92f6f7b951d4", - "sha256:3e53af139f8579a6d5f7b76549125f0d94d7e630761a2111bc431fd820e163b8", - "sha256:4096e9de5c6fdf43fb4f04c26fb114f61ef0bf2e5604b6ee3019d51b69e8c371", - "sha256:4275d846e41ecefa46e2015117a9f491e57a71ddd59bbead77e904dc02b1bed2", - "sha256:4c31f53cdae6ecfa91a77820e8b151dba54ab528ba65dfd235c80b086d68a465", - "sha256:4f11aa001c540f62c6166c7726f71f7573b52c68c31f014c25cc7901deea0b52", - "sha256:5049256f536511ee3f7e1b3f87d1d1209d327e818e6ae1365e8653d7e3abb6a6", - "sha256:58c98fee265677f63a4385256a6d7683ab1832f3ddd1e66fe948d5880c21a169", - "sha256:598e3276b64aff0e7b3451b72e94fa3c238d452e7ddcd893c3ab324717456bad", - "sha256:5b7b716f97b52c5a14bffdf688f971b2d5ef4029127f1ad7a513973cfd818df2", - "sha256:5dedb4db619ba5a2787a94d877bc8ffc0566f92a01c0ef214865e54ecc9ee5e0", - "sha256:619bc166c4f2de5caa5a633b8b7326fbe98e0ccbfacabd87268a2b15ff73a029", - "sha256:629ddd2ca402ae6dbedfceeba9c46d5f7b2a61d9749597d4307f943ef198fc1f", - "sha256:656f7526c69fac7f600bd1f400991cc282b417d17539a1b228617081106feb4a", - "sha256:6ec585f69cec0aa07d945b20805be741395e28ac1627333b1c5b0105962ffced", - "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5", - "sha256:7502934a33b54030eaf1194c21c692a534196063db72176b0c4028e140f8f32c", - "sha256:7a68b554d356a91cce1236aa7682dc01df0edba8d043fd1ce607c49dd3c1edcf", - "sha256:7b2e5a267c855eea6b4283940daa6e88a285f5f2a67f2220203786dfa59b37e9", - "sha256:823b65d8706e32ad2df51ed89496147a42a2a6e01c13cfb6ffb8b1e92bc910bb", - "sha256:8590b4ae07a35970728874632fed7bd57b26b0102df2d2b233b6d9d82f6c62ad", - "sha256:8dd717634f5a044f860435c1d8c16a270ddf0ef8588d4887037c5028b859b0c3", - "sha256:8dec4936e9c3100156f8a2dc89c4b88d5c435175ff03413b443469c7c8c5f4d1", - "sha256:97cafb1f3cbcd3fd2b6fbfb99ae11cdb14deea0736fc2b0952ee177f2b813a46", - "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc", - "sha256:a549b9c31bec33820e885335b451286e2969a2d9e24879f83fe904a5ce59d70a", - "sha256:ac07bad82163452a6884fe8fa0963fb98c2346ba78d779ec06bd7a6262132aee", - "sha256:ae2ad8ae6ebee9d2d94b17fb62763125f3f374c25618198f40cbb8b525411900", - "sha256:b91c037585eba9095565a3556f611e3cbfaa42ca1e865f7b8015fe5c7336d5a5", - "sha256:bc1667f8b83f48511b94671e0e441401371dfd0f0a795c7daa4a3cd1dde55bea", - "sha256:bec0a414d016ac1a18862a519e54b2fd0fc8bbfd6890376898a6c0891dd82e9f", - "sha256:bf50cd79a75d181c9181df03572cdce0fbb75cc353bc350712073108cba98de5", - "sha256:bff1b4290a66b490a2f4719358c0cdcd9bafb6b8f061e45c7a2460866bf50c2e", - "sha256:c061bb86a71b42465156a3ee7bd58c8c2ceacdbeb95d05a99893e08b8467359a", - "sha256:c8b29db45f8fe46ad280a7294f5c3ec36dbac9491f2d1c17345be8e69cc5928f", - "sha256:ce409136744f6521e39fd8e2a24c53fa18ad67aa5bc7c2cf83645cce5b5c4e50", - "sha256:d050b3361367a06d752db6ead6e7edeb0009be66bc3bae0ee9d97fb326badc2a", - "sha256:d283d37a890ba4c1ae73ffadf8046435c76e7bc2247bbb63c00bd1a709c6544b", - "sha256:d9fad5155d72433c921b782e58892377c44bd6252b5af2f67f16b194987338a4", - "sha256:daa4ee5a243f0f20d528d939d06670a298dd39b1ad5f8a72a4275124a7819eff", - "sha256:db0b55e0f3cc0be60c1f19efdde9a637c32740486004f20d1cff53c3c0ece4d2", - "sha256:e61659ba32cf2cf1481e575d0462554625196a1f2fc06a1c777d3f48e8865d46", - "sha256:ea3d8a3d18833cf4304cd2fc9cbb1efe188ca9b5efef2bdac7adc20594a0e46b", - "sha256:ec6a563cff360b50eed26f13adc43e61bc0c04d94b8be985e6fb24b81f6dcfdf", - "sha256:f5dfb42c4604dddc8e4305050aa6deb084540643ed5804d7455b5df8fe16f5e5", - "sha256:fa173ec60341d6bb97a89f5ea19c85c5643c1e7dedebc22f5181eb73573142c5", - "sha256:fa9db3f79de01457b03d4f01b34cf91bc0048eb2c3846ff26f66687c2f6d16ab", - "sha256:fce659a462a1be54d2ffcacea5e3ba2d74daa74f30f5f143fe0c58636e355fdd", - "sha256:ffee1f21e5ef0d712f9033568f8344d5da8cc2869dbd08d87c84656e6a2d2f68" - ], - "markers": "python_version >= '3.7'", - "version": "==2.1.5" + "sha256:0bff5e0ae4ef2e1ae4fdf2dfd5b76c75e5c2fa4132d05fc1b0dabcd20c7e28c4", + "sha256:0f4ca02bea9a23221c0182836703cbf8930c5e9454bacce27e767509fa286a30", + "sha256:1225beacc926f536dc82e45f8a4d68502949dc67eea90eab715dea3a21c1b5f0", + "sha256:131a3c7689c85f5ad20f9f6fb1b866f402c445b220c19fe4308c0b147ccd2ad9", + "sha256:15ab75ef81add55874e7ab7055e9c397312385bd9ced94920f2802310c930396", + "sha256:1a9d3f5f0901fdec14d8d2f66ef7d035f2157240a433441719ac9a3fba440b13", + "sha256:1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028", + "sha256:1e084f686b92e5b83186b07e8a17fc09e38fff551f3602b249881fec658d3eca", + "sha256:2181e67807fc2fa785d0592dc2d6206c019b9502410671cc905d132a92866557", + "sha256:2cb8438c3cbb25e220c2ab33bb226559e7afb3baec11c4f218ffa7308603c832", + "sha256:3169b1eefae027567d1ce6ee7cae382c57fe26e82775f460f0b2778beaad66c0", + "sha256:3809ede931876f5b2ec92eef964286840ed3540dadf803dd570c3b7e13141a3b", + "sha256:38a9ef736c01fccdd6600705b09dc574584b89bea478200c5fbf112a6b0d5579", + "sha256:3d79d162e7be8f996986c064d1c7c817f6df3a77fe3d6859f6f9e7be4b8c213a", + "sha256:444dcda765c8a838eaae23112db52f1efaf750daddb2d9ca300bcae1039adc5c", + "sha256:48032821bbdf20f5799ff537c7ac3d1fba0ba032cfc06194faffa8cda8b560ff", + "sha256:4aa4e5faecf353ed117801a068ebab7b7e09ffb6e1d5e412dc852e0da018126c", + "sha256:52305740fe773d09cffb16f8ed0427942901f00adedac82ec8b67752f58a1b22", + "sha256:569511d3b58c8791ab4c2e1285575265991e6d8f8700c7be0e88f86cb0672094", + "sha256:57cb5a3cf367aeb1d316576250f65edec5bb3be939e9247ae594b4bcbc317dfb", + "sha256:5b02fb34468b6aaa40dfc198d813a641e3a63b98c2b05a16b9f80b7ec314185e", + "sha256:6381026f158fdb7c72a168278597a5e3a5222e83ea18f543112b2662a9b699c5", + "sha256:6af100e168aa82a50e186c82875a5893c5597a0c1ccdb0d8b40240b1f28b969a", + "sha256:6c89876f41da747c8d3677a2b540fb32ef5715f97b66eeb0c6b66f5e3ef6f59d", + "sha256:6e296a513ca3d94054c2c881cc913116e90fd030ad1c656b3869762b754f5f8a", + "sha256:70a87b411535ccad5ef2f1df5136506a10775d267e197e4cf531ced10537bd6b", + "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8", + "sha256:846ade7b71e3536c4e56b386c2a47adf5741d2d8b94ec9dc3e92e5e1ee1e2225", + "sha256:88416bd1e65dcea10bc7569faacb2c20ce071dd1f87539ca2ab364bf6231393c", + "sha256:88b49a3b9ff31e19998750c38e030fc7bb937398b1f78cfa599aaef92d693144", + "sha256:8c4e8c3ce11e1f92f6536ff07154f9d49677ebaaafc32db9db4620bc11ed480f", + "sha256:8e06879fc22a25ca47312fbe7c8264eb0b662f6db27cb2d3bbbc74b1df4b9b87", + "sha256:9025b4018f3a1314059769c7bf15441064b2207cb3f065e6ea1e7359cb46db9d", + "sha256:93335ca3812df2f366e80509ae119189886b0f3c2b81325d39efdb84a1e2ae93", + "sha256:9778bd8ab0a994ebf6f84c2b949e65736d5575320a17ae8984a77fab08db94cf", + "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158", + "sha256:a123e330ef0853c6e822384873bef7507557d8e4a082961e1defa947aa59ba84", + "sha256:a904af0a6162c73e3edcb969eeeb53a63ceeb5d8cf642fade7d39e7963a22ddb", + "sha256:ad10d3ded218f1039f11a75f8091880239651b52e9bb592ca27de44eed242a48", + "sha256:b424c77b206d63d500bcb69fa55ed8d0e6a3774056bdc4839fc9298a7edca171", + "sha256:b5a6b3ada725cea8a5e634536b1b01c30bcdcd7f9c6fff4151548d5bf6b3a36c", + "sha256:ba8062ed2cf21c07a9e295d5b8a2a5ce678b913b45fdf68c32d95d6c1291e0b6", + "sha256:ba9527cdd4c926ed0760bc301f6728ef34d841f405abf9d4f959c478421e4efd", + "sha256:bbcb445fa71794da8f178f0f6d66789a28d7319071af7a496d4d507ed566270d", + "sha256:bcf3e58998965654fdaff38e58584d8937aa3096ab5354d493c77d1fdd66d7a1", + "sha256:c0ef13eaeee5b615fb07c9a7dadb38eac06a0608b41570d8ade51c56539e509d", + "sha256:cabc348d87e913db6ab4aa100f01b08f481097838bdddf7c7a84b7575b7309ca", + "sha256:cdb82a876c47801bb54a690c5ae105a46b392ac6099881cdfb9f6e95e4014c6a", + "sha256:cfad01eed2c2e0c01fd0ecd2ef42c492f7f93902e39a42fc9ee1692961443a29", + "sha256:d16a81a06776313e817c951135cf7340a3e91e8c1ff2fac444cfd75fffa04afe", + "sha256:d8213e09c917a951de9d09ecee036d5c7d36cb6cb7dbaece4c71a60d79fb9798", + "sha256:e07c3764494e3776c602c1e78e298937c3315ccc9043ead7e685b7f2b8d47b3c", + "sha256:e17c96c14e19278594aa4841ec148115f9c7615a47382ecb6b82bd8fea3ab0c8", + "sha256:e444a31f8db13eb18ada366ab3cf45fd4b31e4db1236a4448f68778c1d1a5a2f", + "sha256:e6a2a455bd412959b57a172ce6328d2dd1f01cb2135efda2e4576e8a23fa3b0f", + "sha256:eaa0a10b7f72326f1372a713e73c3f739b524b3af41feb43e4921cb529f5929a", + "sha256:eb7972a85c54febfb25b5c4b4f3af4dcc731994c7da0d8a0b4a6eb0640e1d178", + "sha256:ee55d3edf80167e48ea11a923c7386f4669df67d7994554387f84e7d8b0a2bf0", + "sha256:f3818cb119498c0678015754eba762e0d61e5b52d34c8b13d770f0719f7b1d79", + "sha256:f8b3d067f2e40fe93e1ccdd6b2e1d16c43140e76f02fb1319a05cf2b79d99430", + "sha256:fcabf5ff6eea076f859677f5f0b6b5c1a51e70a376b0579e0eadef8db48c6b50" + ], + "markers": "python_version >= '3.9'", + "version": "==3.0.2" }, "packaging": { "hashes": [ diff --git a/liquidpy/README.md b/liquidpy/README.md index 1ebb27c..0fc3faa 100644 --- a/liquidpy/README.md +++ b/liquidpy/README.md @@ -1,4 +1,4 @@ -# Liquidpy Version 0.8.2 +# Liquidpy Version 0.8.3 ``` pipenv install @@ -6,472 +6,542 @@ pipenv run pytest -q --tb=no ``` ``` -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.abs_filter > negative string float] - TypeError: bad operand type for abs(): 'str' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.abs_filter > negative string integer] - TypeError: bad operand type for abs(): 'str' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.abs_filter > not a string, int or float] - TypeError: bad operand type for abs(): 'dict' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.abs_filter > positive string float] - TypeError: bad operand type for abs(): 'str' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.abs_filter > positive string integer] - TypeError: bad operand type for abs(): 'str' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.abs_filter > string not a number] - TypeError: bad operand type for abs(): 'str' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.abs_filter > undefined left value] - TypeError: bad operand type for abs(): 'Undefined' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.assign_tag > assign to variable with a hyphen] - jinja2.exceptions.TemplateSyntaxError: expected token '=', got '-' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.at_least_filter > argument string not a number] - TypeError: '>' not supported between instances of 'str' and 'int' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.at_least_filter > left value not a number] - TypeError: '>' not supported between instances of 'int' and 'str' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.at_least_filter > left value not a number negative argument] - TypeError: '>' not supported between instances of 'int' and 'str' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.at_least_filter > positive string > arg] - TypeError: '>' not supported between instances of 'int' and 'str' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.at_least_filter > too many args] - Failed: DID NOT RAISE -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.at_least_filter > undefined argument] - jinja2.exceptions.UndefinedError: 'nosuchthing' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.at_least_filter > undefined left value] - jinja2.exceptions.UndefinedError: 'nosuchthing' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.at_most_filter > left value not a number] - TypeError: '<' not supported between instances of 'int' and 'str' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.at_most_filter > positive string > arg] - TypeError: '<' not supported between instances of 'int' and 'str' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.at_most_filter > too many args] - Failed: DID NOT RAISE -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.at_most_filter > undefined argument] - jinja2.exceptions.UndefinedError: 'nosuchthing' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.at_most_filter > undefined left value] - jinja2.exceptions.UndefinedError: 'nosuchthing' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.base64_decode_filter > from string] - jinja2.exceptions.TemplateAssertionError: No filter named 'base64_decode'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.base64_decode_filter > from string with URL unsafe] - jinja2.exceptions.TemplateAssertionError: No filter named 'base64_decode'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.base64_decode_filter > undefined left value] - jinja2.exceptions.TemplateAssertionError: No filter named 'base64_decode'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.base64_encode_filter > from string] - jinja2.exceptions.TemplateAssertionError: No filter named 'base64_encode'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.base64_encode_filter > from string with URL unsafe] - jinja2.exceptions.TemplateAssertionError: No filter named 'base64_encode'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.base64_encode_filter > not a string] - jinja2.exceptions.TemplateAssertionError: No filter named 'base64_encode'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.base64_encode_filter > undefined left value] - jinja2.exceptions.TemplateAssertionError: No filter named 'base64_encode'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.base64_url_safe_decode_filter > from string] - jinja2.exceptions.TemplateAssertionError: No filter named 'base64_url_safe_decode'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.base64_url_safe_decode_filter > from string with URL unsafe] - jinja2.exceptions.TemplateAssertionError: No filter named 'base64_url_safe_decode'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.base64_url_safe_decode_filter > undefined left value] - jinja2.exceptions.TemplateAssertionError: No filter named 'base64_url_safe_decode'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.base64_url_safe_encode_filter > from string] - jinja2.exceptions.TemplateAssertionError: No filter named 'base64_url_safe_encode'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.base64_url_safe_encode_filter > from string with URL unsafe] - jinja2.exceptions.TemplateAssertionError: No filter named 'base64_url_safe_encode'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.base64_url_safe_encode_filter > not a string] - jinja2.exceptions.TemplateAssertionError: No filter named 'base64_url_safe_encode'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.base64_url_safe_encode_filter > undefined left value] - jinja2.exceptions.TemplateAssertionError: No filter named 'base64_url_safe_encode'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.capture_tag > capture into a variable with a hyphen] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got '-' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.case_tag > comma separated when expression] - AssertionError: assert '' == 'bar' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.case_tag > evaluate multiple matching blocks] - AssertionError: assert 'foo' == 'foobarbar' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.case_tag > falsy when before and truthy when after else] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'when'. Jinja was looking for the following tags: 'endcase'. The innermost block that needs to be closed is 'case'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.case_tag > falsy when before and truthy when after multiple else blocks] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'else'. Jinja was looking for the following tags: 'endcase'. The innermost block that needs to be closed is 'case'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.case_tag > mix or and comma separated when expression] - AssertionError: assert '' == 'barbar' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.case_tag > multiple else blocks] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'else'. Jinja was looking for the following tags: 'endcase'. The innermost block that needs to be closed is 'case'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.case_tag > no whens] - jinja2.exceptions.TemplateSyntaxError: expected token 'when', got 'else' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.case_tag > no whens or default] - jinja2.exceptions.TemplateSyntaxError: expected token 'when', got 'endcase' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.case_tag > or separated when expression] - AssertionError: assert '' == 'bar' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.case_tag > truthy when before and after else] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'when'. Jinja was looking for the following tags: 'endcase'. The innermost block that needs to be closed is 'case'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.ceil_filter > not a string, int or float] - TypeError: float() argument must be a string or a number, not 'dict' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.ceil_filter > string not a number] - ValueError: could not convert string to float: 'hello' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.ceil_filter > undefined left value] - jinja2.exceptions.UndefinedError: 'nosuchthing' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.compact_filter > array of objects with key property] - TypeError: compact() takes 1 positional argument but 2 were given -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.compact_filter > empty array] - TypeError: 'EmptyDrop' object is not iterable -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.compact_filter > left value is not an array] - TypeError: 'int' object is not iterable -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.concat_filter > left value is not array-like] - TypeError: descriptor '__add__' requires a 'list' object but received a 'str' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.concat_filter > nested left value gets flattened] - assert "['a', 'x']#[..., ['z']]]#c#d" == 'a#x#b#y#z#c#d' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.concat_filter > range literal concat filter left value] - TypeError: descriptor '__add__' requires a 'list' object but received a 'range' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.concat_filter > undefined left value] - TypeError: descriptor '__add__' requires a 'list' object but received a 'Undefined' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.cycle_tag > changing variable name] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got ':' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.cycle_tag > different items] - jinja2.exceptions.UndefinedError: 'loop' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.cycle_tag > integers] - jinja2.exceptions.UndefinedError: 'loop' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.cycle_tag > multiple undefined variable names] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got ':' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.cycle_tag > named with different items] - jinja2.exceptions.UndefinedError: 'loop' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.cycle_tag > named with different number of arguments] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got ':' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.cycle_tag > named with growing number of arguments] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got ':' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.cycle_tag > named with shrinking number of arguments] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got ':' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.cycle_tag > no identifier] - jinja2.exceptions.UndefinedError: 'loop' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.cycle_tag > undefined variable names mixed with no name] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got ':' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.cycle_tag > variable name] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got ':' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.cycle_tag > with identifier] - jinja2.exceptions.UndefinedError: 'loop' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.date_filter > negative timestamp string] - dateutil.parser._parser.ParserError: year 1152098955 is out of range: -1152098955 -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.date_filter > timestamp string] - dateutil.parser._parser.ParserError: year 1152098955 is out of range: 1152098955 -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.date_filter > undefined argument] - TypeError: strftime() argument 1 must be str, not Undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.date_filter > undefined left value] - jinja2.exceptions.UndefinedError: 'nosuchthing' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.decrement_tag > increment and decrement named counter] - AssertionError: assert '-1 -2 -1' == '-1 -2 -2' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.decrement_tag > named counter] - AssertionError: assert '-1 -2' == '-1-1 -2-2' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.default_filter > allow false] - AssertionError: assert 'False' == 'false' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.default_filter > allow false from context] - AssertionError: assert 'False' == 'false' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.default_filter > empty array] - AssertionError: assert '[]' == 'foo' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.default_filter > empty object] - AssertionError: assert '{}' == 'foo' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.default_filter > false] - AssertionError: assert 'False' == 'foo' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.default_filter > false keyword argument before positional] - jinja2.exceptions.TemplateSyntaxError: invalid syntax for function call expression -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.default_filter > missing argument] - TypeError: default() missing 1 required positional argument: 'deft' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.default_filter > not empty object] - AssertionError: assert '(g,r)' == '(greeting,hello)' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.default_filter > true keyword argument before positional] - jinja2.exceptions.TemplateSyntaxError: invalid syntax for function call expression -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.divided_by_filter > float value and integer arg] - AssertionError: assert '4.0' == '4.5' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.divided_by_filter > left value is an empty string] - TypeError: unsupported operand type(s) for //: 'str' and 'int' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.divided_by_filter > not a string, int or float] - TypeError: unsupported operand type(s) for //: 'dict' and 'int' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.divided_by_filter > string not a number] - TypeError: unsupported operand type(s) for /: 'str' and 'str' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.divided_by_filter > string value and argument] - TypeError: unsupported operand type(s) for /: 'str' and 'str' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.divided_by_filter > undefined left value] - jinja2.exceptions.UndefinedError: 'nosuchthing' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.downcase_filter > not a string] - TypeError: descriptor 'lower' for 'str' objects doesn't apply to a 'int' object -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.downcase_filter > undefined left value] - TypeError: descriptor 'lower' for 'str' objects doesn't apply to a 'Undefined' object -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.echo_tag > access an array item by index] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'echo'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.echo_tag > access an array item by negative index] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'echo'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.echo_tag > access an undefined variable by index] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'echo'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.echo_tag > access array item by index stored in a local variable] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'echo'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.echo_tag > assign a variable the value of an existing variable] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'echo'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.echo_tag > dump an array from the global context] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'echo'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.echo_tag > nothing to echo] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'echo'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.echo_tag > render a float literal] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'echo'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.echo_tag > render a global identifier with a filter] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'echo'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.echo_tag > render a string literal] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'echo'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.echo_tag > render a variable from the global namespace] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'echo'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.echo_tag > render a variable from the local namespace] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'echo'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.echo_tag > render an integer literal] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'echo'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.echo_tag > render an undefined property] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'echo'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.echo_tag > render an undefined variable] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'echo'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.echo_tag > traverse variables with bracketed identifiers] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'echo'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.escape_filter > not a string] - AttributeError: 'int' object has no attribute 'replace' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.escape_filter > undefined left value] - jinja2.exceptions.UndefinedError: 'nosuchthing' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.escape_filter > unexpected argument] - Failed: DID NOT RAISE -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.escape_once_filter > not a string] - TypeError: argument of type 'int' is not iterable -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.escape_once_filter > undefined left value] - jinja2.exceptions.UndefinedError: 'nosuchthing' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.first_filter > first of a hash] - AssertionError: assert '(b,)' == '(b,1)' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.first_filter > first of a string] - AssertionError: assert 'h' == '' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.first_filter > left value is not an array] - TypeError: 'int' object is not iterable -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.floor_filter > not a string, int or float] - TypeError: float() argument must be a string or a number, not 'dict' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.floor_filter > string not a number] - ValueError: could not convert string to float: 'hello' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.floor_filter > undefined left value] - jinja2.exceptions.UndefinedError: 'nosuchthing' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > access parentloop] - jinja2.exceptions.UndefinedError: 'jinja2.runtime.LoopContext object' has no attribute 'parentloop' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > assign inside loop] - AssertionError: assert '' == 'garden' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > blank empty loops] - AssertionError: assert ' ' == '' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > break] - AssertionError: assert 'no images' == '' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > comma separated arguments] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got 'integer' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > continue a loop] - TypeError: slice indices must be integers or None or have an __index__ method -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > continue a loop over a changing array] - TypeError: slice indices must be integers or None or have an __index__ method -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > continue a loop over an assigned range] - TypeError: slice indices must be integers or None or have an __index__ method -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > continue from a limit that is greater than length] - TypeError: slice indices must be integers or None or have an __index__ method -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > continue from a range expression] - TypeError: slice indices must be integers or None or have an __index__ method -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > continue with changing loop var] - TypeError: slice indices must be integers or None or have an __index__ method -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > first and last with an offset and limit] - AssertionError: assert 'garden True ...e False True ' == 'garden true ...e false true ' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > first and last with offset continue] - TypeError: slice indices must be integers or None or have an __index__ method -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > forloop goes out of scope] - jinja2.exceptions.UndefinedError: 'loop' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > forloop name] - AssertionError: assert '' == 'tag-product.tags' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > forloop name of a range] - AssertionError: assert '' == 'i-(1..3)' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > forloop.first] - AssertionError: assert 'True False ' == 'true false ' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > forloop.last] - AssertionError: assert 'False True ' == 'false true ' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > limit is a string] - jinja2.exceptions.TemplateSyntaxError: Expected an integer or a variable as argument for 'limit'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > loop over a string literal] - AssertionError: assert 'h e l l o ' == 'hello ' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > loop over a string variable] - AssertionError: assert 'h e l l o ' == 'hello ' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > loop over range with float start] - jinja2.exceptions.TemplateSyntaxError: expected name or number -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > nothing to continue from] - TypeError: slice indices must be integers or None or have an __index__ method -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > offset continue forloop length] - TypeError: slice indices must be integers or None or have an __index__ method -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > offset continue from a broken loop] - TypeError: slice indices must be integers or None or have an __index__ method -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > offset continue from a broken loop with preceding limit] - TypeError: slice indices must be integers or None or have an __index__ method -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > offset continue twice with changing limit] - jinja2.exceptions.UndefinedError: 'continue' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > offset continue twice with limit] - jinja2.exceptions.UndefinedError: 'continue' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > offset continue twice with no second limit] - TypeError: slice indices must be integers or None or have an __index__ method -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > offset continue without preceding loop] - TypeError: slice indices must be integers or None or have an __index__ method -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > offset is a string] - jinja2.exceptions.TemplateSyntaxError: Expected an integer or a variable as argument for 'offset'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > parent's parentloop] - jinja2.exceptions.UndefinedError: 'jinja2.runtime.LoopContext object' has no attribute 'parentloop' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > parentloop goes out of scope] - jinja2.exceptions.UndefinedError: 'jinja2.runtime.LoopContext object' has no attribute 'parentloop' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > parentloop is normally undefined] - jinja2.exceptions.UndefinedError: 'jinja2.runtime.LoopContext object' has no attribute 'parentloop' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > range loop using identifier] - jinja2.exceptions.TemplateSyntaxError: expected name or number -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > share outer scope] - AssertionError: assert 'hello' == '3' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > simple hash loop] - AssertionError: assert 't i d e ' == 'title foo description bar ' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.for_tag > some comma separated arguments] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got ',' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.identifiers > capture hyphens] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got '-' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.identifiers > capture only digits] - jinja2.exceptions.TemplateSyntaxError: can't assign to 'const' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.identifiers > decrement with a hyphen] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got '-' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.identifiers > hyphen in for loop target] - jinja2.exceptions.UndefinedError: 'f' is undefined -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.identifiers > hyphen in for loop variable] - jinja2.exceptions.TemplateSyntaxError: expected token 'in', got '-' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.identifiers > hyphens] - jinja2.exceptions.TemplateSyntaxError: expected token '=', got '-' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.identifiers > increment with a hyphen] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got '-' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.identifiers > only digits] - jinja2.exceptions.TemplateSyntaxError: can't assign to 'const' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.identifiers > trailing question mark in for loop target] - jinja2.exceptions.TemplateSyntaxError: unexpected char '?' at 15 -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.identifiers > trailing question mark in for loop variable] - jinja2.exceptions.TemplateSyntaxError: unexpected char '?' at 8 -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.identifiers > trailing question mark output] - jinja2.exceptions.TemplateSyntaxError: unexpected char '?' at 6 -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > 0.0 is truthy] - AssertionError: assert 'Goodbye' == 'Hello' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > alternate not equal condition] - jinja2.exceptions.TemplateSyntaxError: unexpected '>' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > blocks that contain only whitespace and comments are not rendered] - AssertionError: assert ' ' == '' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > blocks that contain only whitespace are not rendered] - AssertionError: assert ' ' == '' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > else tag expressions are ignored] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got 'nonsense' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > empty array equals special empty] - AssertionError: assert 'FALSE' == 'TRUE' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > empty array is truthy] - AssertionError: assert 'FALSE' == 'TRUE' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > empty object equals special empty] - AssertionError: assert 'FALSE' == 'TRUE' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > empty object is truthy] - AssertionError: assert 'FALSE' == 'TRUE' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > empty string is truthy] - AssertionError: assert 'FALSE' == 'TRUE' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > extra else blocks are ignored] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'else'. Jinja was looking for the following tags: 'endif'. The innermost block that needs to be closed is 'if'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > extra elsif blocks are ignored] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'elsif'. Jinja was looking for the following tags: 'endif'. The innermost block that needs to be closed is 'if'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > logical operators are right associative] - AssertionError: assert 'hello' == '' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > one is not equal to true] - AssertionError: assert 'Hello' == 'Goodbye' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > string contains int] - TypeError: 'in ' requires string as left operand, not int -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > undefined is equal to nil] - AssertionError: assert 'FALSE' == 'TRUE' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > zero is not equal to false] - AssertionError: assert 'Hello' == 'Goodbye' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.if_tag > zero is truthy] - AssertionError: assert 'Goodbye' == 'Hello' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.ifchanged_tag > change from assign] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'ifchanged'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.ifchanged_tag > changed from initial state] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'ifchanged'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.ifchanged_tag > no change from assign] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'ifchanged'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.ifchanged_tag > not changed from initial state] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'ifchanged'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.ifchanged_tag > within for loop] - jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'ifchanged'. Jinja was looking for the following tags: 'endfor' or 'else'. The innermost block that needs to be closed is 'for'. -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.illegal > no addition operator] - Failed: DID NOT RAISE -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.illegal > no multiplication operator] - Failed: DID NOT RAISE -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.illegal > no subtraction operator] - Failed: DID NOT RAISE -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.include_tag > assign persists in outer scope] - AssertionError: assert 'Hello, Holly ' == 'Hello, Holly Smith' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.include_tag > assign to a keyword argument] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got ',' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.include_tag > bound array variable] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got 'for' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.include_tag > bound variable] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got 'with' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.include_tag > bound variable does not exist] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got 'with' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.include_tag > bound variable with alias] - jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got 'with' -FAILED test_golden_liquid.py::test_render_liquid[liquid.golden.include_tag > break from include] - File "