tests: use -z / -n to test for string empty / non-empty
[babeltrace.git] / tests / cli / test_trace_copy
index 628812c6398bb39ee4d556ac69eee13699d9f8e5..e8c9b2c86210a391089953e89733a240ed341d34 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"
@@ -22,8 +22,8 @@ clean_tmp() {
 
 SUCCESS_TRACES=("${BT_CTF_TRACES_PATH}/succeed/"*)
 
-# -2 because there is an empty trace that we skip
-NUM_TESTS=$((${#SUCCESS_TRACES[@]} * 3 - 2))
+# -4 because there are two empty traces that we skip
+NUM_TESTS=$((${#SUCCESS_TRACES[@]} * 3 - 4))
 
 plan_tests $NUM_TESTS
 
This page took 0.023566 seconds and 4 git commands to generate.