emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: call for more ert tests


From: Leo Liu
Subject: Re: call for more ert tests
Date: Tue, 25 Jun 2013 09:21:28 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3)

On 2013-06-25 03:59 +0800, John Wiegley wrote:
> One thing that would help with that is to allow structural pattern matching.
> For example, say I have a function `foo` which returns a list '(a b c), but
> all I care about is that `b` is `b`.  Then I could write:
>
>     (shouldBe (foo) '(_ b _))
>
> `shouldBe` then raises an exception if the pattern fails to match.

Use pcase?

Leo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]