t/100: update to look in specific section [minor]

Use the {def} and {ref} features of run_produces_ok() to look for
regexes only in the correct sections.  This improves the ability of the
test to detect regressions.
This commit is contained in:
Christopher White 2020-06-04 08:35:38 -04:00
parent 50b83a4376
commit 1a26548527

View file

@ -87,24 +87,24 @@ run_produces_ok('ident query (nonexistent)',
run_produces_ok('ident query (existent)',
[$query_py, qw(v5.4 ident i2c_acpi_notify C)],
[qr{^Symbol Definitions:}, qr{^Symbol References:},
qr{drivers/i2c/i2c-core-acpi\.c.+\b402\b.+\bfunction\b}, # def
qr{drivers/i2c/i2c-core-acpi\.c.+\b402,439} # refs
{ def => qr{drivers/i2c/i2c-core-acpi\.c.+\b402\b.+\bfunction\b} },
{ ref => qr{drivers/i2c/i2c-core-acpi\.c.+\b402,439} },
],
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
{ def => qr{issue131\.h.+\b9\b.+\bstruct\b} },
{ ref => qr{issue131\.h.+\b13} },
],
MUST_SUCCEED);
run_produces_ok('ident query (existent, #150)',
[$query_py, qw(v5.4 ident memset C)],
[qr{^Symbol Definitions:}, qr{^Symbol References:},
qr{issue150\.S.+\b7\b.+\bfunction\b}, # def
qr{i2c-core-acpi\.c.+\b121\b} # refs
{ def => qr{issue150\.S.+\b7\b.+\bfunction\b} },
{ ref => qr{i2c-core-acpi\.c.+\b121\b} }
],
MUST_SUCCEED);