summaryrefslogtreecommitdiffstats
path: root/tests/ob_parse_dep.sh
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-13 17:15:03 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-13 17:15:03 (EDT)
commite6b04d9ffd8bef2482ab61957c138ae92527206d (patch)
treef70b0b04037b1a537331eed3c6d4c397c84de5d3 /tests/ob_parse_dep.sh
parent2ddb616b87a2a4684d03c9b54e95f800e73017d9 (diff)
Protect [ commands from strings beginning with "-"
Diffstat (limited to 'tests/ob_parse_dep.sh')
-rwxr-xr-xtests/ob_parse_dep.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ob_parse_dep.sh b/tests/ob_parse_dep.sh
index 2ee6cbf..887f6f1 100755
--- a/tests/ob_parse_dep.sh
+++ b/tests/ob_parse_dep.sh
@@ -40,7 +40,7 @@ testcase()
for comp in pkg archqual rel ver arches; do
test_comp="$(eval "printf '%s' \"\${test_${comp}}\"")"
good_comp="$(eval "printf '%s' \"\${${comp}}\"")"
- if [ "${test_comp}" != "${good_comp}" ]; then
+ if [ x"${test_comp}" != x"${good_comp}" ]; then
diag_ "$(printf 'Dependency "%s", component "%s":' \
"${dep}" "${comp}")"
diag_ "$(printf ' "%s" != "%s"\n' \