tests: use -z / -n to test for string empty / non-empty
[babeltrace.git] / tests / cli / test_help
index 3445269bd9ecb1259a21414eb874dc61129c2c48..dca6cfe58dc11f5cce127b8d47327c2dad191670 100755 (executable)
@@ -7,7 +7,7 @@
 
 SH_TAP=1
 
-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"
@@ -82,7 +82,7 @@ ok $? "help with unknown plugin name produces no output"
 bt_cli "${stdout}" "${stderr}" help src.ctf.bob
 isnt $? 0 "help with unknown component class name"
 
-grep --silent 'Cannot find component class: plugin-name="ctf", comp-cls-name="bob", comp-cls-type=1' "${stderr}"
+grep --silent 'Cannot find component class: plugin-name="ctf", comp-cls-name="bob", comp-cls-type=SOURCE' "${stderr}"
 ok $? "help with unknown component class name produces expected error"
 
 grep --silent 'Description: CTF input and output' "${stdout}"
This page took 0.03253 seconds and 4 git commands to generate.