Skip to content

Commit

Permalink
fix #60. big bug: MATCH_ANY would ignore any surrounding required pat…
Browse files Browse the repository at this point in the history
…terns
  • Loading branch information
andreineculau committed Jan 19, 2018
1 parent 2bae5fe commit 9c5ba96
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/katt_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,7 @@ validate_primitive(Key, E, A, Callbacks) when is_list(E) ->
case re:run(E, RE_HAS_PARAMS, [global, {capture, all_but_first, list}]) of
nomatch when is_list(A) ->
{not_equal, {Key, E, A, TextDiffFun(E, A)}};
{match, [[?MATCH_ANY]]} ->
{pass, []};
{match, [[E]]} ->
{match, [[E]]} when E =/= ?MATCH_ANY ->
{pass, [{store_tag2param(E), A}]};
{match, Params0} when is_list(A) ->
Params = lists:map( fun([?MATCH_ANY]) ->
Expand Down

0 comments on commit 9c5ba96

Please sign in to comment.