This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Brendan Byrd is now a perl AUTHOR
[perl5.git] / ext / arybase / t / index.t
CommitLineData
36b2db7e 1use warnings; no warnings 'deprecated';
b82b06b8
FC
2use strict;
3
4use Test::More tests => 12;
5
6our $t = "abcdefghijkl";
7
8$[ = 3;
9
10is index($t, "cdef"), 5;
11is index($t, "cdef", 3), 5;
12is index($t, "cdef", 4), 5;
13is index($t, "cdef", 5), 5;
14is index($t, "cdef", 6), 2;
15is index($t, "cdef", 7), 2;
16is rindex($t, "cdef"), 5;
17is rindex($t, "cdef", 7), 5;
18is rindex($t, "cdef", 6), 5;
19is rindex($t, "cdef", 5), 5;
20is rindex($t, "cdef", 4), 2;
21is rindex($t, "cdef", 3), 2;
22
231;