tests: use -z / -n to test for string empty / non-empty
[babeltrace.git] / tests / cli / query / test_query
index 3227650b122b037d9bbb10445e4ef18559e7218d..e44d67779b629417291dca8a403d833db0ed41c0 100755 (executable)
@@ -5,7 +5,7 @@
 # Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
 #
 
-if [ "x${BT_TESTS_SRCDIR:-}" != "x" ]; then
+if [ -n "${BT_TESTS_SRCDIR:-}" ]; then
        UTILSSH="$BT_TESTS_SRCDIR/utils/utils.sh"
 else
        UTILSSH="$(dirname "$0")/../../utils/utils.sh"
@@ -79,7 +79,7 @@ expect_failure "ValueError: catastrophic failure" \
        'src.query.SourceWithQueryThatPrintsParams' 'please-fail' '-p' 'a=2'
 
 # Non-existent component class.
-expect_failure 'Cannot find component class: plugin-name="query", comp-cls-name="NonExistentSource", comp-cls-type=1' \
+expect_failure 'Cannot find component class: plugin-name="query", comp-cls-name="NonExistentSource", comp-cls-type=SOURCE' \
        'src.query.NonExistentSource' 'the-object' '-p' 'a=2'
 
 # Wrong parameter syntax.
This page took 0.023784 seconds and 4 git commands to generate.