App-Staticperl

 view release on metacpan or  search on metacpan

t/01_vollwaesche.t  view on Meta::CPAN


$ENV{STATICPERLRC} = "$PFX/staticperlrc";

sub tryrun {
   my ($test, $command) = @_;

   if (my $exit = system "exec >$PFX/output 2>&1; $command") {
      my $output = do { local *FH; open FH, "<$PFX/output" or die "$PFX/output: $!"; local $/; <FH> };
      $output = substr $output, -30000 if 30000 < length $output; # "output truncated after..." I wish they would document these things
      printf STDERR
             "\n\n# FAILED #%d exit status 0x%04x (%s)\n\n# OUTPUT:\n%s\n\n",
             $test, $exit, $command, $output;
      print "not ok $test\n";
   } else {
      print "ok $test\n";
   }
}

print qx<sh bin/staticperl version> =~ /staticperl version / ? "" : "not ", "ok 1\n";

tryrun 2, "sh bin/staticperl install";



( run in 0.359 second using v1.01-cache-2.11-cpan-c6e0e5ac2a7 )