summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib')
-rwxr-xr-xtests/lib/ob_get_binary_parameter.sh8
-rwxr-xr-xtests/lib/ob_reduce_deps.sh20
2 files changed, 25 insertions, 3 deletions
diff --git a/tests/lib/ob_get_binary_parameter.sh b/tests/lib/ob_get_binary_parameter.sh
index 1ad8a32..c85c3ec 100755
--- a/tests/lib/ob_get_binary_parameter.sh
+++ b/tests/lib/ob_get_binary_parameter.sh
@@ -23,7 +23,7 @@ set -eu
. "${TOP_SRCDIR}/tests/aux/common.sh"
. "${TOP_BUILDDIR}/lib/libopkbuild.${SHSOEXT}.${LIBOPKBUILD_SHSOVERSION}"
-plan_ 5
+plan_ 7
command_ok_ 'ob_init_package()' -- ob_init_package '..'
@@ -32,6 +32,10 @@ is 'foo Architecture' \
is 'foo Platform' \
"$(ob_get_binary_parameter 'foo' 'Platform')" 'all'
is 'bar Architecture' \
- "$(ob_get_binary_parameter 'bar' 'Architecture')" 'all'
+ "$(ob_get_binary_parameter 'bar' 'Architecture')" 'any'
is 'bar Platform' \
"$(ob_get_binary_parameter 'bar' 'Platform')" 'all'
+is 'baz-qux Architecture' \
+ "$(ob_get_binary_parameter 'baz-qux' 'Architecture')" 'all'
+is 'baz-qux Platform' \
+ "$(ob_get_binary_parameter 'baz-qux' 'Platform')" 'all'
diff --git a/tests/lib/ob_reduce_deps.sh b/tests/lib/ob_reduce_deps.sh
index b1e8609..72f32dd 100755
--- a/tests/lib/ob_reduce_deps.sh
+++ b/tests/lib/ob_reduce_deps.sh
@@ -22,7 +22,7 @@ set -eu
. "${TOP_SRCDIR}/tests/aux/tap-functions.sh"
. "${TOP_BUILDDIR}/lib/libopkbuild.${SHSOEXT}.${LIBOPKBUILD_SHSOVERSION}"
-plan_ 11
+plan_ 13
# Normal and union AND-lists.
@@ -83,6 +83,15 @@ command_ok_ \
x'foo, bar' \
]
+command_ok_ \
+ 'NORMAL LIST "foo, bar,"' -- \
+ [ x"$(ob_reduce_deps \
+ -a 'amd64-linux-glibc' \
+ 'foo, bar,' \
+ )" = \
+ x'foo, bar' \
+ ]
+
# Normal OR-lists.
command_ok_ \
@@ -112,6 +121,15 @@ command_ok_ \
x'foo | bar' \
]
+command_ok_ \
+ 'NORMAL LIST "foo | bar |"' -- \
+ [ x"$(ob_reduce_deps \
+ -a 'amd64-linux-glibc' \
+ 'foo | bar |' \
+ )" = \
+ x'foo | bar' \
+ ]
+
# Normal and union AND-lists with arch specs.
command_ok_ \