diff options
author | Siri Hansen <[email protected]> | 2017-07-06 16:59:47 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-09-15 17:07:50 +0200 |
commit | 09e2288b7a42345ea76e5e23ad93346c63efb06d (patch) | |
tree | 80a0814a8156544348979fcb26653fce01f6734c /lib/common_test/test_server/ts_lib.erl | |
parent | 532ab69fce9b7d1dc6974632ed8d17fdab68bd1a (diff) | |
download | otp-09e2288b7a42345ea76e5e23ad93346c63efb06d.tar.gz otp-09e2288b7a42345ea76e5e23ad93346c63efb06d.tar.bz2 otp-09e2288b7a42345ea76e5e23ad93346c63efb06d.zip |
common_test: Do not use deprecated functions in string(3)
Diffstat (limited to 'lib/common_test/test_server/ts_lib.erl')
-rw-r--r-- | lib/common_test/test_server/ts_lib.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/common_test/test_server/ts_lib.erl b/lib/common_test/test_server/ts_lib.erl index a7be740c5c..c9ed738ed0 100644 --- a/lib/common_test/test_server/ts_lib.erl +++ b/lib/common_test/test_server/ts_lib.erl @@ -99,7 +99,7 @@ specialized_specs(Dir,PostFix) -> sort_tests([begin DirPart = filename:dirname(Name), AppTest = hd(lists:reverse(filename:split(DirPart))), - list_to_atom(string:substr(AppTest, 1, length(AppTest)-5)) + list_to_atom(string:slice(AppTest, 0, string:length(AppTest)-5)) end || Name <- Specs]). specs(Dir) -> @@ -111,9 +111,9 @@ specs(Dir) -> [Spec,TestDir|_] = lists:reverse(filename:split(FullName)), [_TestSuffix|TDParts] = - lists:reverse(string:tokens(TestDir,[$_,$.])), + lists:reverse(string:lexemes(TestDir,[$_,$.])), [_SpecSuffix|SParts] = - lists:reverse(string:tokens(Spec,[$_,$.])), + lists:reverse(string:lexemes(Spec,[$_,$.])), if TDParts == SParts -> [filename_to_atom(FullName)]; true -> @@ -253,7 +253,7 @@ do_test(Rest, Vars, Test) -> get_arg([$(|Rest], Vars, Stop, _) -> get_arg(Rest, Vars, Stop, []); get_arg([Stop|Rest], Vars, Stop, Acc) -> - Arg = string:strip(lists:reverse(Acc)), + Arg = string:trim(lists:reverse(Acc),both,[$\s]), Subst = subst(Arg, Vars), {Subst,Rest}; get_arg([C|Rest], Vars, Stop, Acc) -> |