Added test of #188

This commit is contained in:
Chris White 2020-10-15 20:31:24 -04:00
parent 6689a4fe43
commit ff6a55bb57
2 changed files with 16 additions and 0 deletions

View file

@ -187,6 +187,12 @@ run_produces_ok('ident query (existent, documented as macro), #186 counterexampl
],
MUST_SUCCEED);
# #188
run_produces_ok('No warnings on indented #define, #188',
[$tenv->find_doc, File::Spec->catfile($tenv->lxr_repo_dir, 'issue188.c')],
[ ],
MUST_SUCCEED); # warnings appear on stderr, failing the MUST_SUCCEED checks
#########################################################################
done_testing;

10
t/tree/issue188.c Normal file
View file

@ -0,0 +1,10 @@
// SPDX-License-Identifier: CC0-1.0
// This file triggers the bug described in #188.
static int undocumented_function(struct platform_device *pdev)
{
int foo;
#define BAR (42)
foo=1;
return foo;
}