doc-comment tests: add counterexamples for issue186
Issue 186 relates to symbols that are not documented. Add tests for symbols that are documented in a file of the same structure.
This commit is contained in:
parent
81e0c296e4
commit
90392b543d
2 changed files with 43 additions and 0 deletions
|
|
@ -170,4 +170,23 @@ run_produces_ok('No warnings on macro, #186',
|
|||
[ ],
|
||||
MUST_SUCCEED); # warnings appear on stderr, failing the MUST_SUCCEED checks
|
||||
|
||||
# #186 counterexamples
|
||||
run_produces_ok('ident query (existent, documented as function), #186 counterexample',
|
||||
[$tenv->query_py, qw(v5.4 ident i186c_fn1 C)],
|
||||
[
|
||||
qr{^Documented in:},
|
||||
{doc => qr{\bissue186-counterexamples\.c.+\b5\b}},
|
||||
],
|
||||
MUST_SUCCEED);
|
||||
|
||||
run_produces_ok('ident query (existent, documented as macro), #186 counterexample',
|
||||
[$tenv->query_py, qw(v5.4 ident i186c_fn2 C)],
|
||||
[
|
||||
qr{^Documented in:},
|
||||
{doc => qr{\bissue186-counterexamples\.c.+\b20\b}},
|
||||
],
|
||||
MUST_SUCCEED);
|
||||
|
||||
#########################################################################
|
||||
|
||||
done_testing;
|
||||
|
|
|
|||
24
t/tree/issue186-counterexamples.c
Normal file
24
t/tree/issue186-counterexamples.c
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
// SPDX-License-Identifier: CC0-1.0
|
||||
// This file is the situation of #186, but with documentation.
|
||||
|
||||
#ifdef SOMETHING
|
||||
/**
|
||||
* i186c_fn1 - do something
|
||||
*/
|
||||
static int i186c_fn1(struct platform_device *pdev)
|
||||
{
|
||||
}
|
||||
#else
|
||||
#define i186c_fn1 NULL
|
||||
#endif
|
||||
|
||||
#ifdef SOMETHING
|
||||
static int i186c_fn2(struct platform_device *pdev)
|
||||
{
|
||||
}
|
||||
#else
|
||||
/**
|
||||
* i186c_fn2 - do something
|
||||
*/
|
||||
#define i186c_fn2 NULL
|
||||
#endif
|
||||
Loading…
Reference in a new issue