X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/fa462ef71fbaf819397c59b2c07adf45a04af9f8..a30ef3465250ae21bb3928a6e120ba4351cf8ff0:/test/anno/test-anno diff --git a/test/anno/test-anno b/test/anno/test-anno index 34048d90..89204ccb 100755 --- a/test/anno/test-anno +++ b/test/anno/test-anno @@ -16,6 +16,25 @@ fi setup_test +check_exit '-eq 1' anno - +check_exit '-eq 1' anno -comp +check_exit '-eq 1' anno -comp foo -comp bar +check_exit '-eq 1' anno -text +check_exit '-eq 1' anno -text foo -text bar +check_exit '-eq 1' anno -number 0 +check_exit '-eq 1' anno -number -number +check_exit '-eq 1' anno + @ +check_exit '-eq 1' anno -draft 42 +check_exit '-eq 1' anno -draft -list "$actual" 2>&1 +#### Skip nmh intro text. +run_prog anno -help | sed '/^$/,$d' >"$actual" 2>&1 check "$expected" "$actual" # check -version @@ -122,7 +142,8 @@ check "$expected" "$actual" rm "${MH_TEST_DIR}/Mail/draft" # check -append -awk 'NR==6{print "Nmh-test:"}1' <"${MH_TEST_DIR}/Mail/inbox/1" >"$expected" +sed -e 's/\(Subject: Testing message 1\)/\1\ +Nmh-test:/' <"${MH_TEST_DIR}/Mail/inbox/1" >"$expected" run_prog anno 1 -component Nmh-test -append sed -e 's/^Nmh-test:.*/Nmh-test:/' "${MH_TEST_DIR}/Mail/inbox/1" >"$actual" check "$expected" "$actual"