You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
289 B
23 lines
289 B
9 years ago
|
use strict;
|
||
|
use warnings;
|
||
|
|
||
|
use Test::More tests => 3;
|
||
|
|
||
|
use Subtitle::Utils qw(:string);
|
||
|
|
||
|
my $line;
|
||
|
|
||
|
$line = " test \r\n";
|
||
|
chomp_all($line);
|
||
|
is($line, ' test ');
|
||
|
|
||
|
$line = "\xEF\xBB\xBFtest";
|
||
|
strip_bom($line);
|
||
|
is($line, 'test');
|
||
|
|
||
|
$line = ' test ';
|
||
|
trim($line);
|
||
|
is($line, 'test');
|
||
|
|
||
|
exit 0;
|