Debian Codegraph @

js/src/tests/non262/RegExp/regress-28686.js

raw
1 /* -*- tab-width: 8; indent-tabs-mode: nil; js-indent-level: 4 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 var BUGNUMBER = 28686;
7
8 test();
9
10 function test()
11 {
12 printBugNumber (BUGNUMBER);
13
14 var str = 'foo "bar" baz';
15 reportCompare ('foo \\"bar\\" baz', str.replace(/([\'\"])/g, "\\$1"),
16 "str.replace failed.");
17 }