tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

function.js (484B)


      1 function test() {
      2    var arg1TwoByte = "arg1\u1200";
      3    var arg2Latin1 = "arg2";
      4 
      5    var bodyLatin1 = "return arg2 * 3";
      6 
      7    var f = Function(arg1TwoByte, arg2Latin1, bodyLatin1);
      8    assertEq(f(10, 20), 60);
      9    assertEq(f.toString().includes("arg1\u1200,arg2"), true);
     10 
     11    var bodyTwoByte = "return arg1\u1200 + arg2;";
     12    f = Function(arg1TwoByte, arg2Latin1, bodyTwoByte);
     13    assertEq(f(30, 40), 70);
     14    assertEq(f.toString().includes("arg1\u1200,arg2"), true);
     15 }
     16 test();