Added test file and test for #186
This commit is contained in:
parent
5aeb22b3e7
commit
68232f8fba
2 changed files with 18 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ use autodie; # note: still need to check system() calls manually
|
|||
use FindBin '$Bin';
|
||||
use lib $Bin;
|
||||
|
||||
use File::Spec;
|
||||
use Test::More;
|
||||
|
||||
use TestEnvironment;
|
||||
|
|
@ -163,4 +164,10 @@ run_produces_ok('ident query (existent, prototype, documented in C file), #134',
|
|||
],
|
||||
MUST_SUCCEED);
|
||||
|
||||
# #186
|
||||
run_produces_ok('No warnings on macro, #186',
|
||||
[$tenv->find_doc, File::Spec->catfile($tenv->lxr_repo_dir, 'issue186.c')],
|
||||
[ ],
|
||||
MUST_SUCCEED); # warnings appear on stderr, failing the MUST_SUCCEED checks
|
||||
|
||||
done_testing;
|
||||
|
|
|
|||
11
t/tree/issue186.c
Normal file
11
t/tree/issue186.c
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// SPDX-License-Identifier: CC0-1.0
|
||||
// This file triggers the bug described in #186.
|
||||
|
||||
#ifdef SOMETHING
|
||||
static int undocumented_function(struct platform_device *pdev)
|
||||
{
|
||||
}
|
||||
|
||||
#else
|
||||
#define undocumented_function NULL
|
||||
#endif
|
||||
Loading…
Reference in a new issue