From 834e21d37ef8319501ad08e963a558785ffbdeec Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Wed, 24 Aug 2016 19:00:10 -0500 Subject: [PATCH] testsuite: add tests for normal fragments and whitespace munging, too (closes #94) --- Makefile.am | 3 ++- tests/lib1/cflags-whitespace.pc | 4 ++++ tests/run.sh.in | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 tests/lib1/cflags-whitespace.pc diff --git a/Makefile.am b/Makefile.am index 9910dee..f2ea1d4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -53,7 +53,8 @@ EXTRA_DIST = \ tests/lib1/conflicts.pc \ tests/lib1/omg-uninstalled.pc \ tests/lib1/isystem.pc \ - tests/lib1/depgraph-break.pc + tests/lib1/depgraph-break.pc \ + tests/lib1/cflags-whitespace.pc pkginclude_HEADERS = libpkgconf/bsdstubs.h libpkgconf/iter.h libpkgconf/libpkgconf.h libpkgconf/stdinc.h libpkgconf_la_SOURCES = \ diff --git a/tests/lib1/cflags-whitespace.pc b/tests/lib1/cflags-whitespace.pc new file mode 100644 index 0000000..4cd1cd1 --- /dev/null +++ b/tests/lib1/cflags-whitespace.pc @@ -0,0 +1,4 @@ +Name: CFlags Whitespace Bug +Description: Demonstrates problems with -I with spaces and sysroot munging +Version: 1 +Cflags: -I /opt/bad/include diff --git a/tests/run.sh.in b/tests/run.sh.in index 6a5a720..646fec5 100644 --- a/tests/run.sh.in +++ b/tests/run.sh.in @@ -292,6 +292,9 @@ run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} --print-provides foo" \ run_test "PKG_CONFIG_PATH='${selfdir}/lib1' PKG_CONFIG_SYSROOT_DIR='/test' ${1} --cflags isystem" \ "-isystem /test/opt/bad/include" +run_test "PKG_CONFIG_PATH='${selfdir}/lib1' PKG_CONFIG_SYSROOT_DIR='/test' ${1} --cflags cflags-whitespace" \ + "-I /test/opt/bad/include" + # 10) tests for internal getopt implementation with options at the end if [ "x@STRICT_MODE@" = "xno" ]; then run_test "PKG_CONFIG_PATH='${selfdir}/lib1' ${1} foo --libs" \