Merge pull request #136 from cxw42/tests-issue-131
Add tests of `struct class` (#131)
This commit is contained in:
commit
b6606359e0
2 changed files with 27 additions and 0 deletions
|
|
@ -92,6 +92,14 @@ run_produces_ok('ident query (existent)',
|
|||
],
|
||||
MUST_SUCCEED);
|
||||
|
||||
run_produces_ok('ident query (existent, #131)',
|
||||
[$query_py, qw(v5.4 ident class C)],
|
||||
[qr{^Symbol Definitions:}, qr{^Symbol References:},
|
||||
qr{issue131\.h.+\b9\b.+\bstruct\b}, # def
|
||||
qr{issue131\.h.+\b13} # refs
|
||||
],
|
||||
MUST_SUCCEED);
|
||||
|
||||
# Spot-check some files
|
||||
|
||||
run_produces_ok('file query (nonexistent)',
|
||||
|
|
|
|||
19
t/tree/issue131.h
Normal file
19
t/tree/issue131.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/* This file triggers the bug described in #131. */
|
||||
|
||||
/**
|
||||
* struct class - structure
|
||||
* @member: A member
|
||||
*
|
||||
* Description.
|
||||
*/
|
||||
struct class {
|
||||
int member;
|
||||
};
|
||||
|
||||
void foo(struct class *klass)
|
||||
{
|
||||
klass->member = 42;
|
||||
}
|
||||
|
||||
/* t/tree/issue131.c */
|
||||
/* SPDX-License-Identifier: CC0-1.0 */
|
||||
Loading…
Reference in a new issue