blob: d3683b7bd72daa5a0c8db9ea40a2b8d2fca008de [file] [log] [blame]
Test for bug 41913: XPath substring function does not correctly handle non-positive values for the position argument
PASS document.evaluate("substring('abcde', 0)", document, null, XPathResult.STRING_TYPE, null).stringValue is 'abcde'
PASS document.evaluate("substring('abcde', -2)", document, null, XPathResult.STRING_TYPE, null).stringValue is 'abcde'
PASS document.evaluate("substring('abcde', 0, 5)", document, null, XPathResult.STRING_TYPE, null).stringValue is 'abcd'
PASS document.evaluate("substring('abcde', -2, 5)", document, null, XPathResult.STRING_TYPE, null).stringValue is 'ab'
PASS successfullyParsed is true
TEST COMPLETE