2012-02-04 08:36:36 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2012-05-25 15:02:55 +02:00
|
|
|
test_description="emacs notmuch-show view"
|
2012-02-04 08:36:36 +01:00
|
|
|
. test-lib.sh
|
|
|
|
|
|
|
|
test_begin_subtest "Hiding Original Message region at beginning of a message"
|
|
|
|
message_id='OriginalMessageHiding.1@notmuchmail.org'
|
|
|
|
add_message \
|
|
|
|
[id]="$message_id" \
|
|
|
|
'[subject]="Hiding Original Message region at beginning of a message"' \
|
|
|
|
'[body]="-----Original Message-----
|
|
|
|
Text here."'
|
|
|
|
|
|
|
|
cat <<EOF >EXPECTED
|
|
|
|
Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
|
|
|
|
Subject: Hiding Original Message region at beginning of a message
|
|
|
|
To: Notmuch Test Suite <test_suite@notmuchmail.org>
|
|
|
|
Date: Fri, 05 Jan 2001 15:43:57 +0000
|
|
|
|
|
|
|
|
[ 2-line hidden original message. Click/Enter to show. ]
|
|
|
|
EOF
|
|
|
|
|
|
|
|
test_emacs "(notmuch-show \"id:$message_id\")
|
|
|
|
(test-visible-output)"
|
|
|
|
test_expect_equal_file OUTPUT EXPECTED
|
|
|
|
|
2012-06-05 17:42:50 +02:00
|
|
|
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"'
|
|
|
|
|
2012-02-04 08:36:36 +01:00
|
|
|
test_done
|