summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-09-09 20:55:19 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-09-09 20:55:19 (EDT)
commitcdb24dc9ed19720dc7cf3cd054762bacf446eeff (patch)
tree377c68a249a31149eac13513f9444a14e3e4fe6d
parenta0b738d81b66f2911ce2461ce9788f2a689f0df7 (diff)
Improve ob_parse_dep test output.
-rw-r--r--tests/deps.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/deps.sh b/tests/deps.sh
index 1d4aa99..851fe0a 100644
--- a/tests/deps.sh
+++ b/tests/deps.sh
@@ -35,21 +35,20 @@ EOF
test_dep="$(echo "${test_dep}" | sed 's/^ *//;s/ *$//')"
- printf 'Parsing dependency "%s"...\n' "${test_dep}"
-
ob_parse_dep -p test_pkg -q test_archqual -r test_rel -v test_ver \
- -A test_arches "${test_dep}"
+ -A test_arches "${test_dep}" >/dev/null
for comp in pkg archqual rel ver arches; do
comp="$(echo "${comp}" | sed 's/^ *//;s/ *$//')"
- printf 'Testing component "%s"...\n' "${comp}"
- test_assert [ "'$(eval echo \$\{test_${comp}\})'" = \
- "'$(eval echo \$\{good_${comp}\})'" ]
- [ ${?} -ne 0 ] && ret=1
+ test_comp="$(eval echo \"\$\{test_${comp}\}\")"
+ good_comp="$(eval echo \"\$\{good_${comp}\}\")"
+ if [ "${test_comp}" != "${good_comp}" ]; then
+ printf 'Dependency "%s", component "%s":\n "%s" != "%s"\n' \
+ "${test_dep}" "${comp}" "${test_comp}" "${good_comp}" >&2
+ ret=1
+ fi
done
- printf '\n'
-
done <'depstab'
exit ${ret}