From 4a508b4fd96a698959f409ce044ae85236f9708c Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 19 May 2017 23:43:47 -0500 Subject: [PATCH] tests: regress: add regression test for malformed package testcase --- Makefile.am | 1 + tests/regress.sh | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 64549b0..90acd5b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -76,6 +76,7 @@ EXTRA_DIST = pkg.m4 \ tests/lib1/fragment-quoting-5.pc \ tests/lib1/fragment-quoting-6.pc \ tests/lib1/fragment-quoting-7.pc \ + tests/lib1/malformed-1.pc \ tests/test_env.sh \ $(test_scripts) \ doc/conf.py \ diff --git a/tests/regress.sh b/tests/regress.sh index 1acf8af..e53b42e 100755 --- a/tests/regress.sh +++ b/tests/regress.sh @@ -25,7 +25,8 @@ tests_init \ pcpath \ sysroot_munge \ virtual_variable \ - fragment_collision + fragment_collision \ + malformed_1 case_sensitivity_body() { @@ -224,3 +225,9 @@ fragment_collision_body() atf_check -o inline:"-D_BAZ -D_BAR -D_FOO -D_THREAD_SAFE -pthread \n" \ pkgconf --with-path="${selfdir}/lib1" --cflags fragment-collision } + +malformed_1_body() +{ + atf_check -s exit:1 -o ignore \ + pkgconf --validate --with-path="${selfdir}/lib1" malformed-1 +}