summaryrefslogtreecommitdiffstats
path: root/toolkit/modules/tests/xpcshell/test_jsesc.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/modules/tests/xpcshell/test_jsesc.js')
-rw-r--r--toolkit/modules/tests/xpcshell/test_jsesc.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/toolkit/modules/tests/xpcshell/test_jsesc.js b/toolkit/modules/tests/xpcshell/test_jsesc.js
new file mode 100644
index 000000000..0c6cbba69
--- /dev/null
+++ b/toolkit/modules/tests/xpcshell/test_jsesc.js
@@ -0,0 +1,9 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+Components.utils.import("resource://gre/modules/third_party/jsesc/jsesc.js");
+
+function run_test() {
+ do_check_eq(jsesc("teééést", {lowercaseHex: true}), "te\\xe9\\xe9\\xe9st");
+ do_check_eq(jsesc("teééést", {lowercaseHex: false}), "te\\xE9\\xE9\\xE9st");
+}