From 77ca17b6ff4d32eef30c3d83cddbe00fbfb1a6b3 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Wed, 29 Mar 2017 18:00:10 -0500 Subject: [PATCH] tests: back out go-style test, just verify the output because shells are terrible --- tests/lib1/fragment-quoting-7.pc | 1 - tests/parser.sh | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/lib1/fragment-quoting-7.pc b/tests/lib1/fragment-quoting-7.pc index 81bbfb2..902e2f6 100644 --- a/tests/lib1/fragment-quoting-7.pc +++ b/tests/lib1/fragment-quoting-7.pc @@ -2,4 +2,3 @@ Name: fragment-quoting-7 Description: A testing pkg-config file, this time from Go Version: 1.2.3 Cflags: -Dhello=10 -Dworld=+32 -DDEFINED_FROM_PKG_CONFIG=hello\ world -Cflags.private: -DFOO_STATIC diff --git a/tests/parser.sh b/tests/parser.sh index 1d4f5be..6ae0db0 100755 --- a/tests/parser.sh +++ b/tests/parser.sh @@ -210,11 +210,26 @@ fragment_quoting_6_body() fragment_quoting_7_body() { + export PKG_CONFIG_PATH="${selfdir}/lib1" + atf_check \ + -o inline:"-Dhello=10 -Dworld=+32 -DDEFINED_FROM_PKG_CONFIG=hello\\ world \n" \ + pkgconf --cflags fragment-quoting-7 +} + +fragment_quoting_7a_body() +{ + set -x + test_cflags=$(pkgconf --with-path=${selfdir}/lib1 --cflags fragment-quoting-7) + echo $test_cflags +# test_cflags='-Dhello=10 -Dworld=+32 -DDEFINED_FROM_PKG_CONFIG=hello\\ world' + cat > test.c <<- __TESTCASE_END__ int main(int argc, char *argv[]) { return DEFINED_FROM_PKG_CONFIG; } __TESTCASE_END__ cc -o test-fragment-quoting-7 ${test_cflags} ./test.c atf_check -e 42 ./test-fragment-quoting-7 rm -f test.c test-fragment-quoting-7 + + set +x }