Add tests for copied values.

This commit is contained in:
Tom Alexander
2020-05-16 14:48:04 -04:00
parent 6dbeb77a28
commit d751df6fd5
7 changed files with 162 additions and 2 deletions

View File

@@ -11,8 +11,50 @@
5,
7
],
"copy_array_lower": [
3,
5,
7
],
"array_higher": [
8,
9
],
"some_obj": {
"name": "cat"
},
"copy_some_obj": {
"name": "cat"
},
"other_obj": {
"name": "dog"
},
"array_of_some_obj": [
{
"name": "cat"
},
{
"name": "cat"
}
],
"copy_array_of_some_obj": [
{
"name": "cat"
},
{
"name": "cat"
}
],
"array_of_other_obj": [
{
"name": "dog"
},
{
"name": "dog"
}
],
"array_of_strings": [
"cat",
"dog"
]
}

View File

@@ -24,3 +24,12 @@ beta is {beta}{~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}
{! non-scalar and copied value tests !}
{@gt key=array_lower value=array_lower}array_lower is greater than array_lower{:else}array_lower is less than or equal to array_lower{/gt}{~n}
{@gt key=array_lower value=copy_array_lower}array_lower is greater than copy_array_lower{:else}array_lower is less than or equal to copy_array_lower{/gt}{~n}
{@gt key=some_obj value=some_obj}some_obj is greater than some_obj{:else}some_obj is less than or equal to some_obj{/gt}{~n}
{@gt key=some_obj value=copy_some_obj}some_obj is greater than copy_some_obj{:else}some_obj is less than or equal to copy_some_obj{/gt}{~n}
{@gt key=some_obj value=other_obj}some_obj is greater than other_obj{:else}some_obj is less than or equal to other_obj{/gt}{~n}
{@gt key=array_of_some_obj value=array_of_some_obj}array_of_some_obj is greater than array_of_some_obj{:else}array_of_some_obj is less than or equal to array_of_some_obj{/gt}{~n}
{@gt key=array_of_some_obj value=copy_array_of_some_obj}array_of_some_obj is greater than copy_array_of_some_obj{:else}array_of_some_obj is less than or equal to copy_array_of_some_obj{/gt}{~n}
{@gt key=array_of_some_obj value=array_of_other_obj}array_of_some_obj is greater than array_of_other_obj{:else}array_of_some_obj is less than or equal to array_of_other_obj{/gt}{~n}