aboutsummaryrefslogtreecommitdiffstats
path: root/erts/test/z_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-10-27 12:27:33 +0200
committerBjörn Gustavsson <[email protected]>2011-10-27 12:27:33 +0200
commita971c9568ccebed4e8d00abf52faa59a2bcc1c18 (patch)
tree1a39c38bce2e27954ea772e80224069b41e5bcd9 /erts/test/z_SUITE.erl
parent86e4b23fb4a11f18834e6b1be76642fbd71b9cf7 (diff)
parent3e8720728abe875683ad54fa4d93ba83df609f57 (diff)
downloadotp-a971c9568ccebed4e8d00abf52faa59a2bcc1c18.tar.gz
otp-a971c9568ccebed4e8d00abf52faa59a2bcc1c18.tar.bz2
otp-a971c9568ccebed4e8d00abf52faa59a2bcc1c18.zip
Merge branch 'bjorn/eliminate-regexp-usage'
* bjorn/eliminate-regexp-usage: erl_tidy: Eliminate two references to 'regexp' in the documentation erts/z_SUITE: Eliminate use of deprecated regexp module erts/nt_SUITE: Eliminate use of deprecated regexp module erl_html_tools: Eliminate mention of deprecated regexp module erl_interface tests: Eliminate use of deprecated regexp module tools test suite: Eliminate compilation warnings for the eed module tools test suite: Eliminate use of deprecated regexp module xmerl test suite: Eliminate use of deprecated regexp module appmon: Eliminate use of deprecated regexp module tv: Eliminate use of deprecated regexp module gs: Eliminate use of deprecated regexp module inviso: Eliminate use of deprecated regexp module
Diffstat (limited to 'erts/test/z_SUITE.erl')
-rw-r--r--erts/test/z_SUITE.erl23
1 files changed, 10 insertions, 13 deletions
diff --git a/erts/test/z_SUITE.erl b/erts/test/z_SUITE.erl
index 8fceab32a6..482ecb8fba 100644
--- a/erts/test/z_SUITE.erl
+++ b/erts/test/z_SUITE.erl
@@ -166,9 +166,12 @@ core_search_conf(RunByTS, DBTop, XDir) ->
file_inspect(#core_search_conf{file = File}, Core) ->
FRes0 = os:cmd(File ++ " " ++ Core),
- FRes = case regexp:match(FRes0, Core) of
- {match, S, E} ->
+ FRes = case string:str(FRes0, Core) of
+ 0 ->
+ FRes0;
+ S ->
L = length(FRes0),
+ E = length(Core),
case S of
1 ->
lists:sublist(FRes0, E+1, L+1);
@@ -178,19 +181,13 @@ file_inspect(#core_search_conf{file = File}, Core) ->
" "
++
lists:sublist(FRes0, E+1, L+1)
- end;
- _ -> FRes0
+ end
end,
- case regexp:match(FRes, "[Tt][Ee][Xx][Tt]") of
+ case re:run(FRes, "text|ascii", [caseless,{capture,none}]) of
+ match ->
+ not_a_core;
nomatch ->
- case regexp:match(FRes, "[Aa][Ss][Cc][Ii][Ii]") of
- nomatch ->
- probably_a_core;
- _ ->
- not_a_core
- end;
- _ ->
- not_a_core
+ probably_a_core
end.
mk_readable(F) ->