jdk-24/nashorn/test/script/basic/JDK-8015349.js.EXPECTED
Athijegannathan Sundararajan 4e5a976adf 8015349: "abc".lastIndexOf("a",-1) should evaluate to 0 and not -1
Reviewed-by: lagergren, attila, jlaskey
2013-05-29 21:27:10 +05:30

10 lines
293 B
Plaintext

'abc'.lastIndexOf('a', 4) = 0
'abc'.lastIndexOf('b', Infinity) = 1
'abc'.lastIndexOf('a', -1) = 0
'abc'.lastIndexOf('a', -Infinity) = 0
'oracle'.lastIndexOf('u') = -1
'hello'.lastIndexOf('l') = 3
'hello'.lastIndexOf('l', 2) = 2
'hello'.lastIndexOf('l', 3) = 3
'hello'.lastIndexOf('l', 1) = -1