This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ParseXS - better support for duplicate ALIASes
[perl5.git] / dist / ExtUtils-ParseXS / t / 115-avoid-noise.t
CommitLineData
3f305fad
TC
1#!/usr/bin/perl -w
2use strict;
3use warnings;
4use File::Spec;
5use Test::More tests => 1;
9219b114 6use lib (-d 't' ? File::Spec->catdir(qw(t lib)) : 'lib');
3f305fad
TC
7use ExtUtils::ParseXS qw(process_file);
8
9219b114 9chdir('t') if -d 't';
3f305fad
TC
10
11# Module-Build uses ExtUtils::ParseXS with $^W set, try to avoid
12# warning in that case.
13
14{
3f305fad
TC
15 my $out;
16 open my $out_fh, ">", \$out;
17 my @warnings;
18 local $SIG{__WARN__} = sub { push @warnings, "@_" };
19 process_file(filename => "XSWarn.xs", output => $out_fh);
20 is_deeply(\@warnings, [], "shouldn't be any warnings");
21}