diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/deps.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/deps.sh b/tests/deps.sh index a73ffe8..12f4a25 100644 --- a/tests/deps.sh +++ b/tests/deps.sh @@ -21,23 +21,30 @@ ob_use deps -while read -r line; do +while read line; do line="${line%%#*}" [ -z "${line}" ] && continue - IFS=';' read test_dep good_pkg good_archqual good_rel good_ver good_arches \ + IFS=';' read -r test_dep good_pkg good_archqual good_rel good_ver good_arches \ <<EOF ${line} 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}" for comp in pkg archqual rel ver arches; do - test_assert [ '"${test_'${comp}'}"' = '"${good_'${comp}'}"' ] + comp="$(echo "${comp}" | sed 's/^ *//;s/ *$//')" + printf 'Testing component "%s"...\n' "${comp}" + test_assert [ "'$(eval echo \$\{test_${comp}\})'" = \ + "'$(eval echo \$\{good_${comp}\})'" ] done + printf '\n' + done <'depstab' |