diff options
author | Tollef Fog Heen <tfheen@err.no> | 2008-03-23 21:39:07 +0100 |
---|---|---|
committer | Tollef Fog Heen <tfheen@err.no> | 2008-03-23 21:39:07 +0100 |
commit | 69dafea1c8f4737b51e32ac1b9427076c70728c1 (patch) | |
tree | 29405f16b6d55211720cb234931240775a6d6f27 /check | |
parent | 15e72cef72e0187ca5547e44888c391591359634 (diff) | |
download | pkg-config-69dafea1c8f4737b51e32ac1b9427076c70728c1.tar.gz |
2008-03-23 Tollef Fog Heen <tfheen@err.no>
* check/check-conflicts, check/conflicts-test.pc: New test,
testing that conflicts work as they should.
* pkg.c (verify_package): Make the conflicts check not only check
package versions, but also package names. This makes conflicts
functional, something they were not before.
Diffstat (limited to 'check')
-rw-r--r-- | check/Makefile.am | 3 | ||||
-rwxr-xr-x | check/check-conflicts | 16 | ||||
-rw-r--r-- | check/conflicts-test.pc | 6 | ||||
-rw-r--r-- | check/public-dep.pc | 1 |
4 files changed, 24 insertions, 2 deletions
diff --git a/check/Makefile.am b/check/Makefile.am index df199c7..772c8ad 100644 --- a/check/Makefile.am +++ b/check/Makefile.am @@ -1,6 +1,7 @@ TESTS = check-cflags check-libs check-define-variable \ - check-libs-private check-requires-private check-includedir + check-libs-private check-requires-private check-includedir \ + check-conflicts EXTRA_DIST = $(TESTS) common simple.pc requires-test.pc public-dep.pc \ private-dep.pc includedir.pc diff --git a/check/check-conflicts b/check/check-conflicts new file mode 100755 index 0000000..8092ba9 --- /dev/null +++ b/check/check-conflicts @@ -0,0 +1,16 @@ +#! /bin/sh + +# Make sure we're POSIX +if [ "$PKG_CONFIG_SHELL_IS_POSIX" != "1" ]; then + PKG_CONFIG_SHELL_IS_POSIX=1 PATH=`getconf PATH` exec sh $0 "$@" +fi + +set -e + +. ${srcdir}/common + +ARGS="--libs conflicts-test" +RESULT="-L/public-dep/lib -lpublic-dep" + +run_test + diff --git a/check/conflicts-test.pc b/check/conflicts-test.pc new file mode 100644 index 0000000..aadebf0 --- /dev/null +++ b/check/conflicts-test.pc @@ -0,0 +1,6 @@ +Name: Conflicts test package +Description: Dummy pkgconfig test package for testing Conflicts +Version: 1.0.0 +Requires: public-dep +Conflicts: simple + diff --git a/check/public-dep.pc b/check/public-dep.pc index 7350e5d..66af831 100644 --- a/check/public-dep.pc +++ b/check/public-dep.pc @@ -3,4 +3,3 @@ Description: Dummy pkgconfig test package for testing Requires/Requires.private Version: 1.0.0 Libs: -L/public-dep/lib -lpublic-dep Cflags: -I/public-dep/include - |