testsuite: add testsuite cases for inverse quoting situations

pull/116/head
William Pitcock 2017-02-25 13:57:38 -06:00
parent 9b255d465c
commit a3fa9732b3
5 changed files with 61 additions and 1 deletions

View File

@ -68,6 +68,9 @@ EXTRA_DIST = pkg.m4 \
tests/lib1/fragment-quoting.pc \
tests/lib1/fragment-quoting-2.pc \
tests/lib1/fragment-quoting-3.pc \
tests/lib1/fragment-quoting-4.pc \
tests/lib1/fragment-quoting-5.pc \
tests/lib1/fragment-quoting-6.pc \
tests/test_env.sh \
$(test_scripts) \
doc/conf.py \

View File

@ -0,0 +1,10 @@
prefix=/test
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
Name: fragment-quoting-4
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

@ -0,0 +1,10 @@
prefix=/test
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
Name: fragment-quoting-5
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

@ -0,0 +1,10 @@
prefix=/test
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include
Name: fragment-quoting-6
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

@ -21,7 +21,10 @@ tests_init \
variable_whitespace \
fragment_quoting \
fragment_quoting_2 \
fragment_quoting_3
fragment_quoting_3 \
fragment_quoting_4 \
fragment_quoting_5 \
fragment_quoting_6
comments_body()
{
@ -179,3 +182,27 @@ fragment_quoting_3_body()
-o inline:"-fPIC -I/test/include/foo -DQUOTED=\\\"/test/share/doc\\\" \n" \
pkgconf --cflags fragment-quoting-3
}
fragment_quoting_4_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-4
}
fragment_quoting_5_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-5
}
fragment_quoting_6_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-6
}