summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2011-06-20 14:31:47 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2011-06-20 14:31:47 +0000
commitbd5acf2a2c4c90f86fb4194c64bd56ce84fa7f45 (patch)
treef8675a851aed8de5661194b1e1b0a3596c808441 /regress
parent653323693d816678cb3a8a2cb1499e5bfc56350c (diff)
- add tests for suffixes in Requires(.private)
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.bin/pkg-config/Makefile19
-rw-r--r--regress/usr.bin/pkg-config/pcdir/alpha.pc1
-rw-r--r--regress/usr.bin/pkg-config/pcdir/requires-test2.pc5
3 files changed, 24 insertions, 1 deletions
diff --git a/regress/usr.bin/pkg-config/Makefile b/regress/usr.bin/pkg-config/Makefile
index b1340508d1a..f262e3decf0 100644
--- a/regress/usr.bin/pkg-config/Makefile
+++ b/regress/usr.bin/pkg-config/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.20 2011/06/16 09:16:18 jasper Exp $
+# $OpenBSD: Makefile,v 1.21 2011/06/20 14:31:46 jasper Exp $
REGRESS_TARGETS=cmp-vers1-1 \
cmp-vers1-2 \
@@ -24,6 +24,8 @@ REGRESS_TARGETS=cmp-vers1-1 \
cmp-vers5-5 \
cmp-vers5-6 \
cmp-vers5-7 \
+ cmp-vers6-1 \
+ cmp-vers6-2 \
corrupt1 \
corrupt2 \
corrupt3 \
@@ -268,6 +270,21 @@ cmp-vers5-10:
--errors-to-stdout --print-errors "beta <= 0.1.0rc2" > ${GOT}
@diff -u ${WANT} ${GOT}
+cmp-vers6-1:
+ # Test suffixed versions in Requires
+ @echo " -lalpha2" > ${WANT}
+ @PKG_CONFIG_PATH=${.CURDIR}/pcdir/ ${PKG_CONFIG} --errors-to-stdout \
+ --print-errors --libs requires-test2 > ${GOT}
+ @diff -u ${WANT} ${GOT}
+
+cmp-vers6-2:
+ # Test suffixed versions in Requires.private
+ @echo "Requested 'alpha >= 0.1.0alpha3' but version of alpha suffix test is 0.1.0alpha2" > ${WANT}
+ @if PKG_CONFIG_PATH=${.CURDIR}/pcdir/ ${PKG_CONFIG} --errors-to-stdout \
+ --print-errors --libs --static requires-test2 > ${GOT}; then \
+ false; fi
+ @diff -u ${WANT} ${GOT}
+
# Tests for various environment variables
builddir:
# Test PKG_CONFIG_TOP_BUILD_DIR
diff --git a/regress/usr.bin/pkg-config/pcdir/alpha.pc b/regress/usr.bin/pkg-config/pcdir/alpha.pc
index 5f8e16ca39b..bd595a56b81 100644
--- a/regress/usr.bin/pkg-config/pcdir/alpha.pc
+++ b/regress/usr.bin/pkg-config/pcdir/alpha.pc
@@ -1,3 +1,4 @@
Name: alpha suffix test
Description: pkg-config(1) regress file
Version: 0.1.0alpha2
+Libs: -lalpha2
diff --git a/regress/usr.bin/pkg-config/pcdir/requires-test2.pc b/regress/usr.bin/pkg-config/pcdir/requires-test2.pc
new file mode 100644
index 00000000000..4484fcb15b3
--- /dev/null
+++ b/regress/usr.bin/pkg-config/pcdir/requires-test2.pc
@@ -0,0 +1,5 @@
+Name: Requires test package
+Description: pkg-config(1) regress file
+Version: 1.0.0
+Requires: alpha >= 0.1.0alpha2
+Requires.private: alpha >= 0.1.0alpha3