diff options
author | treeform <starplant@gmail.com> | 2018-04-15 08:34:03 -0700 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-04-15 17:34:03 +0200 |
commit | b98cd3bf348a41778f475e835b86ab9175125789 (patch) | |
tree | c85ca2b8270e7dac7b73daf2a128613e188bf984 /tests | |
parent | 6795d9931b19d3dc603f374d00363b593ccf6553 (diff) | |
download | Nim-b98cd3bf348a41778f475e835b86ab9175125789.tar.gz |
Fix cmpStrings in js mode (#7604)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/js/tstringitems.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/js/tstringitems.nim b/tests/js/tstringitems.nim index 20aed6e8b..ff016642e 100644 --- a/tests/js/tstringitems.nim +++ b/tests/js/tstringitems.nim @@ -76,3 +76,12 @@ block: # String case of case s of "Привет!": discard else: doAssert(false) + +block: # String cmp + var a, b: string + doAssert(cmp(a, b) == 0) + doAssert(cmp("foo", "foo") == 0) + doAssert(cmp("foobar", "foo") == 3) + doAssert(cmp("foo", "foobar") == -3) + doAssert(cmp("fooz", "foog") == 19) + doAssert(cmp("foog", "fooz") == -19) |