From d8cd27e2d28cf516995bd9404c04b9073d49a3bc Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Mon, 5 Aug 2024 16:43:54 -0700 Subject: [PATCH] tests: add test for --exists-cflags with --env --- tests/basic.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/basic.sh b/tests/basic.sh index 691c43b..133ccf5 100755 --- a/tests/basic.sh +++ b/tests/basic.sh @@ -22,6 +22,7 @@ tests_init \ exists3 \ exists_version_alt \ exists_cflags \ + exists_cflags_env \ uninstalled_bad \ uninstalled \ libs_intermediary \ @@ -348,3 +349,10 @@ exists_cflags_body() -o inline:"-DHAVE_FOO\n" \ pkgconf --with-path=${selfdir}/lib1 --cflags --exists-cflags --fragment-filter=D foo } + +exists_cflags_env_body() +{ + atf_check \ + -o inline:"FOO_CFLAGS='-DHAVE_FOO'\n" \ + pkgconf --with-path=${selfdir}/lib1 --cflags --exists-cflags --fragment-filter=D --env=FOO foo +}