summaryrefslogtreecommitdiffstats
path: root/toolkit/modules/tests/xpcshell/test_jsesc.js
blob: 0c6cbba690c28fe2d964641764dbf3e5d351e0d1 (plain)
1
2
3
4
5
6
7
8
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");
}