test: Move a test from search to search-output, and add a similar json test
[notmuch] / test / search-output
index 1554eb1e93f32c7f84d461eec7687f7c43f8d220..8ba8acf741af29172e97c12a2cac2caa8a54d640 100755 (executable)
@@ -304,4 +304,16 @@ cat <<EOF >EXPECTED
 EOF
 test_expect_equal_file OUTPUT EXPECTED
 
+test_begin_subtest "notmuch search for non-existent message prints nothing"
+notmuch search "no-message-matches-this" > OUTPUT
+echo -n >EXPECTED
+test_expect_equal_file OUTPUT EXPECTED
+
+test_begin_subtest "notmuch search --format=json for non-existent message prints proper empty json"
+notmuch search --format=json "no-message-matches-this" > OUTPUT
+cat <<EOF >EXPECTED
+[]
+EOF
+test_expect_equal_file OUTPUT EXPECTED
+
 test_done