tor-browser

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

regexp-after-variable.js (355B)


      1 // RegExp after variable name get parsed or throws error correctly.
      2 
      3 load(libdir + "asserts.js");
      4 
      5 assertNoWarning(() => Function("var foo \n /bar/g"), SyntaxError,
      6                "RegExp in next line should be parsed");
      7 assertThrowsInstanceOf(() => Function("var foo /bar/g"), SyntaxError,
      8                       "RegExp in same line should be error");