mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 12:28:09 +01:00
test: add test for emacs notmuch-show-strip-re function
The function is used for stripping "re:" from subjects to generate "bare subjects". Include broken test for having "re:" in the middle of the subject.
This commit is contained in:
parent
a114ac8b77
commit
627f7b27f9
1 changed files with 13 additions and 0 deletions
|
@ -24,4 +24,17 @@ test_emacs "(notmuch-show \"id:$message_id\")
|
||||||
(test-visible-output)"
|
(test-visible-output)"
|
||||||
test_expect_equal_file OUTPUT EXPECTED
|
test_expect_equal_file OUTPUT EXPECTED
|
||||||
|
|
||||||
|
test_begin_subtest "Bare subject #1"
|
||||||
|
output=$(test_emacs '(notmuch-show-strip-re "Re: subject")')
|
||||||
|
test_expect_equal "$output" '"subject"'
|
||||||
|
|
||||||
|
test_begin_subtest "Bare subject #2"
|
||||||
|
output=$(test_emacs '(notmuch-show-strip-re "re:Re: re: Re: re:subject")')
|
||||||
|
test_expect_equal "$output" '"subject"'
|
||||||
|
|
||||||
|
test_begin_subtest "Bare subject #3"
|
||||||
|
test_subtest_known_broken
|
||||||
|
output=$(test_emacs '(notmuch-show-strip-re "the cure: fix the regexp")')
|
||||||
|
test_expect_equal "$output" '"the cure: fix the regexp"'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|
Loading…
Reference in a new issue