testsuite: add regression test for #111

William Pitcock 2017-02-03 12:58:11 -06:00
parent 22db6891dd
commit 82ba7398c7
3 changed files with 21 additions and 1 deletions

View File

@ -65,6 +65,7 @@ EXTRA_DIST = pkg.m4 \
tests/lib1/flag-order-1.pc \ tests/lib1/flag-order-1.pc \
tests/lib1/flag-order-3.pc \ tests/lib1/flag-order-3.pc \
tests/lib1/variable-whitespace.pc \ tests/lib1/variable-whitespace.pc \
tests/lib1/fragment-quoting.pc \
tests/test_env.sh \ tests/test_env.sh \
$(test_scripts) \ $(test_scripts) \
doc/conf.py \ doc/conf.py \

View File

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

View File

@ -18,7 +18,8 @@ tests_init \
flag_order_3 \ flag_order_3 \
flag_order_4 \ flag_order_4 \
quoted \ quoted \
variable_whitespace variable_whitespace \
fragment_quoting
comments_body() comments_body()
{ {
@ -152,3 +153,11 @@ variable_whitespace_body()
-o inline:"-I/test/include \n" \ -o inline:"-I/test/include \n" \
pkgconf --cflags variable-whitespace 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
}