]> git.vpit.fr Git - perl/modules/indirect.git/commitdiff
Test indirect calls in babycart in heredocs
authorVincent Pit <perl@profvince.com>
Tue, 12 Jul 2016 15:41:51 +0000 (12:41 -0300)
committerVincent Pit <perl@profvince.com>
Tue, 12 Jul 2016 15:41:51 +0000 (12:41 -0300)
MANIFEST
t/50-external.t
t/testcases/babycart_in_heredoc.pl [new file with mode: 0644]

index 7f3d8d66e4f3eee4f7553ed5979fb9dc38d178b8..e0ee05b23fc5c483c8de6825f1bd397a12a91f51 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -52,6 +52,7 @@ t/lib/indirect/TestRequired5/c0.pm
 t/lib/indirect/TestRequired5/d0.pm
 t/lib/indirect/TestRequired6.pm
 t/lib/indirect/TestRequiredGlobal.pm
+t/testcases/babycart_in_heredoc.pl
 t/testcases/rt115392.pl
 xsh/caps.h
 xsh/debug.h
index 60ed24469d13ef24921596254bdee9fe8ce3cc28..d34db9cf5a980ae7a095f489c1f336abb357320f 100644 (file)
@@ -5,7 +5,7 @@ use warnings;
 
 use Config;
 
-use Test::More tests => 7;
+use Test::More tests => 8;
 
 use lib 't/lib';
 use VPIT::TestHelpers 'run_perl';
@@ -77,3 +77,9 @@ SKIP: {
  }
  is $status, 0, 'RT #115392';
 }
+
+SKIP: {
+ my $status = run_perl_file 't/testcases/babycart_in_heredoc.pl';
+ skip RUN_PERL_FAILED() => 1 unless defined $status;
+ is $status, 0, 'babycart in heredoc';
+}
diff --git a/t/testcases/babycart_in_heredoc.pl b/t/testcases/babycart_in_heredoc.pl
new file mode 100644 (file)
index 0000000..4db3c2f
--- /dev/null
@@ -0,0 +1,5 @@
+no indirect hook => sub { exit("$_[0] $_[1]" eq "X new" ? 0 : 1) };
+<<"FOO";
+abc @{[ new X ]} def
+FOO
+BEGIN { exit 2 }