]> git.vpit.fr Git - perl/modules/autovivification.git/blob - t/41-padsv.t
This is 0.18
[perl/modules/autovivification.git] / t / 41-padsv.t
1 #!perl -T
2
3 use strict;
4 use warnings;
5
6 use Test::More tests => 4;
7
8 my $buf = "abc\ndef\n";
9 open my $x, '<', \$buf;
10
11 # Do this one first so that the check functions are set up for the second
12 my $res = eval 'no autovivification; <$x>';
13 is $@,   '',      'padsv 1: no error';
14 is $res, "abc\n", 'padsv 1: correct returned value';
15
16 $res = eval '<$x>';
17 is $@,   '',      'padsv 2: no error';
18 is $res, "def\n", 'padsv 2: correct returned value';