tor-browser

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

S11.8.3_A4.10.js (947B)


      1 // Copyright 2009 the Sputnik authors.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 info: If y is a prefix of x and x !== y, return false
      6 es5id: 11.8.3_A4.10
      7 description: x and y are string primitives
      8 ---*/
      9 
     10 //CHECK#1
     11 if (("x " <= "x") !== false) {
     12  throw new Test262Error('#1: ("x " <= "x") === false');
     13 }
     14 
     15 //CHECK#2
     16 if (("x" <= "") !== false) {
     17  throw new Test262Error('#2: ("x" <= "") === false');
     18 }
     19 
     20 //CHECK#3
     21 if (("abcd" <= "ab") !== false) {
     22  throw new Test262Error('#3: ("abcd" <= ab") === false');
     23 }
     24 
     25 //CHECK#4
     26 if (("abc\u0064" <= "abcd") !== true) {
     27  throw new Test262Error('#4: ("abc\\u0064" <= abcd") === true');
     28 }
     29 
     30 //CHECK#5
     31 if (("x" + "y" <= "x") !== false) {
     32  throw new Test262Error('#5: ("x" + "y" <= "x") === false');
     33 }
     34 
     35 //CHECK#6
     36 var x = "x";
     37 if ((x + 'y' <= x) !== false) {
     38  throw new Test262Error('#6: var x = "x"; (x + "y" <= x) === false');
     39 }
     40 
     41 reportCompare(0, 0);