unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] test: Add "test_expect_emacs_t" to assist with emacs testing.
@ 2012-01-16 16:47 David Edmondson
  2012-01-16 16:47 ` [PATCH 2/2] test: Add tests for `notmuch-show-test-clean-address' David Edmondson
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: David Edmondson @ 2012-01-16 16:47 UTC (permalink / raw)
  To: notmuch

"test_expect_emacs_t" expects a single argument. If this is `t' then
the test passes. Otherwise the argument provides the details of the
test failure to be reported.
---

For use in the following set of tests and later for other emacs related tests.

 test/test-lib.sh |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index d1fbc05..0ffe9a6 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -503,6 +503,26 @@ test_expect_equal_file ()
     fi
 }
 
+# Pass test if the result is `t', else report the results.
+test_expect_emacs_t ()
+{
+	exec 1>&6 2>&7		# Restore stdout and stderr
+	inside_subtest=
+	test "$#" = 1 ||
+	error "bug in the test script: not 1 parameter to test_expect_emacs_t"
+
+	result="$1"
+	if ! test_skip "$test_subtest_name"
+	then
+		if [ "${result}" == "t" ] ; then
+			test_ok_ "$test_subtest_name"
+		else
+			testname=$this_test.$test_count
+			test_failure_ "$test_subtest_name" "$(eval printf ${result})"
+		fi
+    fi
+}
+
 NOTMUCH_NEW ()
 {
     notmuch new | grep -v -E -e '^Processed [0-9]*( total)? file|Found [0-9]* total file'
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [PATCH 0/2] improve `notmuch-show-clean-address'
@ 2012-01-25 11:45 David Edmondson
  2012-01-25 11:45 ` [PATCH 1/2] emacs: Avoid `mail-header-parse-address' in `notmuch-show-clean-address' David Edmondson
  0 siblings, 1 reply; 11+ messages in thread
From: David Edmondson @ 2012-01-25 11:45 UTC (permalink / raw)
  To: notmuch

Avoids warnings due to unicode characters and improves display.

David Edmondson (2):
  emacs: Avoid `mail-header-parse-address' in
    `notmuch-show-clean-address'.
  emacs: Another special case for `notmuch-show-clean-address'.

 emacs/notmuch-show.el          |   54 +++++++++++++++++++++++++++++----------
 test/emacs-address-cleaning.el |    6 +++-
 test/emacs-address-cleaning.sh |    1 -
 3 files changed, 44 insertions(+), 17 deletions(-)

-- 
1.7.8.3

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-01-25 13:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-16 16:47 [PATCH 1/2] test: Add "test_expect_emacs_t" to assist with emacs testing David Edmondson
2012-01-16 16:47 ` [PATCH 2/2] test: Add tests for `notmuch-show-test-clean-address' David Edmondson
2012-01-16 17:08   ` [PATCH 1/2] emacs: Avoid `mail-header-parse-address' in `notmuch-show-clean-address' David Edmondson
2012-01-16 17:08     ` [PATCH 2/2] emacs: Another special case for `notmuch-show-clean-address' David Edmondson
     [not found]   ` <87k44r8s0a.fsf@gmail.com>
2012-01-16 18:39     ` [PATCH 2/2] test: Add tests for `notmuch-show-test-clean-address' David Edmondson
2012-01-16 17:11 ` [PATCH 1/2] test: Add "test_expect_emacs_t" to assist with emacs testing David Edmondson
2012-01-16 17:50 ` Dmitry Kurochkin
2012-01-16 18:39   ` David Edmondson
  -- strict thread matches above, loose matches on Subject: below --
2012-01-25 11:45 [PATCH 0/2] improve `notmuch-show-clean-address' David Edmondson
2012-01-25 11:45 ` [PATCH 1/2] emacs: Avoid `mail-header-parse-address' in `notmuch-show-clean-address' David Edmondson
2012-01-25 12:51   ` Thomas Jost
2012-01-25 13:10     ` David Edmondson

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).