2 |
|
|
3 |
use strict; |
use strict; |
4 |
|
|
5 |
use Test::More tests => 335; |
use Test::More tests => 341; |
6 |
use Test::Exception; |
use Test::Exception; |
7 |
use Cwd qw/abs_path/; |
use Cwd qw/abs_path/; |
8 |
use blib; |
use blib; |
191 |
|
|
192 |
# simple list manipulatons |
# simple list manipulatons |
193 |
cmp_ok( join('', prefix('ab', 'cd') ), 'eq', 'abcd', 'prefix'); |
cmp_ok( join('', prefix('ab', 'cd') ), 'eq', 'abcd', 'prefix'); |
194 |
|
cmp_ok( join('-', prefix('', 'x', 'y') ), 'eq', 'x-y', 'prefix empty'); |
195 |
|
cmp_ok( join('-', prefix(0, 'x', 'y') ), 'eq', '0x-0y', 'prefix 0'); |
196 |
|
|
197 |
cmp_ok( join('', suffix('xy', 'cd') ), 'eq', 'cdxy', 'suffix'); |
cmp_ok( join('', suffix('xy', 'cd') ), 'eq', 'cdxy', 'suffix'); |
198 |
|
cmp_ok( join('-', suffix('', 'x', 'y' ) ), 'eq', 'x-y', 'suffix empty'); |
199 |
|
cmp_ok( join('-', suffix(0, 'x', 'y' ) ), 'eq', 'x0-y0', 'suffix 0'); |
200 |
|
|
201 |
cmp_ok( join('', surround('->', '<-', 'a','b','c') ), 'eq', '->a<-->b<-->c<-', 'surround'); |
cmp_ok( join('', surround('->', '<-', 'a','b','c') ), 'eq', '->a<-->b<-->c<-', 'surround'); |
202 |
|
cmp_ok( join('-', surround('', '', 'x','y','z') ), 'eq', 'x-y-z', 'surround empty'); |
203 |
|
cmp_ok( join('-', surround(0, 0, 'x','y','z') ), 'eq', '0x0-0y0-0z0', 'surround 0 0'); |
204 |
|
|
205 |
# count |
# count |
206 |
my @el; |
my @el; |