From 15c24b6bf690b1bc5594d25dac3f2505fb1134e4 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 1 Jul 2012 22:03:07 -0500 Subject: [PATCH] testsuite: more tests for --max-version and --exact-version (closes #20) --- tests/run.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/run.sh b/tests/run.sh index 1807fa6..db14e04 100644 --- a/tests/run.sh +++ b/tests/run.sh @@ -103,11 +103,28 @@ run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --atleast-version 1.0 foo; echo \ '0' run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --atleast-version 2.0 foo; echo \$?" \ '1' +run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --exact-version 1.0 foo; echo \$?" \ + '1' +run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --exact-version 1.2.3 foo; echo \$?" \ + '0' +run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --max-version 1.0 foo; echo \$?" \ + '1' +run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --max-version 2.0 foo; echo \$?" \ + '0' + # tests for issue #20 run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --atleast-version 1.0 'foo '; echo \$?" \ '0' run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --atleast-version 2.0 'foo '; echo \$?" \ '1' +run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --exact-version 1.0 'foo '; echo \$?" \ + '1' +run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --exact-version 1.2.3 'foo '; echo \$?" \ + '0' +run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --max-version 1.0 'foo '; echo \$?" \ + '1' +run_test "PKG_CONFIG_PATH=${selfdir}/lib1 ${1} --max-version 2.0 'foo '; echo \$?" \ + '0' if [ ${failed} -gt 0 ]; then echo "${failed} of ${done} tests failed. See output for details." >&2