Re: [PATCH 1/2] test: Add "test_expect_emacs_t" to assist with emacs testing.

Subject: Re: [PATCH 1/2] test: Add "test_expect_emacs_t" to assist with emacs testing.

Date: Mon, 16 Jan 2012 18:39:50 +0000

To: Dmitry Kurochkin

Cc: notmuch@notmuchmail.org

From: David Edmondson


On Mon, 16 Jan 2012 21:50:22 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> Isn't this function the same as something like "test_expect_equal $x
> t"?

Yes, except that it differs in how it reports differences.

> IMO the function seems too complex for what it does (and basically that
> is "compare $x with t").  Why do we need to implement it in such a way?
> 
> Also, the function has nothing to do with emacs (except for the fact
> that 't' is commonly used in it).
> 
> I think a more useful approach would be to add a function which takes a
> lisp expression, runs test_emacs and compares the result with "t" using
> test_expect_equal or similar.  This way you do not need to make an
> explicit test_emacs call and avoid code duplication when checking the
> result.  test_emacs_expect_t should be a good name for it.  What do you
> think?

Agreed. I'll do it.
part-000.sig (application/pgp-signature)

Thread: