Skip to content

Commit e2f74e0

Browse files
committed
ExtUtils::ParseXS: extend alias test
This test checks that the correct warnings are issued when an XSUB tries to define multiple aliases with the same value. This commit extends the test slightly to have multiple aliases (including an alias matching the function name) all mapped to in index 0. The main point of generating these extra warnings is that the warnings accidentally list the XSUB function's name ('do') multiple times in the warning message. The next commit will fix that.
1 parent df97f6e commit e2f74e0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

dist/ExtUtils-ParseXS/t/001-basic.t

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,12 @@ like $stderr, '/No INPUT definition/', "Exercise typemap error";
263263
. "Warning: Aliases 'docks' and 'dox', 'lox' have"
264264
. " identical values of 1 in XSAlias.xs, line 11\n"
265265
. "Warning: Aliases 'xunx' and 'do' have identical values"
266-
. " of 0 - the base function in XSAlias.xs, line 13\n",
266+
. " of 0 - the base function in XSAlias.xs, line 13\n"
267+
. "Warning: Aliases 'do' and 'xunx', 'do' have identical values"
268+
. " of 0 - the base function in XSAlias.xs, line 14\n"
269+
. "Warning: Aliases 'xunx2' and 'do', 'xunx', 'do' have"
270+
. " identical values of 0 - the base function in XSAlias.xs, line 15\n"
271+
,
267272
"Saw expected warnings from XSAlias.xs in AUTHOR_WARNINGS mode";
268273

269274
my $expect = quotemeta(<<'EOF_CONTENT');

dist/ExtUtils-ParseXS/t/XSAlias.xs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ ALIAS:
1111
docks = 1
1212
dachs => lox
1313
xunx = 0
14+
do = 0
15+
xunx2 = 0
1416
xukes => do
1517
CODE:
1618
{

0 commit comments

Comments
 (0)