File: rt-90593.t

package info (click to toggle)
libyaml-perl 1.31-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 672 kB
  • sloc: perl: 2,294; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 409 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# https://rt.cpan.org/Public/Bug/Display.html?id=90593
use Test::More;

if ($] < 5.010000) {
    plan skip_all => "Skip old perls";
}
else {
    plan tests => 2;
}

use YAML;
use constant LENGTH => 1000000;

$SIG{__WARN__} = sub { die @_ };

my $yaml = 'x: "' . ('x' x LENGTH) . '"' . "\n";

my $hash = Load $yaml;

is ref($hash), 'HASH', 'Loaded a hash';
is length($hash->{x}), LENGTH, 'Long scalar loaded';