check: Rework dirafter test to handle all special cases

Expand the special flags test to check -framework usage and the handling
of multiple arguments.
This commit is contained in:
Dan Nicholson 2013-12-14 10:37:20 -08:00
parent 9f65411341
commit 860cab9a3e
4 changed files with 16 additions and 14 deletions

View file

@ -12,7 +12,7 @@ TESTS = \
check-includedir \
check-conflicts \
check-missing \
check-idirafter \
check-special-flags \
check-sort-order \
check-duplicate-flags \
check-whitespace \
@ -38,7 +38,7 @@ EXTRA_DIST = \
includedir.pc \
missing-requires-private.pc \
missing-requires.pc \
idirafter.pc \
special-flags.pc \
conflicts-test.pc \
whitespace.pc \
fields-blank.pc \

View file

@ -1,8 +0,0 @@
#! /bin/sh
set -e
. ${srcdir}/common
RESULT="-idirafter -I/after -I/foo -I/bar"
run_test --cflags idirafter

11
check/check-special-flags Executable file
View file

@ -0,0 +1,11 @@
#! /bin/sh
set -e
. ${srcdir}/common
RESULT="-idirafter /after1 -idirafter /after2 -I/foo -I/bar"
run_test --cflags special-flags
RESULT="-framework Foo -lsimple -framework Bar"
run_test --libs special-flags

View file

@ -3,10 +3,9 @@ exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: idirafter test
Name: Special flags test
Description: Dummy pkgconfig test package for testing pkgconfig
Version: 1.0.0
Requires:
Libs: -lsimple
Libs.private: -lm
Cflags: -I/foo -idirafter -I/after -I/bar
Libs: -framework Foo -lsimple -framework Bar
Cflags: -I/foo -idirafter /after1 -I/bar -idirafter /after2