tests: add tests for issue #34

William Pitcock 2012-08-09 16:43:20 -05:00
parent 4de01dd45b
commit 5222dfb28b
3 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,10 @@
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
Name: intermediary-1
Description: A testing pkg-config file
Version: 1.2.3
Libs: -L${libdir} -lintermediary-1 -lfoo -lbar -lbaz
Cflags: -fPIC -I${includedir}/foo

View File

@ -0,0 +1,10 @@
prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
Name: intermediary-2
Description: A testing pkg-config file
Version: 1.2.3
Libs: -L${libdir} -lintermediary-2 -lfoo -lbar -lbaz
Cflags: -fPIC -I${includedir}/foo

View File

@ -76,6 +76,8 @@ run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --exists 'tilde >= 1.0.0'; echo \
'0'
run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --exists '' 'foo'; echo \$?" \
'0'
run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --libs intermediary-1 intermediary-2" \
'-lintermediary-1 -lintermediary-2 -lfoo -lbar -lbaz'
# 2) tests for PKG_CONFIG_PATH order
run_test "PKG_CONFIG_PATH=${selfdir}/lib1:${selfdir}/lib2 ${1} --libs foo" \