diff options
author | Björn Gustavsson <[email protected]> | 2017-10-05 13:10:42 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-10-13 11:55:47 +0200 |
commit | 20c2b1b174b44ed24afe73b3ac604e14d8c9318f (patch) | |
tree | 12de0b016a086e9bfc45ee498f201e36fe4c6e6f /erts/emulator/test/bif_SUITE.erl | |
parent | 0f2e313475bae2d3870333b0340e8453bbff51a5 (diff) | |
download | otp-20c2b1b174b44ed24afe73b3ac604e14d8c9318f.tar.gz otp-20c2b1b174b44ed24afe73b3ac604e14d8c9318f.tar.bz2 otp-20c2b1b174b44ed24afe73b3ac604e14d8c9318f.zip |
Eliminate use of deprecated functions in string
Diffstat (limited to 'erts/emulator/test/bif_SUITE.erl')
-rw-r--r-- | erts/emulator/test/bif_SUITE.erl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/erts/emulator/test/bif_SUITE.erl b/erts/emulator/test/bif_SUITE.erl index 04b7f2de15..146c37b118 100644 --- a/erts/emulator/test/bif_SUITE.erl +++ b/erts/emulator/test/bif_SUITE.erl @@ -731,10 +731,12 @@ erlang_halt(Config) when is_list(Config) -> [broken_halt, "Validate correct crash dump"]), {ok,_} = wait_until_stable_size(CrashDump,-1), {ok, Bin} = file:read_file(CrashDump), - case {string:str(binary_to_list(Bin),"\n=end\n"), - string:str(binary_to_list(Bin),"\r\n=end\r\n")} of - {0,0} -> ct:fail("Could not find end marker in crash dump"); - _ -> ok + case {string:find(Bin, <<"\n=end\n">>), + string:find(Bin, <<"\r\n=end\r\n">>)} of + {nomatch,nomatch} -> + ct:fail("Could not find end marker in crash dump"); + {_,_} -> + ok end. wait_until_stable_size(_File,-10) -> |