diff options
author | James E Keenan <jkeenan@cpan.org> | 2022-07-04 15:12:17 +0000 |
---|---|---|
committer | James E Keenan <jkeenan@cpan.org> | 2022-11-06 07:05:20 -0500 |
commit | 3c86ee6e48da0f71b738171f0e2773e1805a4830 (patch) | |
tree | aef1b2a3c6554e5ae963350666350f5d33bca50f /dist | |
parent | fd54965300ba43b0021845e3b903b02e21ff1a38 (diff) | |
download | perl-3c86ee6e48da0f71b738171f0e2773e1805a4830.tar.gz |
Add TODO-ed test for duplicate warning
Diffstat (limited to 'dist')
-rw-r--r-- | dist/ExtUtils-ParseXS/t/001-basic.t | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/dist/ExtUtils-ParseXS/t/001-basic.t b/dist/ExtUtils-ParseXS/t/001-basic.t index 665180934f..73761aabb3 100644 --- a/dist/ExtUtils-ParseXS/t/001-basic.t +++ b/dist/ExtUtils-ParseXS/t/001-basic.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use strict; -use Test::More tests => 18; +use Test::More tests => 19; use Config; use DynaLoader; use ExtUtils::CBuilder; @@ -190,6 +190,22 @@ like $stderr, '/No INPUT definition/', "Exercise typemap error"; } ##################################################################### +{ # fourth block: https://github.com/Perl/perl5/issues/19661 +my $pxs = ExtUtils::ParseXS->new; +tie *FH, 'Foo'; +my $stderr = PrimitiveCapture::capture_stderr(sub { + $pxs->process_file(filename => 'XSFalsePositive.xs', output => \*FH, prototypes => 1); +}); +TODO: { + local $TODO = 'GH 19661'; + unlike $stderr, + qr/Warning: duplicate function definition 'do' detected in XSFalsePositive\.xs/, + "No 'duplicate function definition' warning observed"; + } +} + +##################################################################### + sub Foo::TIEHANDLE { bless {}, 'Foo' } sub Foo::PRINT { shift->{buf} .= join '', @_ } sub Foo::content { shift->{buf} } |