1#!/usr/bin/perl 2use strict; 3use warnings; 4$| = 1; 5use Test::More tests => 4; 6use File::Spec; 7use lib (-d 't' ? File::Spec->catdir(qw(t lib)) : 'lib'); 8use ExtUtils::ParseXS::Utilities qw( 9 standard_XS_defs 10); 11use PrimitiveCapture; 12 13my @statements = ( 14 '#ifndef PERL_UNUSED_VAR', 15 '#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE', 16 '#ifdef newXS_flags', 17); 18 19my $stdout = PrimitiveCapture::capture_stdout(sub { 20 standard_XS_defs(); 21}); 22 23foreach my $s (@statements) { 24 like( $stdout, qr/$s/s, "Printed <$s>" ); 25} 26 27pass("Passed all tests in $0"); 28