Add greater-than-specific tests to investigate string ordering.

This commit is contained in:
Tom Alexander 2020-05-16 13:06:52 -04:00
parent f390c05a4c
commit 8a44bc6fd9
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
Since "master" is greater than "7", dust is probably ordering based on either alphabetic sorting or ascii values.
Based on my tests, it appears dust is sorting based on ascii-table values. This also appears to extend to unicode codepoints based on a symbols test.
All comparisons between non-matching types (for example, int vs string) appear to render the else block.

View File

@ -17,4 +17,7 @@ beta is {beta}{~n}
{@gt key=null}null is greater than a missing value{:else}null is less than or equal to a missing value{/gt}{~n}
{@gt key=null value=gamma}null is greater than a non-existent value{:else}null is less than or equal to a non-existent value{/gt}{~n}
{@gt}no parameters is true{:else}no parameters is false{/gt}{~n}
{@gt key="a" value="]"}"a" is greater than "]"{:else}"a" is less than or equal to "]"{/gt}{~n}
{@gt key="a" value="A"}"a" is greater than "A"{:else}"a" is less than or equal to "A"{/gt}{~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}