blob 438f766f9184991a73a256763e453840f5483792 1469 bytes (raw)
name: test/T760-implicit-operators.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
| | #!/usr/bin/env bash
test_description='implicit operators in query parser'
. $(dirname "$0")/test-lib.sh || exit 1
test_prob_AND() {
add_message "[$1]=alpha@beta"
add_message "[$1]=beta@gamma"
test_begin_subtest "probabilistic field '$1:' implicitly joined by AND"
$2
notmuch count $1:alpha@beta > OUTPUT
notmuch count $1:alpha $1:beta >> OUTPUT
notmuch count $1:alpha@beta OR $1:beta@gamma >> OUTPUT
notmuch count $1:alpha@beta $1:beta@gamma >> OUTPUT
cat <<EOF > EXPECTED
1
1
2
0
EOF
test_expect_equal_file EXPECTED OUTPUT
}
test_regex_AND() {
test_begin_subtest "regex field '$1:' implicitly joined by AND"
$2
notmuch count $1:alpha@beta > OUTPUT
notmuch count $1:/alpha/ $1:/beta/ >> OUTPUT
notmuch count $1:alpha@beta OR $1:beta@gamma >> OUTPUT
notmuch count $1:alpha@beta $1:beta@gamma >> OUTPUT
cat <<EOF > EXPECTED
1
1
2
0
EOF
test_expect_equal_file EXPECTED OUTPUT
}
test_prob_AND from
test_prob_AND subject
test_prob_AND to
add_message "[id]=alpha@beta"
add_message "[id]=beta@gamma"
test_regex_AND mid
test_begin_subtest "'id:' implicitly joined by OR"
notmuch count id:alpha@beta > OUTPUT
notmuch count id:alpha@beta OR id:beta@gamma >> OUTPUT
notmuch count id:alpha@beta id:beta@gamma >> OUTPUT
cat <<EOF > EXPECTED
1
2
2
EOF
test_expect_equal_file EXPECTED OUTPUT
notmuch tag +alpha@beta id:alpha@beta
notmuch tag +beta@gamma id:beta@gamma
test_regex_AND tag
test_done
|
debug log:
solving 438f766f ...
found 438f766f in https://yhetil.org/notmuch/20190821114126.23540-4-david@tethera.net/
found 1a6ba61f in https://yhetil.org/notmuch/20190821114126.23540-3-david@tethera.net/
found b79673df in https://yhetil.org/notmuch/20190821114126.23540-2-david@tethera.net/
applying [1/3] https://yhetil.org/notmuch/20190821114126.23540-2-david@tethera.net/
diff --git a/test/T760-implicit-operators.sh b/test/T760-implicit-operators.sh
new file mode 100755
index 00000000..b79673df
applying [2/3] https://yhetil.org/notmuch/20190821114126.23540-3-david@tethera.net/
diff --git a/test/T760-implicit-operators.sh b/test/T760-implicit-operators.sh
index b79673df..1a6ba61f 100755
applying [3/3] https://yhetil.org/notmuch/20190821114126.23540-4-david@tethera.net/
diff --git a/test/T760-implicit-operators.sh b/test/T760-implicit-operators.sh
index 1a6ba61f..438f766f 100755
Checking patch test/T760-implicit-operators.sh...
Applied patch test/T760-implicit-operators.sh cleanly.
Checking patch test/T760-implicit-operators.sh...
Applied patch test/T760-implicit-operators.sh cleanly.
Checking patch test/T760-implicit-operators.sh...
Applied patch test/T760-implicit-operators.sh cleanly.
index at:
100755 438f766f9184991a73a256763e453840f5483792 test/T760-implicit-operators.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).