blob 15eb42d3e77ad0b86b192951855a42b877dc4191 2279 bytes (raw)
name: test/tagging # 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
| | #!/usr/bin/env bash
test_description='"notmuch tag"'
. ./test-lib.sh
add_message '[subject]=One'
add_message '[subject]=Two'
test_begin_subtest "Adding tags"
notmuch tag +tag1 +tag2 +tag3 \*
output=$(notmuch search \* | notmuch_search_sanitize)
test_expect_equal "$output" "\
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 tag2 tag3 unread)
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag2 tag3 unread)"
test_begin_subtest "Removing tags"
notmuch tag -tag1 -tag2 \*
output=$(notmuch search \* | notmuch_search_sanitize)
test_expect_equal "$output" "\
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag3 unread)
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag3 unread)"
test_expect_code 1 "No tag operations" 'notmuch tag One'
test_expect_code 1 "No query" 'notmuch tag +tag2'
test_begin_subtest "Redundant tagging"
notmuch tag +tag1 -tag3 One
notmuch tag +tag1 -tag3 \*
output=$(notmuch search \* | notmuch_search_sanitize)
test_expect_equal "$output" "\
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 unread)"
test_begin_subtest "Special characters in tags"
notmuch tag +':" ' \*
notmuch tag -':" ' Two
output=$(notmuch search \* | notmuch_search_sanitize)
test_expect_equal "$output" "\
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (:\" inbox tag1 unread)
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 unread)"
test_begin_subtest "Tagging order"
notmuch tag +tag4 -tag4 One
notmuch tag -tag4 +tag4 Two
output=$(notmuch search \* | notmuch_search_sanitize)
test_expect_equal "$output" "\
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (:\" inbox tag1 unread)
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag4 unread)"
test_begin_subtest "Batch stdin"
notmuch tag --stdin <<EOF
# %20 is a space in tag
T -:"%20 -tag1 +tag5 +tag6 -- One
T +tag1 -tag1 -tag4 +tag4 -- Two
T -tag6 One
T +tag5 Two
EOF
output=$(notmuch search \* | notmuch_search_sanitize)
test_expect_equal "$output" "\
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag5 unread)
thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag4 tag5 unread)"
test_done
|
debug log:
solving 15eb42d ...
found 15eb42d in https://yhetil.org/notmuch/ddf442a6462536a54dfd4491fa7bdb89dac20ce0.1333231401.git.jani@nikula.org/ ||
https://yhetil.org/notmuch/6b9468f37983a6f5a185fadda4b2c4cbe9815aea.1334404979.git.jani@nikula.org/
found e4782ed in https://yhetil.org/notmuch.git/
preparing index
index prepared:
100755 e4782ed490d70c536a6c4bfdf94397416fffaf77 test/tagging
applying [1/1] https://yhetil.org/notmuch/ddf442a6462536a54dfd4491fa7bdb89dac20ce0.1333231401.git.jani@nikula.org/
diff --git a/test/tagging b/test/tagging
index e4782ed..15eb42d 100755
Checking patch test/tagging...
Applied patch test/tagging cleanly.
skipping https://yhetil.org/notmuch/6b9468f37983a6f5a185fadda4b2c4cbe9815aea.1334404979.git.jani@nikula.org/ for 15eb42d
index at:
100755 15eb42d3e77ad0b86b192951855a42b877dc4191 test/tagging
(*) 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).