diff --git a/tests/lib1/conflicts.pc b/tests/lib1/conflicts.pc new file mode 100644 index 0000000..f217201 --- /dev/null +++ b/tests/lib1/conflicts.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: conflicts +Description: A testing pkg-config file +Conflicts: foo <= 1.3 +Version: 1.2.3 +Libs: -L${libdir} -lconflicts +Cflags: -fPIC -I${includedir}/conflicts diff --git a/tests/run.sh b/tests/run.sh index 5e262a7..054e808 100644 --- a/tests/run.sh +++ b/tests/run.sh @@ -92,6 +92,12 @@ run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --define-variable=prefix=/test -- run_test "PKG_CONFIG_PATH=${selfdir}/lib1 PKG_CONFIG_SYSROOT_DIR=/test ${1} --cflags baz" \ '-I/test/usr/include/foo' +# 8) tests for 'Conflicts' +run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --libs conflicts; echo \$?" \ + '1' +run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --ignore-conflicts --libs conflicts; echo \$?" \ + '-lconflicts' '0' + if [ ${failed} -gt 0 ]; then echo "${failed} of ${done} tests failed. See output for details." >&2 exit 1