testsuite: add tests for circular dependencies

feature/tap-sh
William Pitcock 2013-02-24 06:42:03 -06:00
parent beda1fffdd
commit b1949e7706
3 changed files with 16 additions and 1 deletions

View File

@ -7,5 +7,5 @@ Name: circular-2
Description: A testing pkg-config file Description: A testing pkg-config file
Version: 1.2.3 Version: 1.2.3
Libs: -lcircular-2 Libs: -lcircular-2
Requires: circular-1 Requires: circular-3
Cflags: Cflags:

11
tests/lib1/circular-3.pc Normal file
View File

@ -0,0 +1,11 @@
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
Name: circular-3
Description: A testing pkg-config file
Version: 1.2.3
Libs: -lcircular-3
Requires: circular-1
Cflags:

View File

@ -86,6 +86,10 @@ run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --exists '' 'foo'; echo \$?" \
'0' '0'
run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs intermediary-1 intermediary-2" \ run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs intermediary-1 intermediary-2" \
'-lintermediary-1 -lintermediary-2 -lfoo -lbar -lbaz' '-lintermediary-1 -lintermediary-2 -lfoo -lbar -lbaz'
run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs circular-1" \
'-lcircular-2 -lcircular-3 -lcircular-1'
run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs circular-3" \
'-lcircular-1 -lcircular-2 -lcircular-3'
# 2) tests for PKG_CONFIG_PATH order # 2) tests for PKG_CONFIG_PATH order
run_test "PKG_CONFIG_PATH='${selfdir}/lib1${PATH_SEP}${selfdir}/lib2' ${1} --libs foo" \ run_test "PKG_CONFIG_PATH='${selfdir}/lib1${PATH_SEP}${selfdir}/lib2' ${1} --libs foo" \