Skip to content

Commit baab724

Browse files
committed
Storable: add test names to t/utf8.t
1 parent 0637dad commit baab724

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

dist/Storable/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Release history for Storable
22

3+
3.33 - 2024-07-11 00:41:35
4+
5+
- add some test names to t/utf8.t
6+
37
3.32 - 2023-05-26 21:36:00 demerphq
48

59
- Update security advisory to be more clear

dist/Storable/Storable.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ our @EXPORT_OK = qw(
2828
our ($canonical, $forgive_me);
2929

3030
BEGIN {
31-
our $VERSION = '3.32';
31+
our $VERSION = '3.33';
3232
}
3333

3434
our $recursion_limit;

dist/Storable/t/utf8.t

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,32 @@ use Storable qw(thaw freeze);
2222
use Test::More tests => 6;
2323

2424
my $x = chr(1234);
25-
is($x, ${thaw freeze \$x});
25+
is($x, ${thaw freeze \$x}, "round trip one unicode character");
2626

2727
# Long scalar
2828
$x = join '', map {chr $_} (0..1023);
29-
is($x, ${thaw freeze \$x});
29+
is($x, ${thaw freeze \$x}, "round trip Unicode string");
3030

3131
# Char in the range 127-255 (probably) in utf8. This just won't work for
3232
# EBCDIC for early Perls.
3333
$x = ($] lt 5.007_003) ? chr(175) : chr(utf8::unicode_to_native(175))
3434
. chr (256);
3535
chop $x;
36-
is($x, ${thaw freeze \$x});
36+
is($x, ${thaw freeze \$x}, "round strip a 128-255 character");
3737

3838
# Storable needs to cope if a frozen string happens to be internal utf8
3939
# encoded
4040

4141
$x = chr 256;
4242
my $data = freeze \$x;
43-
is($x, ${thaw $data});
43+
is($x, ${thaw $data}, "sanity check for upgraded frozen data");
4444

4545
$data .= chr 256;
4646
chop $data;
47-
is($x, ${thaw $data});
47+
is($x, ${thaw $data}, "test for upgraded frozen data");
4848

4949

5050
$data .= chr 256;
5151
# This definitely isn't valid
5252
eval {thaw $data};
53-
like($@, qr/corrupt.*characters outside/);
53+
like($@, qr/corrupt.*characters outside/, "check error handling for added 256 code point");

0 commit comments

Comments
 (0)