summaryrefslogtreecommitdiff
path: root/t/op
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2015-01-25 21:01:07 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2015-01-28 06:52:32 -0500
commitb489e20f5bc292b1e257500b577944b52ec6c7d5 (patch)
tree17cf33ab30726150feee6d45b6d0baab1ec63e32 /t/op
parent75a57a380101eae68ead055d5951db492491701d (diff)
downloadperl-b489e20f5bc292b1e257500b577944b52ec6c7d5.tar.gz
infnan: allow (silently) trailing whitespace.
(Leading whitespace is handled in grok_number_flags.)
Diffstat (limited to 't/op')
-rw-r--r--t/op/infnan.t10
1 files changed, 8 insertions, 2 deletions
diff --git a/t/op/infnan.t b/t/op/infnan.t
index ae84111c0c..bddea571a6 100644
--- a/t/op/infnan.t
+++ b/t/op/infnan.t
@@ -461,6 +461,9 @@ cmp_ok('-1e-9999', '==', 0, "underflow to 0 (runtime) from neg");
[ "1.#INFx", 1, $PInf ],
[ "1.#INF00", 0, $PInf ],
[ "1.#INFxy", 1, $PInf ],
+ [ " inf", 0, $PInf ],
+ [ "inf ", 0, $PInf ],
+ [ " inf ", 0, $PInf ],
[ "nan", 0, $NaN ],
[ "nanxy", 1, $NaN ],
@@ -483,10 +486,13 @@ cmp_ok('-1e-9999', '==', 0, "underflow to 0 (runtime) from neg");
[ "1.#IND", 0, $NaN ],
[ "1.#IND00", 0, $NaN ],
[ "1.#INDxy", 1, $NaN ],
+ [ " nan", 0, $NaN ],
+ [ "nan ", 0, $NaN ],
+ [ " nan ", 0, $NaN ],
];
for my $t (@$T) {
- print "# $t->[0] compile time\n";
+ print "# '$t->[0]' compile time\n";
my $a;
$w = '';
eval '$a = "'.$t->[0].'" + 1';
@@ -497,7 +503,7 @@ cmp_ok('-1e-9999', '==', 0, "underflow to 0 (runtime) from neg");
} else {
is($w, "", "no warning expected");
}
- print "# $t->[0] runtime\n";
+ print "# '$t->[0]' runtime\n";
my $n = $t->[0];
my $b;
$w = '';