Changeset 21176
- Timestamp:
- 07/03/08 14:09:33 (5 months ago)
- Files:
-
- 1 modified
-
t/spec/S29-str/index.t (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
t/spec/S29-str/index.t
r21154 r21176 4 4 # L<S29/Str/"=item index"> 5 5 6 plan 3 3;6 plan 34; 7 7 8 8 # Type of return value 9 #?rakudo todo 'successful index() should return a StrPos' 9 10 isa_ok('abc'.index('b'), StrPos); 10 11 isa_ok('abc'.index('d'), StrPos); 12 ok(!'abc'.index('d'), 'failure object from index() evaluates to false'); 11 13 12 14 # Simple - with just a single char … … 35 37 is(index("Hello World", ""), 0, "Substr is empty"); 36 38 is(index("", ""), 0, "Both strings are empty"); 37 ok(! index("", "Hello")"Only main-string is empty");39 ok(!defined(index("", "Hello")), "Only main-string is empty"); 38 40 is(index("Hello", "", 3), 3, "Substr is empty, pos within str"); 39 41 is(index("Hello", "", 5), 5, "Substr is empty, pos at end of str"); … … 71 73 ok($j.index("l") == 3, ".index on junction"); 72 74 73
