diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-09-23 13:41:08 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-09-23 19:30:52 -0400 |
commit | 0c7df90239f4c313f42964755700c2a3c78ec63c (patch) | |
tree | 0093edf258176ada1ad7c879174fabb20b037a28 /t/op/pack.t | |
parent | 3840bff0794b78cc0f09c29f47bef7bde1904361 (diff) | |
download | perl-0c7df90239f4c313f42964755700c2a3c78ec63c.tar.gz |
Make pack-as-int/sprintf-%c-ing/chr-ring inf/nan fatal.
In pack: No point in trying to return all-bit-off/all-bits-one
because inf/-inf/nan really don't map sensibly into integers.
In printf-%c/chr: while U+FFFD would be an option, better to die
on such weird input.
pack-as-fp still works, sprintf-numeric still works.
Make t/op/infnan.t to be less fragile about the number of expected tests.
Diffstat (limited to 't/op/pack.t')
-rw-r--r-- | t/op/pack.t | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/op/pack.t b/t/op/pack.t index 9340f32060..2e3c0f5cbd 100644 --- a/t/op/pack.t +++ b/t/op/pack.t @@ -315,7 +315,7 @@ sub list_eq ($$) { if ($^O eq 'vos'); eval { $x = pack 'w', $inf }; - like ($@, qr/^Cannot compress integer/, "Cannot compress integer"); + like ($@, qr/^Cannot compress Inf/, "Cannot compress infinity"); } SKIP: { |