From 15ae233d23807db190917f72df257cdc9bbac0a8 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 22 Jan 2017 23:21:51 -0600 Subject: [PATCH] tests: add a regression test for #108 --- tests/regress.sh | 16 +++++++++++++++- tests/test_env.sh.in | 5 +++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/tests/regress.sh b/tests/regress.sh index f51aad9..894d2e4 100755 --- a/tests/regress.sh +++ b/tests/regress.sh @@ -23,7 +23,8 @@ tests_init \ idirafter_munge_sysroot \ idirafter_ordering \ pcpath \ - sysroot_munge + sysroot_munge \ + virtual_variable case_sensitivity_body() { @@ -203,3 +204,16 @@ sysroot_munge_body() -o inline:"-L/sysroot2/sysroot/lib -lfoo \n" \ pkgconf --libs sysroot-dir } + +virtual_variable_body() +{ + atf_check -s exit:0 \ + pkgconf --exists pkg-config + atf_check -s exit:0 \ + pkgconf --exists pkgconf + + atf_check -o inline:"${pcpath}\n" \ + pkgconf --variable=pc_path pkg-config + atf_check -o inline:"${pcpath}\n" \ + pkgconf --variable=pc_path pkgconf +} diff --git a/tests/test_env.sh.in b/tests/test_env.sh.in index 2ea190e..cf0cfc4 100644 --- a/tests/test_env.sh.in +++ b/tests/test_env.sh.in @@ -6,6 +6,11 @@ if [ "$(uname -s)" = "Msys" ]; then PATH_SEP=";" fi +prefix="@prefix@" +exec_prefix="@exec_prefix@" +datarootdir="@datarootdir@" +pcpath="@PKGCONFIGDIR@" + tests_init() { TESTS="$@"