Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Perlito5 - tests - now it works with many perl5.1x versions
  • Loading branch information
fglock committed Sep 11, 2013
1 parent 1fef5af commit f506e45
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions t5/01-perlito/050-string.t
Expand Up @@ -157,16 +157,19 @@ print 'not ' if $v ne '-Z'; say "ok 36 - string negative - $v";

$v = '-NAN';
$r = -$v;
print 'not ' if $r ne '+NAN'; say "ok 37 - string negative - $r";
print 'not ' unless $r eq '+NAN' || $r eq 'nan';
say "ok 37 - string negative - $r";

$v = '-INF';
$r = -$v;
print 'not ' if $r ne '+INF'; say "ok 38 - string negative - $r";
print 'not ' unless $r eq '+INF' || $r eq 'inf';
say "ok 38 - string negative - $r";


$v = ' AZ ';
$r = -$v;
print 'not ' if $r ne '-0'; say "ok 39 - string negative - $r";
print 'not ' unless $r eq '-0' || $r eq '0';
say "ok 39 - string negative - $r";

$v = ' -Z ';
$r = -$v;
Expand All @@ -178,7 +181,8 @@ print 'not ' if $r ne '0'; say "ok 41 - string negative - $r";

$v = ' + ';
$r = -$v;
print 'not ' if $r ne '-0'; say "ok 42 - string negative - $r";
print 'not ' unless $r eq '-0' || $r eq '0';
say "ok 42 - string negative - $r";

$v = '-';
$r = -$v;
Expand All @@ -190,7 +194,8 @@ print 'not ' if $r ne '-'; say "ok 44 - string negative - $r";

$v = '!AZ ';
$r = -$v;
print 'not ' if $r ne '-0'; say "ok 45 - string negative - $r";
print 'not ' unless $r eq '-0' || $r eq '0';
say "ok 45 - string negative - $r";

$v = '-!Z ';
$r = -$v;
Expand All @@ -206,7 +211,8 @@ print 'not ' if $r ne '+ 00.12'; say "ok 48 - string negative - $r";

$v = '-00.12';
$r = -$v;
print 'not ' if $r ne '0.12'; say "ok 49 - string negative - $r";
print 'not ' unless $r eq '0.12' || $r eq '+00.12';
say "ok 49 - string negative - $r";


# positive
Expand Down

0 comments on commit f506e45

Please sign in to comment.