This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Implement 'skip' option for merging typemaps
[perl5.git] / dist / ExtUtils-ParseXS / t / 109-standard_XS_defs.t
CommitLineData
e6de4093
JK
1#!/usr/bin/perl
2use strict;
3use warnings;
361d4be6
JK
4$| = 1;
5use Test::More tests => 5;
6use lib qw( lib t/lib );
e6de4093
JK
7use ExtUtils::ParseXS::Utilities qw(
8 standard_XS_defs
9);
361d4be6
JK
10use PrimitiveCapture;
11
12my @statements = (
13 '#ifndef PERL_UNUSED_VAR',
14 '#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE',
15 '#ifdef PERL_IMPLICIT_CONTEXT',
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}
e6de4093
JK
26
27pass("Passed all tests in $0");