diff options
author | Jani Nikula <jani@nikula.org> | 2012-06-05 18:42:50 +0300 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2012-06-07 23:26:26 -0300 |
commit | 627f7b27f9756287795343cbb8a3137f74efccf9 (patch) | |
tree | f4ab41a7d85ed4d0d8278eb15d57e6563aa7ef6a | |
parent | a114ac8b77c683fafb350e3f3e07fdbbcf4edd3f (diff) |
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.
-rwxr-xr-x | test/emacs-show | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/emacs-show b/test/emacs-show index 2498564..1ddb28e 100755 --- a/test/emacs-show +++ b/test/emacs-show @@ -24,4 +24,17 @@ test_emacs "(notmuch-show \"id:$message_id\") (test-visible-output)" 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 |