testsuite: improve --print-provides test by adding a provides.pc file

pull/100/head
William Pitcock 2016-08-26 21:36:18 -05:00
parent da2f49f7b0
commit 21c7355ca8
3 changed files with 10 additions and 3 deletions

View File

@ -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 = \

6
tests/lib1/provides.pc Normal file
View File

@ -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

View File

@ -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"