Home | History | Annotate | Download | only in xpath
      1 Test for bug 41913: XPath substring function does not correctly handle non-positive values for the position argument
      2 
      3 PASS document.evaluate("substring('abcde', 0)", document, null, XPathResult.STRING_TYPE, null).stringValue is 'abcde'
      4 PASS document.evaluate("substring('abcde', -2)", document, null, XPathResult.STRING_TYPE, null).stringValue is 'abcde'
      5 PASS document.evaluate("substring('abcde', 0, 5)", document, null, XPathResult.STRING_TYPE, null).stringValue is 'abcd'
      6 PASS document.evaluate("substring('abcde', -2, 5)", document, null, XPathResult.STRING_TYPE, null).stringValue is 'ab'
      7 PASS successfullyParsed is true
      8 
      9 TEST COMPLETE
     10 
     11