diff options
author | Henrik Nord <[email protected]> | 2011-08-30 11:23:29 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2011-08-30 11:23:38 +0200 |
commit | 25543b7f0be1b87351d616143b5d149b1aed1cea (patch) | |
tree | d7438518433b32bf4c604a51a33fd5c9ede0cee8 /lib/eunit/src/eunit_server.erl | |
parent | 7879629d693df9d34e75d297d171eba0cc5dae5c (diff) | |
parent | e70a2fd034793729e10fdba707e7248270116768 (diff) | |
download | otp-25543b7f0be1b87351d616143b5d149b1aed1cea.tar.gz otp-25543b7f0be1b87351d616143b5d149b1aed1cea.tar.bz2 otp-25543b7f0be1b87351d616143b5d149b1aed1cea.zip |
Merge branch 'rc/eunit-2.2.0' into dev
* rc/eunit-2.2.0:
Updated to EUnit version 2.2.0
OTP-9505
Diffstat (limited to 'lib/eunit/src/eunit_server.erl')
-rw-r--r-- | lib/eunit/src/eunit_server.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/eunit/src/eunit_server.erl b/lib/eunit/src/eunit_server.erl index bf1bb9bcef..2cdfef2668 100644 --- a/lib/eunit/src/eunit_server.erl +++ b/lib/eunit/src/eunit_server.erl @@ -59,8 +59,9 @@ watch(Server, Module, Opts) when is_atom(Module) -> watch_path(Server, Path, Opts) -> command(Server, {watch, {path, filename:flatten(Path)}, Opts}). +%% note that the user must use $ at the end to match whole paths only watch_regexp(Server, Regex, Opts) -> - case regexp:parse(Regex) of + case re:compile(Regex,[anchored]) of {ok, R} -> command(Server, {watch, {regexp, R}, Opts}); {error, _}=Error -> @@ -278,8 +279,8 @@ is_watched(Path, St) -> match_any(sets:to_list(St#state.regexps), Path). match_any([R | Rs], Str) -> - case regexp:first_match(Str, R) of - {match, _, _} -> true; + case re:run(Str, R, [{capture,none}]) of + match -> true; _ -> match_any(Rs, Str) end; match_any([], _Str) -> false. |