summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/ob_parse_dep.sh2
-rwxr-xr-xtests/ob_reduce_deps.sh44
2 files changed, 23 insertions, 23 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' \
diff --git a/tests/ob_reduce_deps.sh b/tests/ob_reduce_deps.sh
index 833f8de..7030f07 100755
--- a/tests/ob_reduce_deps.sh
+++ b/tests/ob_reduce_deps.sh
@@ -28,107 +28,107 @@ plan_ 11
command_ok_ \
'NORMAL LIST "foo, bar"' -- \
- [ "$(ob_reduce_deps \
+ [ x"$(ob_reduce_deps \
-a 'amd64-linux-glibc' \
'foo, bar' \
)" = \
- 'foo, bar' \
+ x'foo, bar' \
]
command_ok_ \
'NORMAL LIST "foo,bar"' -- \
- [ "$(ob_reduce_deps \
+ [ x"$(ob_reduce_deps \
-a 'amd64-linux-glibc' \
'foo,bar' \
)" = \
- 'foo, bar' \
+ x'foo, bar' \
]
command_ok_ \
'NORMAL LIST "foo, bar"' -- \
- [ "$(ob_reduce_deps \
+ [ x"$(ob_reduce_deps \
-a 'amd64-linux-glibc' \
'foo, bar' \
)" = \
- 'foo, bar' \
+ x'foo, bar' \
]
command_ok_ \
'UNION LIST "foo, bar"' -- \
- [ "$(ob_reduce_deps \
+ [ x"$(ob_reduce_deps \
-u \
-a 'amd64-linux-glibc' \
'foo, bar' \
)" = \
- 'foo, bar' \
+ x'foo, bar' \
]
command_ok_ \
'UNION LIST "foo,bar"' -- \
- [ "$(ob_reduce_deps \
+ [ x"$(ob_reduce_deps \
-u \
-a 'amd64-linux-glibc' \
'foo,bar' \
)" = \
- 'foo, bar' \
+ x'foo, bar' \
]
command_ok_ \
'UNION LIST "foo, bar"' -- \
- [ "$(ob_reduce_deps \
+ [ x"$(ob_reduce_deps \
-u \
-a 'amd64-linux-glibc' \
'foo, bar' \
)" = \
- 'foo, bar' \
+ x'foo, bar' \
]
# Normal OR-lists.
command_ok_ \
'NORMAL LIST "foo | bar"' -- \
- [ "$(ob_reduce_deps \
+ [ x"$(ob_reduce_deps \
-a 'amd64-linux-glibc' \
'foo | bar' \
)" = \
- 'foo | bar' \
+ x'foo | bar' \
]
command_ok_ \
'NORMAL LIST "foo|bar"' -- \
- [ "$(ob_reduce_deps \
+ [ x"$(ob_reduce_deps \
-a 'amd64-linux-glibc' \
'foo|bar' \
)" = \
- 'foo | bar' \
+ x'foo | bar' \
]
command_ok_ \
'NORMAL LIST "foo | bar"' -- \
- [ "$(ob_reduce_deps \
+ [ x"$(ob_reduce_deps \
-a 'amd64-linux-glibc' \
'foo | bar' \
)" = \
- 'foo | bar' \
+ x'foo | bar' \
]
# Normal and union AND-lists with arch specs.
command_ok_ \
'NORMAL LIST "foo [amd64-linux-glibc], bar [!amd64-linux-glibc]"' -- \
- [ "$(ob_reduce_deps \
+ [ x"$(ob_reduce_deps \
-a 'amd64-linux-glibc' \
'foo [amd64-linux-glibc], bar [!amd64-linux-glibc]' \
)" = \
- 'foo' \
+ x'foo' \
]
command_ok_ \
'UNION LIST "foo [amd64-linux-glibc], bar [!amd64-linux-glibc]"' -- \
- [ "$(ob_reduce_deps \
+ [ x"$(ob_reduce_deps \
-u \
-a 'amd64-linux-glibc' \
'foo [amd64-linux-glibc], bar [!amd64-linux-glibc]' \
)" = \
- 'foo' \
+ x'foo' \
]