mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
test: fix syntax errors in erroring calls to notmuch insert
notmuch insert does not currently support passing a filename for the input, so all of these tests have an extra error in addition to the one being tested for. Currently this does not make a difference because the error being tested for is caught before the error of an extra command line argument. In the future it might make a difference, and in any case it is confusing.
This commit is contained in:
parent
81b3909509
commit
85b5803869
1 changed files with 4 additions and 4 deletions
|
@ -222,24 +222,24 @@ test_expect_equal "$output" "2"
|
||||||
|
|
||||||
test_begin_subtest "Insert message, create invalid subfolder"
|
test_begin_subtest "Insert message, create invalid subfolder"
|
||||||
gen_insert_msg
|
gen_insert_msg
|
||||||
test_expect_code 1 "notmuch insert --folder=../G --create-folder $gen_msg_filename"
|
test_expect_code 1 "notmuch insert --folder=../G --create-folder < $gen_msg_filename"
|
||||||
|
|
||||||
OLDCONFIG=$(notmuch config get new.tags)
|
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 forbidden"
|
||||||
notmuch config set new.tags "foo;;bar"
|
notmuch config set new.tags "foo;;bar"
|
||||||
gen_insert_msg
|
gen_insert_msg
|
||||||
output=$(notmuch insert $gen_msg_filename 2>&1)
|
output=$(notmuch insert < $gen_msg_filename 2>&1)
|
||||||
test_expect_equal "$output" "Error: tag '' in new.tags: empty tag forbidden"
|
test_expect_equal "$output" "Error: tag '' in new.tags: empty tag forbidden"
|
||||||
|
|
||||||
test_begin_subtest "Tags starting with '-' in new.tags are forbidden"
|
test_begin_subtest "Tags starting with '-' in new.tags are forbidden"
|
||||||
notmuch config set new.tags "-foo;bar"
|
notmuch config set new.tags "-foo;bar"
|
||||||
gen_insert_msg
|
gen_insert_msg
|
||||||
output=$(notmuch insert $gen_msg_filename 2>&1)
|
output=$(notmuch insert < $gen_msg_filename 2>&1)
|
||||||
test_expect_equal "$output" "Error: tag '-foo' in new.tags: tag starting with '-' forbidden"
|
test_expect_equal "$output" "Error: tag '-foo' in new.tags: tag starting with '-' forbidden"
|
||||||
|
|
||||||
test_begin_subtest "Invalid tags set exit code"
|
test_begin_subtest "Invalid tags set exit code"
|
||||||
test_expect_code 1 "notmuch insert $gen_msg_filename 2>&1"
|
test_expect_code 1 "notmuch insert < $gen_msg_filename 2>&1"
|
||||||
|
|
||||||
notmuch config set new.tags $OLDCONFIG
|
notmuch config set new.tags $OLDCONFIG
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue