X-Git-Url: http://rtime.felk.cvut.cz/gitweb/notmuch.git/blobdiff_plain/5f745ff12b807ca23078ea8d637bfec779f4c6b1..2c387c91570c181a8154e7791858f48dd1557054:/test/T090-search-output.sh?ds=sidebyside diff --git a/test/T090-search-output.sh b/test/T090-search-output.sh index 841a7219..5a9bbc90 100755 --- a/test/T090-search-output.sh +++ b/test/T090-search-output.sh @@ -433,6 +433,56 @@ cat <EXPECTED EOF test_expect_equal_file OUTPUT EXPECTED +test_begin_subtest "--output=sender --output=count" +notmuch search --output=sender --output=count '*' | sort -n >OUTPUT +cat <EXPECTED +1 Adrian Perez de Castro +1 Aron Griffis +1 Chris Wilson +1 François Boulogne +1 Ingmar Vanhassel +1 Israel Herraiz +1 Olivier Berger +1 Rolland Santimano +2 Alex Botero-Lowry +2 Jjgod Jiang +3 Stewart Smith +4 Alexander Botero-Lowry +4 Jan Janak +5 Lars Kellogg-Stedman +5 Mikhail Gusarov +7 Keith Packard +12 Carl Worth +EOF +test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "--output=sender --output=count --format=json" +# Since the iteration order of GHashTable is not specified, we +# preprocess and sort the results to keep the order stable here. +notmuch search --output=sender --output=count --format=json '*' | \ + sed -e 's/^\[//' -e 's/]$//' -e 's/,$//' | \ + sort --field-separator=":" --key=4n --key=2 >OUTPUT +cat <EXPECTED +{"name": "Adrian Perez de Castro", "address": "aperez@igalia.com", "count": 1} +{"name": "Aron Griffis", "address": "agriffis@n01se.net", "count": 1} +{"name": "Chris Wilson", "address": "chris@chris-wilson.co.uk", "count": 1} +{"name": "François Boulogne", "address": "boulogne.f@gmail.com", "count": 1} +{"name": "Ingmar Vanhassel", "address": "ingmar@exherbo.org", "count": 1} +{"name": "Israel Herraiz", "address": "isra@herraiz.org", "count": 1} +{"name": "Olivier Berger", "address": "olivier.berger@it-sudparis.eu", "count": 1} +{"name": "Rolland Santimano", "address": "rollandsantimano@yahoo.com", "count": 1} +{"name": "Alex Botero-Lowry", "address": "alex.boterolowry@gmail.com", "count": 2} +{"name": "Jjgod Jiang", "address": "gzjjgod@gmail.com", "count": 2} +{"name": "Stewart Smith", "address": "stewart@flamingspork.com", "count": 3} +{"name": "Alexander Botero-Lowry", "address": "alex.boterolowry@gmail.com", "count": 4} +{"name": "Jan Janak", "address": "jan@ryngle.com", "count": 4} +{"name": "Lars Kellogg-Stedman", "address": "lars@seas.harvard.edu", "count": 5} +{"name": "Mikhail Gusarov", "address": "dottedmag@dottedmag.net", "count": 5} +{"name": "Keith Packard", "address": "keithp@keithp.com", "count": 7} +{"name": "Carl Worth", "address": "cworth@cworth.org", "count": 12} +EOF +test_expect_equal_file OUTPUT EXPECTED + test_begin_subtest "--output=recipients" notmuch search --output=recipients '*' >OUTPUT cat <EXPECTED