tests: add tests for the fragment mergeback changes

pull/109/head
William Pitcock 2016-12-30 12:45:29 -06:00
parent 0c690dc891
commit 951a844c94
4 changed files with 58 additions and 0 deletions

View File

@ -60,6 +60,8 @@ EXTRA_DIST = pkg.m4 \
tests/lib1/cflags-whitespace-trailing.pc \
tests/lib1/provides.pc \
tests/lib1/provides-request-simple.pc \
tests/lib1/flag-order-1.pc \
tests/lib1/flag-order-3.pc \
tests/test_env.sh \
$(test_scripts) \
doc/conf.py \

View File

@ -0,0 +1,10 @@
prefix=/test
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
cflags=-I${includedir}
Name: flag order 1
Description: test for flag ordering
Version: 1
Libs: -L${libdir} -Bdynamic -lfoo -Bstatic -lbar

View File

@ -0,0 +1,10 @@
prefix=/test
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
cflags=-I${includedir}
Name: flag order 3
Description: test for flag ordering
Version: 1
Libs: -L${libdir} -Wl,--start-group -lfoo -lbar -Wl,--end-group

View File

@ -13,6 +13,10 @@ tests_init \
tilde_quoting \
paren_quoting \
multiline_field \
flag_order_1 \
flag_order_2 \
flag_order_3 \
flag_order_4 \
quoted
comments_body()
@ -107,3 +111,35 @@ quoted_body()
-o inline:"-DQUOTED=\\\"bla\\\" \n" \
pkgconf --cflags quotes
}
flag_order_1_body()
{
export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \
-o inline:"-L/test/lib -Bdynamic -lfoo -Bstatic -lbar \n" \
pkgconf --libs flag-order-1
}
flag_order_2_body()
{
export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \
-o inline:"-L/test/lib -Bdynamic -lfoo -Bstatic -lbar -lfoo \n" \
pkgconf --libs flag-order-1 foo
}
flag_order_3_body()
{
export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \
-o inline:"-L/test/lib -Wl,--start-group -lfoo -lbar -Wl,--end-group \n" \
pkgconf --libs flag-order-3
}
flag_order_4_body()
{
export PKG_CONFIG_PATH="${selfdir}/lib1"
atf_check \
-o inline:"-L/test/lib -Wl,--start-group -lfoo -lbar -Wl,--end-group -lfoo \n" \
pkgconf --libs flag-order-3 foo
}