tests: add tests for cflags/libs-only ordering flags

feature/tap-sh
William Pitcock 2012-07-25 17:23:21 -05:00
parent b09650a9e3
commit 197cb9b93f
2 changed files with 16 additions and 0 deletions

View File

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

View File

@ -99,6 +99,12 @@ run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --exists -foo; echo \$?" \
# 5) tests for other regressions # 5) tests for other regressions
run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --variable=includedir foo" \ run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --variable=includedir foo" \
'/usr/include' '/usr/include'
run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --libs-only-L cflags-libs-only" \
'-L/usr/local/lib'
run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --libs-only-L --libs-only-l cflags-libs-only" \
'-lfoo'
run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --cflags-only-I --cflags-only-other cflags-libs-only" \
'-I/usr/local/include'
# 6) tests for builtins # 6) tests for builtins
run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --modversion pkg-config" \ run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --modversion pkg-config" \