duster/js/test_cases/helpers_eq/main.dust

34 lines
2.8 KiB
Plaintext
Raw Normal View History

{@eq key=str value="master"}str is equal to "master"{:else}str does not equal "master"{/eq}{~n}
{@eq key=str value="7"}str is equal to "7"{:else}str does not equal "7"{/eq}{~n}
{@eq key=int value="7"}int is equal to "7"{:else}int does not equal "7"{/eq}{~n}
{@eq key=int value=7}int is equal to 7{:else}int does not equal 7{/eq}{~n}
{@eq key=alpha value=beta}alpha is equal to beta{:else}alpha does not equal beta{/eq}{~n}
2020-05-10 18:22:59 +00:00
{@eq value=beta}missing key is true{:else}missing key is false{/eq}{~n}
{@eq value=gamma}missing key and non-existent value is true{:else}missing key and non-existent value is false{/eq}{~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}
2020-05-10 18:33:17 +00:00
{@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 is false{/eq}{~n}
2020-05-16 18:15:44 +00:00
{@eq key=array_lower value=array_higher}[3,5,7] is equal to [8,9]{:else}[3,5,7] does not equal [8,9]{/eq}{~n}
2020-05-16 18:48:04 +00:00
{! non-scalar and copied value tests !}
{@eq key=array_lower value=array_lower}array_lower is equal to array_lower{:else}array_lower does not equal array_lower{/eq}{~n}
{@eq key=array_lower value=copy_array_lower}array_lower is equal to copy_array_lower{:else}array_lower does not equal copy_array_lower{/eq}{~n}
{@eq key=some_obj value=some_obj}some_obj is equal to some_obj{:else}some_obj does not equal some_obj{/eq}{~n}
{@eq key=some_obj value=copy_some_obj}some_obj is equal to copy_some_obj{:else}some_obj does not equal copy_some_obj{/eq}{~n}
{@eq key=some_obj value=other_obj}some_obj is equal to other_obj{:else}some_obj does not equal other_obj{/eq}{~n}
{@eq key=array_of_some_obj value=array_of_some_obj}array_of_some_obj is equal to array_of_some_obj{:else}array_of_some_obj does not equal array_of_some_obj{/eq}{~n}
{@eq key=array_of_some_obj value=copy_array_of_some_obj}array_of_some_obj is equal to copy_array_of_some_obj{:else}array_of_some_obj does not equal copy_array_of_some_obj{/eq}{~n}
{@eq key=array_of_some_obj value=array_of_other_obj}array_of_some_obj is equal to array_of_other_obj{:else}array_of_some_obj does not equal array_of_other_obj{/eq}{~n}
Do objects with different paths referencing the same variable match?{~n}
===================================================================={~n}
{#int renamed=some_obj}
{@eq key=some_obj value=renamed}some_obj equals renamed{:else}some_obj does not equal renamed{/eq}{~n}
{/int}
Floating point equality{~n}
======================={~n}
{@eq key=int value=7.0}int is equal to 7.0{:else}int is not equal to 7.0{/eq}