blob: 136cf21f69021e5629d37ba43b20fbda509326a3 [file] [log] [blame]
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