aboutsummaryrefslogtreecommitdiff
path: root/test/T070-insert.sh
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2020-08-26 08:43:33 -0300
committerDavid Bremner <david@tethera.net>2021-02-06 19:17:34 -0400
commitf994f0e7df178eb31c656329bb28ffa832ac4364 (patch)
tree45f5c587b3369b8600d8ffff7cbadc0ef20aeaac /test/T070-insert.sh
parent66adcd4f538d426205fd09b0f97b63c74e9e82d7 (diff)
CLI/insert: convert to new config framework.
The new talloc context is needed to run the hook at the very end of the function. That in turn is needed so that this process gives up the write lock on the database.
Diffstat (limited to 'test/T070-insert.sh')
-rwxr-xr-xtest/T070-insert.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/T070-insert.sh b/test/T070-insert.sh
index 1c7ca846..7341810c 100755
--- a/test/T070-insert.sh
+++ b/test/T070-insert.sh
@@ -226,11 +226,13 @@ test_expect_code 1 "notmuch insert --folder=../G --create-folder < $gen_msg_file
OLDCONFIG=$(notmuch config get new.tags)
-test_begin_subtest "Empty tags in new.tags are forbidden"
+test_begin_subtest "Empty tags in new.tags are ignored"
notmuch config set new.tags "foo;;bar"
gen_insert_msg
-output=$(notmuch insert < $gen_msg_filename 2>&1)
-test_expect_equal "$output" "Error: tag '' in new.tags: empty tag forbidden"
+notmuch insert < $gen_msg_filename
+output=$(notmuch show --format=json id:$gen_msg_id)
+test_json_nodes <<<"$output" \
+ 'new_tags:[0][0][0]["tags"] = ["bar", "foo"]'
test_begin_subtest "Tags starting with '-' in new.tags are forbidden"
notmuch config set new.tags "-foo;bar"