diff options
Diffstat (limited to 't/rt-90593.t')
-rw-r--r-- | t/rt-90593.t | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/rt-90593.t b/t/rt-90593.t new file mode 100644 index 0000000..b030678 --- /dev/null +++ b/t/rt-90593.t @@ -0,0 +1,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'; |