Skip to content

Commit

Permalink
Done more
Browse files Browse the repository at this point in the history
  • Loading branch information
edgurgel committed Jul 7, 2024
1 parent 7de5d3e commit f7e5216
Show file tree
Hide file tree
Showing 36 changed files with 43 additions and 50 deletions.
1 change: 0 additions & 1 deletion test/cases/119/_inner.liquid

This file was deleted.

1 change: 0 additions & 1 deletion test/cases/119/input.json

This file was deleted.

2 changes: 0 additions & 2 deletions test/cases/119/input.liquid

This file was deleted.

1 change: 0 additions & 1 deletion test/cases/120/_inner.liquid

This file was deleted.

1 change: 0 additions & 1 deletion test/cases/120/input.json

This file was deleted.

2 changes: 0 additions & 2 deletions test/cases/120/input.liquid

This file was deleted.

1 change: 0 additions & 1 deletion test/cases/121/_inner.liquid

This file was deleted.

1 change: 0 additions & 1 deletion test/cases/121/input.json

This file was deleted.

2 changes: 0 additions & 2 deletions test/cases/121/input.liquid

This file was deleted.

1 change: 0 additions & 1 deletion test/cases/122/_inner.liquid

This file was deleted.

1 change: 0 additions & 1 deletion test/cases/122/input.json

This file was deleted.

3 changes: 0 additions & 3 deletions test/cases/122/input.liquid

This file was deleted.

1 change: 0 additions & 1 deletion test/cases/123/_inner1.liquid

This file was deleted.

1 change: 0 additions & 1 deletion test/cases/123/_inner2.liquid

This file was deleted.

1 change: 0 additions & 1 deletion test/cases/123/input.json

This file was deleted.

3 changes: 0 additions & 3 deletions test/cases/123/input.liquid

This file was deleted.

1 change: 0 additions & 1 deletion test/cases/129/input.json

This file was deleted.

3 changes: 0 additions & 3 deletions test/cases/129/input.liquid

This file was deleted.

1 change: 0 additions & 1 deletion test/cases/130/input.json

This file was deleted.

3 changes: 0 additions & 3 deletions test/cases/130/input.liquid

This file was deleted.

1 change: 0 additions & 1 deletion test/cases/131/input.json

This file was deleted.

2 changes: 0 additions & 2 deletions test/cases/131/input.liquid

This file was deleted.

1 change: 0 additions & 1 deletion test/cases/132/input.json

This file was deleted.

2 changes: 0 additions & 2 deletions test/cases/132/input.liquid

This file was deleted.

6 changes: 0 additions & 6 deletions test/cases/134/input.json

This file was deleted.

5 changes: 0 additions & 5 deletions test/cases/134/input.liquid

This file was deleted.

7 changes: 6 additions & 1 deletion test/cases/filter/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"my_array" : [1, 2, 3],
"string" : "A string",
"fruits" : "apples, oranges, peaches, plums",
"input": "hello %{first_name}, %{last_name}", "surname": "john"
"input": "hello %{first_name}, %{last_name}", "surname": "john",
"my_string" : "abba abba cde cde",
"var_nil": null,
"var_false": false,
"var_empty_array": [],
"var_empty_string": ""
}
15 changes: 15 additions & 0 deletions test/cases/filter/input.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,18 @@
{{ 183 | modulo: 12 }}

{{ input | substitute: first_name: surname, last_name: 'doe' }}

{{ "one two three" | base64_encode }}
{{ "b25lIHR3byB0aHJlZQ==" | base64_decode }}

{{ "https://github.com/edgurgel/solid" | base64_url_safe_encode }}
{{ "aHR0cHM6Ly9naXRodWIuY29tL2VkZ3VyZ2VsL3NvbGlk" | base64_url_safe_decode }}

{{ my_string | remove_last: "cde" }}
{{ my_string | replace_last: "cde", "fgh" }}

{{ var_nil | default: "nil" }}
{{ var_false | default: "false" }}
{{ var_empty_array | default: "empty array" }}
{{ var_empty_string | default: "empty string" }}

File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions test/cases/render/_inner_argument.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello {{ name }}
1 change: 1 addition & 0 deletions test/cases/render/_inner_object.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ product.name }}
1 change: 1 addition & 0 deletions test/cases/render/_nested1.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
one {% render "nested2" %}
1 change: 1 addition & 0 deletions test/cases/render/_nested2.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
two
6 changes: 5 additions & 1 deletion test/cases/render/input.json
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
{}
{
"outer_product": {
"name": "my_product"
}
}
13 changes: 13 additions & 0 deletions test/cases/render/input.liquid
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
render template
{% render "inner" %}

render template with named argument and literal value
{% assign two = "should not be visible inside the inner_argument template" %}
{% render "inner_argument", name: "Sam", one: "1", two: 2, var1: 3, 123a: "23" %}

render template and pass argument to inner scope
{% render "inner_object", product: outer_product %}

rendered template should not inherit parent context

test nested render tag

{% render "nested1" %}

0 comments on commit f7e5216

Please sign in to comment.