diff --git a/js/test_cases/helpers_gt/README.md b/js/test_cases/helpers_gt/README.md index 0b8a68b..d982ece 100644 --- a/js/test_cases/helpers_gt/README.md +++ b/js/test_cases/helpers_gt/README.md @@ -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. diff --git a/js/test_cases/helpers_gt/main.dust b/js/test_cases/helpers_gt/main.dust index ae88ded..a801230 100644 --- a/js/test_cases/helpers_gt/main.dust +++ b/js/test_cases/helpers_gt/main.dust @@ -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}