diff options
author | P. J. McDermott <pjm@nac.net> | 2012-09-09 15:25:53 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-09-09 15:25:53 (EDT) |
commit | 9c8dd3ec9379ad7ac378c813f332dedd35f88cc1 (patch) | |
tree | e3cadb9b0221008e91abe64f94505d4085b8f600 /tests | |
parent | f79a55cb6f646262008b1eeea7daca8e4fa00063 (diff) |
Fix depstab parsing and component testing.
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' |