diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/testLocaleCompare.js')
-rw-r--r-- | js/src/jit-test/tests/basic/testLocaleCompare.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testLocaleCompare.js b/js/src/jit-test/tests/basic/testLocaleCompare.js new file mode 100644 index 0000000000..e9428b2c6f --- /dev/null +++ b/js/src/jit-test/tests/basic/testLocaleCompare.js @@ -0,0 +1,8 @@ +assertEq("undefined".localeCompare(), 0); +assertEq("a".localeCompare(), "a".localeCompare("undefined")); +assertEq("a".localeCompare("b"), -1); +assertEq("a".localeCompare("b", "en"), -1); +assertEq("b".localeCompare("a"), 1); +assertEq("b".localeCompare("a", "en"), 1); +assertEq("a".localeCompare("a"), 0); +assertEq("a".localeCompare("a", "en"), 0); |