From cdb24dc9ed19720dc7cf3cd054762bacf446eeff Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 09 Sep 2012 20:55:19 -0400 Subject: Improve ob_parse_dep test output. --- (limited to 'tests') 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} -- cgit v0.9.1