Leo Okawa Ericson writes:
> +test_begin_subtest "notmuch-search-show-thread returns non-nil on success"
> +test_emacs_expect_t '(notmuch-search
> "id:20091117203301.gv3...@dottiness.seas.harvard.edu")
> + (when (notmuch-search-show-thread)
> + (error "Expected non-nil when successfully showing a
> thread"))
> + (when (notmuch-show-next-thread)
> + (error "Expected nil when there are no more threads"))
> + t'
> +
> +test_begin_subtest "notmuch-show-next-thread returns non-nil on success"
> +test_emacs_expect_t '(notmuch-search
> "id:20091117203301.gv3...@dottiness.seas.harvard.edu")
> + (when (notmuch-show-next-thread)
> + (error "Expected non-nil when successfully showing a
> thread"))
> + (when (notmuch-show-next-thread)
> + (error "Expected nil when there are no more threads"))
> + t)'
> +
- There are some whitespace issues that git complains about (space
before tab). That seems fixable with a judicious application of M-x
tabify. There is also an extra space after test_emacs_expect_t.
- The tests look like there there is some over enthusiastic copy
pasting, since both test both functions, which makes them duplicate
tests.
- Not sure why you need to throw errors here, can't you just return t or
nil?
- the logic of the "when" does not seem to match the string for the
error. Are you expecting the function calls to succeed or not?
d
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org