From 21c7355ca897f935bd162b98f697c010e0f7bd26 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 26 Aug 2016 21:36:18 -0500 Subject: [PATCH] testsuite: improve --print-provides test by adding a provides.pc file --- Makefile.am | 3 ++- tests/lib1/provides.pc | 6 ++++++ tests/run.sh.in | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 tests/lib1/provides.pc diff --git a/Makefile.am b/Makefile.am index f2ea1d4..1f6e60e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -54,7 +54,8 @@ EXTRA_DIST = \ tests/lib1/omg-uninstalled.pc \ tests/lib1/isystem.pc \ tests/lib1/depgraph-break.pc \ - tests/lib1/cflags-whitespace.pc + tests/lib1/cflags-whitespace.pc \ + tests/lib1/provides.pc pkginclude_HEADERS = libpkgconf/bsdstubs.h libpkgconf/iter.h libpkgconf/libpkgconf.h libpkgconf/stdinc.h libpkgconf_la_SOURCES = \ diff --git a/tests/lib1/provides.pc b/tests/lib1/provides.pc new file mode 100644 index 0000000..24481ba --- /dev/null +++ b/tests/lib1/provides.pc @@ -0,0 +1,6 @@ +Name: provides +Description: A testing pkg-config file +Version: 1.2.3 +Libs: -lfoo +Cflags: -I/usr/include/foo +Provides: provides-test-foo = 1.0.0, provides-test-baz >= 1.1.0, provides-test-moo <= 1.2.0 diff --git a/tests/run.sh.in b/tests/run.sh.in index 646fec5..e2b320b 100644 --- a/tests/run.sh.in +++ b/tests/run.sh.in @@ -286,8 +286,8 @@ run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --cflags prefix-foo1 prefix-foo run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --variable=typelibdir --define-variable='libdir=\${libdir}' typelibdir" \ "\${libdir}/typelibdir" -run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --print-provides foo" \ - "foo = 1.2.3" +run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --print-provides provides" \ + "provides = 1.2.3" "provides-test-foo = 1.0.0" "provides-test-baz >= 1.1.0" "provides-test-moo <= 1.2.0" run_test "PKG_CONFIG_PATH='${selfdir}/lib1' PKG_CONFIG_SYSROOT_DIR='/test' ${1} --cflags isystem" \ "-isystem /test/opt/bad/include"