403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /usr/share/doc/perl-Devel-GlobalDestruction/t/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/share/doc/perl-Devel-GlobalDestruction/t/10_pure-perl.t
use strict;
use warnings;
use FindBin qw($Bin);
use Config;
use IPC::Open2;

# rerun the tests under the assumption of pure-perl

# for the $^X-es
$ENV{PERL5LIB} = join ($Config{path_sep}, @INC);
$ENV{DEVEL_GLOBALDESTRUCTION_PP_TEST} = 1;

my $this_file = quotemeta(__FILE__);

opendir(my $dh, $Bin);
my @tests = grep { $_ !~ /${this_file}$/ } map { "$Bin/$_" } grep { /\.t$/ } readdir $dh;
print "1..@{[ scalar @tests ]}\n";

my $had_error = 0;
END { $? = $had_error }
sub ok ($$) {
  $had_error++, print "not " if !$_[0];
  print "ok";
  print " - $_[1]" if defined $_[1];
  print "\n";
}

for my $fn (@tests) {
  # this is cheating, and may even hang here and there (testing on windows passed fine)
  # if it does - will have to fix it somehow (really *REALLY* don't want to pull
  # in IPC::Cmd just for a fucking test)
  # the alternative would be to have an ENV check in each test to force a subtest
  open2(my $out, my $in, $^X, $fn );
  while (my $ln = <$out>) {
    print "   $ln";
  }

  wait;
  ok (! $?, "Exit $? from: $^X $fn");
}

Youez - 2016 - github.com/yon3zu
LinuXploit