Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* |
michael@0 | 2 | * Any copyright is dedicated to the Public Domain. |
michael@0 | 3 | * http://creativecommons.org/licenses/publicdomain/ |
michael@0 | 4 | */ |
michael@0 | 5 | |
michael@0 | 6 | var a = /undefined/.exec(); |
michael@0 | 7 | assertEq(a[0], 'undefined'); |
michael@0 | 8 | assertEq(a.length, 1); |
michael@0 | 9 | |
michael@0 | 10 | a = /undefined/.exec(undefined); |
michael@0 | 11 | assertEq(a[0], 'undefined'); |
michael@0 | 12 | assertEq(a.length, 1); |
michael@0 | 13 | |
michael@0 | 14 | assertEq(/undefined/.test(), true); |
michael@0 | 15 | assertEq(/undefined/.test(undefined), true); |
michael@0 | 16 | |
michael@0 | 17 | assertEq(/aaaa/.exec(), null); |
michael@0 | 18 | assertEq(/aaaa/.exec(undefined), null); |
michael@0 | 19 | |
michael@0 | 20 | assertEq(/aaaa/.test(), false); |
michael@0 | 21 | assertEq(/aaaa/.test(undefined), false); |
michael@0 | 22 | |
michael@0 | 23 | |
michael@0 | 24 | assertEq("undefined".search(), 0); |
michael@0 | 25 | assertEq("undefined".search(undefined), 0); |
michael@0 | 26 | assertEq("aaaa".search(), 0); |
michael@0 | 27 | assertEq("aaaa".search(undefined), 0); |
michael@0 | 28 | |
michael@0 | 29 | a = "undefined".match(); |
michael@0 | 30 | assertEq(a[0], ""); |
michael@0 | 31 | assertEq(a.length, 1); |
michael@0 | 32 | a = "undefined".match(undefined); |
michael@0 | 33 | assertEq(a[0], ""); |
michael@0 | 34 | assertEq(a.length, 1); |
michael@0 | 35 | a = "aaaa".match(); |
michael@0 | 36 | assertEq(a[0], ""); |
michael@0 | 37 | assertEq(a.length, 1); |
michael@0 | 38 | a = "aaaa".match(undefined); |
michael@0 | 39 | assertEq(a[0], ""); |
michael@0 | 40 | assertEq(a.length, 1); |
michael@0 | 41 | |
michael@0 | 42 | if (typeof reportCompare === "function") |
michael@0 | 43 | reportCompare(true, true); |