From: Jani Nikula Date: Sat, 1 Nov 2014 09:31:07 +0000 (+0200) Subject: test: add tests for --output=messages --duplicate=N X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=207f3bf82102f01fbbda193018e81a82f6c1259d;p=notmuch.git test: add tests for --output=messages --duplicate=N Basic smoke tests for the feature, nothing fancy. --- diff --git a/test/T090-search-output.sh b/test/T090-search-output.sh index 947d572e..fe2ec9af 100755 --- a/test/T090-search-output.sh +++ b/test/T090-search-output.sh @@ -122,6 +122,24 @@ id:1258471718-6781-1-git-send-email-dottedmag@dottedmag.net EOF test_expect_equal_file OUTPUT EXPECTED +test_begin_subtest "--output=messages --duplicate=1" +notmuch search --output=messages --duplicate=1 '*' >OUTPUT +# reuse same EXPECTED as above +test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "--output=messages --duplicate=2" +notmuch search --output=messages --duplicate=2 '*' >OUTPUT +cat <EXPECTED +id:20091117232137.GA7669@griffis1.net +EOF +test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "--output=messages --duplicate=3" +notmuch search --output=messages --duplicate=3 '*' >OUTPUT +cat <EXPECTED +EOF +test_expect_equal_file OUTPUT EXPECTED + test_begin_subtest "--output=messages --format=json" notmuch search --format=json --output=messages '*' >OUTPUT cat <EXPECTED @@ -180,6 +198,25 @@ cat <EXPECTED EOF test_expect_equal_file OUTPUT EXPECTED +test_begin_subtest "--output=messages --format=json --duplicate=1" +notmuch search --output=messages --format=json --duplicate=1 '*' >OUTPUT +# reuse same EXPECTED as above +test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "--output=messages --format=json --duplicate=2" +notmuch search --output=messages --format=json --duplicate=2 '*' >OUTPUT +cat <EXPECTED +["20091117232137.GA7669@griffis1.net"] +EOF +test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "--output=messages --format=json --duplicate=3" +notmuch search --output=messages --format=json --duplicate=3 '*' >OUTPUT +cat <EXPECTED +[] +EOF +test_expect_equal_file OUTPUT EXPECTED + test_begin_subtest "--output=files" notmuch search --output=files '*' | notmuch_search_files_sanitize | sort >OUTPUT cat <EXPECTED