6 chdir '../lib/ExtUtils/CBuilder'
7 or die "Can't chdir to lib/ExtUtils/CBuilder: $!";
15 if ($^O eq 'MSWin32') {
16 print "1..0 # Skipped: link_executable() is not implemented yet on Win32\n";
20 # So we can get the return value of system()
27 use ExtUtils::CBuilder;
30 # TEST doesn't like extraneous output
31 my $quiet = $ENV{PERL_CORE} && !$ENV{HARNESS_ACTIVE};
33 my $b = ExtUtils::CBuilder->new(quiet => $quiet);
36 my $source_file = File::Spec->catfile('t', 'compilet.c');
39 open FH, "> $source_file" or die "Can't create $source_file: $!";
40 print FH "int main(void) { return 11; }\n";
47 ok $object_file = $b->compile(source => $source_file);
50 my ($exe_file, @temps);
51 ($exe_file, @temps) = $b->link_executable(objects => $object_file);
55 ok my_system($exe_file), 11;
63 return system("mcr $cmd");
65 return system($cmd) >> 8;