From 02ad6d1ab9a5bd109825281d50f30fbf28897404 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 3 Feb 2017 12:58:11 -0600 Subject: [PATCH] testsuite: add regression test for #111 --- Makefile.am | 1 + tests/lib1/fragment-quoting.pc | 10 ++++++++++ tests/parser.sh | 11 ++++++++++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 tests/lib1/fragment-quoting.pc diff --git a/Makefile.am b/Makefile.am index 07aea7d..0c0576d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -65,6 +65,7 @@ EXTRA_DIST = pkg.m4 \ tests/lib1/flag-order-1.pc \ tests/lib1/flag-order-3.pc \ tests/lib1/variable-whitespace.pc \ + tests/lib1/fragment-quoting.pc \ tests/test_env.sh \ $(test_scripts) \ doc/conf.py \ diff --git a/tests/lib1/fragment-quoting.pc b/tests/lib1/fragment-quoting.pc new file mode 100644 index 0000000..5d8e70b --- /dev/null +++ b/tests/lib1/fragment-quoting.pc @@ -0,0 +1,10 @@ +prefix=/test +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: fragment-quoting +Description: A testing pkg-config file +Version: 1.2.3 +Cflags: -fPIC -I${includedir}/foo -DQUOTED='"${prefix}/share/doc"' +Cflags.private: -DFOO_STATIC diff --git a/tests/parser.sh b/tests/parser.sh index 203236a..8461f80 100755 --- a/tests/parser.sh +++ b/tests/parser.sh @@ -18,7 +18,8 @@ tests_init \ flag_order_3 \ flag_order_4 \ quoted \ - variable_whitespace + variable_whitespace \ + fragment_quoting comments_body() { @@ -152,3 +153,11 @@ variable_whitespace_body() -o inline:"-I/test/include \n" \ pkgconf --cflags variable-whitespace } + +fragment_quoting_body() +{ + export PKG_CONFIG_PATH="${selfdir}/lib1" + atf_check \ + -o inline:"-fPIC -I/test/include/foo -DQUOTED='\"/test/share/doc\"' \n" \ + pkgconf --cflags fragment-quoting +}