unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob 15c9f779bff1800c1289ffb16e460c2aed3890b2 2354 bytes (raw)
name: test/T095-search-filter-by.sh 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
 
#!/usr/bin/env bash
test_description='duplicite address filtering in "notmuch search --output=recipients"'
. ./test-lib.sh

add_message '[to]="John Doe <foo@example.com>, John Doe <bar@example.com>"'
add_message '[to]="\"Doe, John\" <foo@example.com>"' '[cc]="John Doe <Bar@Example.COM>"'
add_message '[to]="\"Doe, John\" <foo@example.com>"' '[bcc]="John Doe <Bar@Example.COM>"'

test_begin_subtest "--output=recipients"
notmuch search --output=recipients "*" >OUTPUT
cat <<EOF >EXPECTED
John Doe <foo@example.com>
John Doe <bar@example.com>
"Doe, John" <foo@example.com>
John Doe <Bar@Example.COM>
EOF
test_expect_equal_file OUTPUT EXPECTED

test_begin_subtest "--output=recipients --filter-by=nameaddr"
notmuch search --output=recipients --filter-by=nameaddr "*" >OUTPUT
# The same as above
cat <<EOF >EXPECTED
John Doe <foo@example.com>
John Doe <bar@example.com>
"Doe, John" <foo@example.com>
John Doe <Bar@Example.COM>
EOF
test_expect_equal_file OUTPUT EXPECTED

test_begin_subtest "--output=recipients --filter-by=name"
notmuch search --output=recipients --filter-by=name "*" >OUTPUT
cat <<EOF >EXPECTED
John Doe <foo@example.com>
"Doe, John" <foo@example.com>
EOF
test_expect_equal_file OUTPUT EXPECTED

test_begin_subtest "--output=recipients --filter-by=addr"
notmuch search --output=recipients --filter-by=addr "*" >OUTPUT
cat <<EOF >EXPECTED
John Doe <foo@example.com>
John Doe <bar@example.com>
John Doe <Bar@Example.COM>
EOF
test_expect_equal_file OUTPUT EXPECTED

test_begin_subtest "--output=recipients --filter-by=addrfold"
notmuch search --output=recipients --filter-by=addrfold "*" >OUTPUT
cat <<EOF >EXPECTED
John Doe <foo@example.com>
John Doe <bar@example.com>
EOF
test_expect_equal_file OUTPUT EXPECTED

test_begin_subtest "--output=recipients --filter-by=nameaddrfold"
notmuch search --output=recipients --filter-by=nameaddrfold "*" >OUTPUT
cat <<EOF >EXPECTED
John Doe <foo@example.com>
John Doe <bar@example.com>
"Doe, John" <foo@example.com>
EOF
test_expect_equal_file OUTPUT EXPECTED

test_begin_subtest "--output=recipients --filter-by=nameaddrfold --output=count"
notmuch search --output=recipients --filter-by=nameaddrfold --output=count "*" | sort -n >OUTPUT
cat <<EOF >EXPECTED
1	John Doe <foo@example.com>
2	"Doe, John" <foo@example.com>
3	John Doe <bar@example.com>
EOF
test_expect_equal_file OUTPUT EXPECTED

test_done

debug log:

solving 15c9f77 ...
found 15c9f77 in https://yhetil.org/notmuch/1414792441-29555-8-git-send-email-sojkam1@fel.cvut.cz/ ||
	https://yhetil.org/notmuch/1414792441-29555-1-git-send-email-sojkam1@fel.cvut.cz/

applying [1/1] https://yhetil.org/notmuch/1414792441-29555-8-git-send-email-sojkam1@fel.cvut.cz/
diff --git a/test/T095-search-filter-by.sh b/test/T095-search-filter-by.sh
new file mode 100755
index 0000000..15c9f77

Checking patch test/T095-search-filter-by.sh...
Applied patch test/T095-search-filter-by.sh cleanly.

skipping https://yhetil.org/notmuch/1414792441-29555-1-git-send-email-sojkam1@fel.cvut.cz/ for 15c9f77
index at:
100755 15c9f779bff1800c1289ffb16e460c2aed3890b2	test/T095-search-filter-by.sh

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).