tests: add tests for validating fragment groups

Fixes: https://github.com/pkgconf/pkgconf/issues/371
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
master
Ariadne Conill 2025-03-05 15:55:05 -08:00
parent b80ce00fc2
commit 97072df584
1 changed files with 17 additions and 1 deletions

View File

@ -35,7 +35,9 @@ tests_init \
tuple_dequote \
version_with_whitespace \
version_with_whitespace_2 \
version_with_whitespace_diagnostic
version_with_whitespace_diagnostic \
fragment_groups \
fragment_groups_composite
comments_body()
{
@ -316,3 +318,17 @@ version_with_whitespace_diagnostic_body()
-o match:warning \
pkgconf --with-path="${selfdir}/lib1" --validate malformed-version
}
fragment_groups_body()
{
atf_check \
-o inline:'-Wl,--start-group -la -lb -Wl,--end-group -nodefaultlibs -Wl,--start-group -la -lgcc -Wl,--end-group -Wl,--gc-sections\n' \
pkgconf --with-path="${selfdir}/lib1" --libs fragment-groups
}
fragment_groups_composite_body()
{
atf_check \
-o inline:'-Wl,--start-group -la -lb -Wl,--end-group -nodefaultlibs -Wl,--start-group -la -lgcc -Wl,--end-group -Wl,--gc-sections\n' \
pkgconf --with-path="${selfdir}/lib1" --libs fragment-groups-2
}