Extending the equality helper test.
This commit is contained in:
parent
7a8247f38a
commit
c8cf6a78a0
@ -1,5 +1,10 @@
|
||||
Without a key parameter, neither the main block nor the else block is rendered.
|
||||
|
||||
Without a value parameter, it probably uses "null" but I haven't yet confirmed that with additional testing. Potentially could also just be making all falsey values equal.
|
||||
|
||||
Literal values work in both keys and values.
|
||||
|
||||
Can't Walk Theory
|
||||
-----------------
|
||||
|
||||
Assuming a missing value = cantwalk and a non-existent key = cantwalk then their equality makes sense.
|
||||
|
||||
The null tests have proven that absent parameters and missing values do not equal null and therefore it is not just making all falsey values equal.
|
||||
|
@ -2,5 +2,6 @@
|
||||
"str": "master",
|
||||
"int": 7,
|
||||
"alpha": 21,
|
||||
"beta": "21"
|
||||
"beta": "21",
|
||||
"null": null
|
||||
}
|
||||
|
@ -13,3 +13,6 @@ beta is {beta}{~n}
|
||||
{@eq key=alpha}missing value is true{:else}missing value is false{/eq}{~n}
|
||||
{@eq key=gamma}missing value and non-existent key is true{:else}missing value and non-existent key is false{/eq}{~n}
|
||||
{@eq key="master" value="master"}"master" is equal to "master"{:else}"master" does not equal "master"{/eq}{~n}
|
||||
{@eq key=null}null equals a missing value{:else}null does not equal a missing value{/eq}{~n}
|
||||
{@eq key=null value=gamma}null equals a non-existent value{:else}null does not equal a non-existent value{/eq}{~n}
|
||||
{@eq}no parameters is true{:else}no parameters if false{/eq}{~n}
|
||||
|
Loading…
Reference in New Issue
Block a user