X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT070-insert.sh;h=e1e3b151565d2ebc6016b7f97cf63db24e5f7382;hb=e663231681b129befadd9f66cb064c104149fb16;hp=208deb1c210c68b4cbfaa0586c6320da94c7c20f;hpb=8dbd5deb8d3bbfda9554163c8d4cb2474c505c87;p=notmuch diff --git a/test/T070-insert.sh b/test/T070-insert.sh index 208deb1c..e1e3b151 100755 --- a/test/T070-insert.sh +++ b/test/T070-insert.sh @@ -234,6 +234,18 @@ output=$(notmuch show --format=json id:$gen_msg_id) test_json_nodes <<<"$output" \ 'new_tags:[0][0][0]["tags"] = ["bar", "foo"]' +test_begin_subtest "leading/trailing whitespace in new.tags is ignored" +# avoid complications with leading spaces and "notmuch config" +sed -i 's/^tags=.*$/tags= fu bar ; ; bar /' notmuch-config +gen_insert_msg +notmuch insert < $gen_msg_filename +notmuch dump id:$gen_msg_id | sed 's/ --.*$//' > OUTPUT +cat <EXPECTED +#notmuch-dump batch-tag:3 config,properties,tags ++bar +fu%20bar +EOF +test_expect_equal_file EXPECTED OUTPUT + test_begin_subtest "Tags starting with '-' in new.tags are forbidden" notmuch config set new.tags "-foo;bar" gen_insert_msg @@ -280,4 +292,9 @@ for code in OUT_OF_MEMORY XAPIAN_EXCEPTION ; do test_expect_code 0 "notmuch_with_shim shim-$code insert --keep < \"$gen_msg_filename\"" done +test_begin_subtest "insert converts mboxes on delivery" +notmuch insert +unmboxed < "${TEST_DIRECTORY}"/corpora/indexing/mbox-attachment.eml +output=$(notmuch count tag:unmboxed) +test_expect_equal "${output}" 1 + test_done