testsuite: add a parser test from Go (redhat #1437101)

feature/tap-sh
William Pitcock 2017-03-29 16:58:04 -05:00
parent 849261cf58
commit f5ce5fd755
3 changed files with 19 additions and 1 deletions

View File

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

View File

@ -0,0 +1,5 @@
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

View File

@ -24,7 +24,8 @@ tests_init \
fragment_quoting_3 \ fragment_quoting_3 \
fragment_quoting_4 \ fragment_quoting_4 \
fragment_quoting_5 \ fragment_quoting_5 \
fragment_quoting_6 fragment_quoting_6 \
fragment_quoting_7
comments_body() comments_body()
{ {
@ -206,3 +207,14 @@ fragment_quoting_6_body()
-o inline:"-fPIC -I/test/include/foo -DQUOTED=\\\'/test/share/doc\\\' \n" \ -o inline:"-fPIC -I/test/include/foo -DQUOTED=\\\'/test/share/doc\\\' \n" \
pkgconf --cflags fragment-quoting-6 pkgconf --cflags fragment-quoting-6
} }
fragment_quoting_7_body()
{
test_cflags=$(pkgconf --with-path=${selfdir}/lib1 --cflags fragment-quoting-7)
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
}