From 1d0f990afa065fbaf5e2c5f044b0909334b7a9b2 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Wed, 20 Mar 2013 14:51:15 +0100 Subject: [PATCH] Add a test case showing a regression where PKG_CONFIG_PATH is ignored --- tests/lib3/bar.pc | 10 ++++++++++ tests/run.sh.in | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tests/lib3/bar.pc diff --git a/tests/lib3/bar.pc b/tests/lib3/bar.pc new file mode 100644 index 0000000..688d2af --- /dev/null +++ b/tests/lib3/bar.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: bar +Description: Another pkg-config test +Version: 1.3 +Libs: -L${libdir} -lbar +Requires: foo diff --git a/tests/run.sh.in b/tests/run.sh.in index 685ce26..7435c82 100644 --- a/tests/run.sh.in +++ b/tests/run.sh.in @@ -225,9 +225,12 @@ run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --libs framework-2" \ run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --exists --print-errors 'foo > 0.6.0 foo < 0.8.0'; echo \$?" \ '1' -run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --exists --print-errors 'nonexisting foo <= 3'; echo \$?" \ +run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --exists --print-errors 'nonexisting foo <= 3'; echo \$?" \ '1' +run_test "PKG_CONFIG_PATH='${selfdir}/lib2' ${1} ${selfdir}/lib3/bar.pc --cflags'" \ + '-fPIC -I/usr/include/foo' + # 10) tests for internal getopt implementation with options at the end if [ "x@STRICT_MODE@" = "xno" ]; then run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} foo --libs" \