tests: add and use bt_grep_ok
[babeltrace.git] / tests / cli / query / test-query.sh
index b5e023749820aadd0272a5d5aae4da9304f5d67c..ca9c001d6a530f26a3fa7b0d8871fda62848963a 100755 (executable)
@@ -58,11 +58,15 @@ expect_failure() {
 
        # Ensure that a CLI error stack is printed (and that babeltrace doesn't
        # abort before that).
-       bt_grep --silent "^ERROR: " "${stderr_file}"
-       ok $? "${test_name}: babeltrace produces an error stack"
-
-       bt_grep --silent "${expected_str}" "${stderr_file}"
-       ok "$?" "${test_name}: expect \`${expected_str}\` error message on stderr"
+       bt_grep_ok \
+               "^ERROR: " \
+               "${stderr_file}" \
+               "${test_name}: babeltrace produces an error stack"
+
+       bt_grep_ok \
+               "${expected_str}" \
+               "${stderr_file}" \
+               "${test_name}: expect \`${expected_str}\` error message on stderr"
 }
 
 expect_success 'the-object:{}' \
This page took 0.02722 seconds and 4 git commands to generate.