summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/xpath/substring-nan-position-expected.txt
diff options
context:
space:
mode:
Diffstat (limited to 'LayoutTests/fast/xpath/substring-nan-position-expected.txt')
-rw-r--r--LayoutTests/fast/xpath/substring-nan-position-expected.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/LayoutTests/fast/xpath/substring-nan-position-expected.txt b/LayoutTests/fast/xpath/substring-nan-position-expected.txt
new file mode 100644
index 0000000..136cf21
--- /dev/null
+++ b/LayoutTests/fast/xpath/substring-nan-position-expected.txt
@@ -0,0 +1,10 @@
+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
+