---
 test/T083-sexpr-count.sh | 85 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/test/T083-sexpr-count.sh b/test/T083-sexpr-count.sh
index e825ef3d..f3010d11 100755
--- a/test/T083-sexpr-count.sh
+++ b/test/T083-sexpr-count.sh
@@ -27,4 +27,89 @@ cat <<EOF >EXPECTED
 EOF
 test_expect_equal_file EXPECTED OUTPUT
 
+test_begin_subtest "from addresses with any count"
+notmuch address --query=sexp '(from (count 1 *))' | sort > OUTPUT
+cat <<EOF >EXPECTED
+Adrian Perez de Castro <[email protected]>
+Alex Botero-Lowry <[email protected]>
+Alexander Botero-Lowry <[email protected]>
+Aron Griffis <[email protected]>
+Carl Worth <[email protected]>
+Chris Wilson <[email protected]>
+François Boulogne <[email protected]>
+Ingmar Vanhassel <[email protected]>
+Israel Herraiz <[email protected]>
+Jan Janak <[email protected]>
+Jjgod Jiang <[email protected]>
+Keith Packard <[email protected]>
+Lars Kellogg-Stedman <[email protected]>
+Mikhail Gusarov <[email protected]>
+Olivier Berger <[email protected]>
+Rolland Santimano <[email protected]>
+Stewart Smith <[email protected]>
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "from addresses with unique words"
+notmuch address --query=sexp '(from (count 1))' | sort > OUTPUT
+cat <<EOF >EXPECTED
+Adrian Perez de Castro <[email protected]>
+Aron Griffis <[email protected]>
+Chris Wilson <[email protected]>
+François Boulogne <[email protected]>
+Ingmar Vanhassel <[email protected]>
+Israel Herraiz <[email protected]>
+Olivier Berger <[email protected]>
+Rolland Santimano <[email protected]>
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "from addresses with only non-unique words"
+notmuch address --query=sexp '(from (not (count 1)))' | sort > OUTPUT
+cat <<EOF >EXPECTED
+Alex Botero-Lowry <[email protected]>
+Alexander Botero-Lowry <[email protected]>
+Carl Worth <[email protected]>
+Jan Janak <[email protected]>
+Jjgod Jiang <[email protected]>
+Keith Packard <[email protected]>
+Lars Kellogg-Stedman <[email protected]>
+Mikhail Gusarov <[email protected]>
+Stewart Smith <[email protected]>
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "to addresses with any count"
+notmuch address --output=recipients --deduplicate=address --output=address \
+       --query=sexp '(to (count 1 *))' | sort >OUTPUT
+cat <<EOF >EXPECTED
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "to addresses with unique words"
+notmuch address --query=sexp --output=recipients --output=address '(to (count 
1))' | sort > OUTPUT
+cat <<EOF >EXPECTED
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
+test_begin_subtest "to addresses with only non-unique words"
+notmuch address --output=recipients --deduplicate=address --output=address \
+       --query=sexp '(to (not (count 1)))' | sort > OUTPUT
+cat <<EOF >EXPECTED
[email protected]
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
 test_done
-- 
2.39.1

_______________________________________________
notmuch mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to