Changeset 22028
- Timestamp:
- 08/24/08 12:51:19 (3 months ago)
- Files:
-
- 1 modified
-
t/spec/S29-str/rindex.t (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
t/spec/S29-str/rindex.t
r22027 r22028 11 11 is(rindex("Hello World", "l"), 9, "One char, in the middle"); 12 12 is(rindex("Hello World", "d"), 10, "One char, in the end"); 13 is(rindex("Hello World", "x"), -1, "One char, no match");13 ok(!defined(rindex("Hello World", "x")), "One char, no match"); 14 14 15 15 is(rindex("Hello World", "l", 10), 9, "One char, first match, pos @ end"); … … 17 17 is(rindex("Hello World", "l", 8), 3, "- 2. match"); 18 18 is(rindex("Hello World", "l", 2), 2, "- 3. match"); 19 is(rindex("Hello World", "l", 1), -1, "- no more matches");19 ok(!defined(rindex("Hello World", "l", 1)), "- no more matches"); 20 20 21 21 # Simple - with a string … … 24 24 is(rindex("Hello World", "o W"), 4, "Substr, in the middle"); 25 25 is(rindex("Hello World", "World"), 6, "Substr, at the end"); 26 is(rindex("Hello World", "low"), -1, "Substr, no match");26 ok(!defined(rindex("Hello World", "low")), "Substr, no match"); 27 27 is(rindex("Hello World", "Hello World"), 0, "Substr eq Str"); 28 28 … … 31 31 is(rindex("Hello World", ""), 11, "Substr is empty"); 32 32 is(rindex("", ""), 0, "Both strings are empty"); 33 is(rindex("", "Hello"), -1, "Only main-string is empty");33 ok(!defined(rindex("", "Hello")), "Only main-string is empty"); 34 34 is(rindex("Hello", "", 3), 3, "Substr is empty, pos within str"); 35 35 is(rindex("Hello", "", 5), 5, "Substr is empty, pos at end of str");
