文本文件  |  11行  |  679 B

Test for bug 41862: XPath substring function is broken when passing NaN as the position parameter.

PASS document.evaluate("substring('12345', number('NaN'))", document, null, XPathResult.STRING_TYPE, null).stringValue is ''
PASS document.evaluate("substring('12345', number('NaN'), 3)", document, null, XPathResult.STRING_TYPE, null).stringValue is ''
PASS document.evaluate("substring('12345', number('NaN'), -2147483645)", document, null, XPathResult.STRING_TYPE, null).stringValue is ''
PASS document.evaluate("substring('12345', number('NaN'), number('NaN'))", document, null, XPathResult.STRING_TYPE, null).stringValue is ''
PASS successfullyParsed is true

TEST COMPLETE