Tests for PKG_CONFIG_PATH ordering.

feature/tap-sh
Michał Górny 2012-05-03 09:04:48 +02:00
parent 97b8c09365
commit 482b65f1ce
2 changed files with 16 additions and 0 deletions

10
tests/lib2/foo.pc Normal file
View File

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

View File

@ -48,6 +48,12 @@ run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --exists 'foo > 1.2'; echo \$?" \
run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --exists 'foo > 1.2.3'; echo \$?" \ run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --exists 'foo > 1.2.3'; echo \$?" \
'1' '1'
# 2) tests for PKG_CONFIG_PATH order
run_test "PKG_CONFIG_PATH=${selfdir}/lib1:${selfdir}/lib2 ${1} --libs foo" \
'-lfoo'
run_test "PKG_CONFIG_PATH=${selfdir}/lib2:${selfdir}/lib1 ${1} --libs foo" \
'-lbar'
if [ ${failed} -gt 0 ]; then if [ ${failed} -gt 0 ]; then
echo "${failed} of ${done} tests failed. See output for details." >&2 echo "${failed} of ${done} tests failed. See output for details." >&2
exit 1 exit 1