Add arrays to all helpers tests.
This commit is contained in:
@@ -2,4 +2,6 @@ Based on my tests, it appears dust is sorting based on ascii-table values. This
|
||||
|
||||
All comparisons between non-matching types (for example, int vs string) appear to render the else block.
|
||||
|
||||
Comparisons between non-scalar types (like arrays) appears to render the else block.
|
||||
|
||||
Greater than follows the same pattern for not rendering when key is omitted or null.
|
||||
|
||||
@@ -5,5 +5,14 @@
|
||||
"beta": "21",
|
||||
"null": null,
|
||||
"true_value": true,
|
||||
"false_value": false
|
||||
"false_value": false,
|
||||
"array_lower": [
|
||||
3,
|
||||
5,
|
||||
7
|
||||
],
|
||||
"array_higher": [
|
||||
8,
|
||||
9
|
||||
]
|
||||
}
|
||||
|
||||
@@ -22,3 +22,5 @@ beta is {beta}{~n}
|
||||
{@gt key="a" value="}"}"a" is greater than "}"{:else}"a" is less than or equal to "}"{/gt}{~n}
|
||||
{@gt key="☃" value="☄"}"☃" is greater than "☄"{:else}"☃" is less than or equal to "☄"{/gt}{~n}
|
||||
{@gt key=true_value value=false_value}true is greater than false{:else}true is less than or equal to false{/gt}{~n}
|
||||
{@gt key=array_lower value=array_higher}[3,5,7] is greater than [8,9]{:else}[3,5,7] is less than or equal to [8,9]{/gt}{~n}
|
||||
{@gt key=array_higher value=array_lower}[8,9] is greater than [3,5,7]{:else}[8,9] is less than or equal to [3,5,7]{/gt}{~n}
|
||||
|
||||
Reference in New Issue
Block a user