-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formatting fails with assertMatch
containing with
.
#98
Comments
Thank you for reporting this issue. However this is an expected behavior. There is a workaround by adding dummy macro definition in the same file as follows: -module(test).
-include_lib("eunit/include/eunit.hrl").
-ifdef(DUMMY_MACRO_FOR_EFMT).
-define(assertMatch(Pattern, Value), ok).
-endif.
match_test() ->
?assertMatch(Bin when is_binary(Bin), <<"hello">>). However, I think there is room for improvement in handling unknown macros. |
Thank you for your answer 😄 The workaround you gave us solved the problem. |
[FYI] Special handling for |
When trying to format by efmt in a module that describes a unit test,
The formatting fails if the evaluation expression for ?assertMatch contains a guard.
Successful patterns
Failure patterns
The text was updated successfully, but these errors were encountered: