ExtUtils-XSOne
view release on metacpan or search on metacpan
t/02-line-directives.t view on Meta::CPAN
write_file(File::Spec->catfile($src_dir, 'complex.xs'), $complex_content);
ExtUtils::XSOne->combine(
src_dir => $src_dir,
output => $output,
);
my $combined = read_file($output);
# The define should be in the preamble
like($combined, qr/MACRO\(x\).*\(\(x\) \+ 1\)/, 'Macro definition preserved');
# The C function should be present
like($combined, qr/static int function\(void\)/, 'C function preserved');
# The XS code should be present
like($combined, qr/MODULE = Test\s+PACKAGE = Test/, 'MODULE declaration preserved');
like($combined, qr/RETVAL = newSVpv/, 'XS CODE block preserved');
};
# =============================================================================
( run in 0.520 second using v1.01-cache-2.11-cpan-0a27d97929d )