summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/rebar_ct_SUITE.erl2
-rw-r--r--test/rebar_dialyzer_SUITE.erl2
-rw-r--r--test/rebar_install_deps_SUITE.erl8
-rw-r--r--test/rebar_profiles_SUITE.erl2
-rw-r--r--test/rebar_test_utils.erl8
-rw-r--r--test/rebar_unlock_SUITE.erl4
6 files changed, 13 insertions, 13 deletions
diff --git a/test/rebar_ct_SUITE.erl b/test/rebar_ct_SUITE.erl
index f009930..d7094ec 100644
--- a/test/rebar_ct_SUITE.erl
+++ b/test/rebar_ct_SUITE.erl
@@ -1407,7 +1407,7 @@ testspec_at_root(Config) ->
CommandProvider = providers:get_provider(ct, Providers, Namespace),
GetOptSpec = providers:opts(CommandProvider),
- SpecArg1 = string:join([Spec1,Spec2,Spec3],","),
+ SpecArg1 = rebar_string:join([Spec1,Spec2,Spec3],","),
{ok, GetOptResult1} = getopt:parse(GetOptSpec, ["--spec",SpecArg1]),
State1 = rebar_state:command_parsed_args(State, GetOptResult1),
Tests1 = rebar_prv_common_test:prepare_tests(State1),
diff --git a/test/rebar_dialyzer_SUITE.erl b/test/rebar_dialyzer_SUITE.erl
index d0a3611..6579afb 100644
--- a/test/rebar_dialyzer_SUITE.erl
+++ b/test/rebar_dialyzer_SUITE.erl
@@ -362,6 +362,6 @@ get_apps_from_beam_files(BeamFiles) ->
lists:usort(
[begin
AppNameVsn = filename:basename(filename:dirname(filename:dirname(File))),
- [AppName | _] = string:tokens(AppNameVsn ++ "-", "-"),
+ [AppName | _] = rebar_string:lexemes(AppNameVsn ++ "-", "-"),
ec_cnv:to_atom(AppName)
end || File <- BeamFiles]).
diff --git a/test/rebar_install_deps_SUITE.erl b/test/rebar_install_deps_SUITE.erl
index 9ff28c7..3dbbf63 100644
--- a/test/rebar_install_deps_SUITE.erl
+++ b/test/rebar_install_deps_SUITE.erl
@@ -82,12 +82,12 @@ format_expected_mdeps(Deps) ->
lists:append([
case Dep of
{N,V} when hd(N) >= $a, hd(N) =< $z ->
- UN = string:to_upper(N),
+ UN = rebar_string:uppercase(N),
[{dep, UN, V}, {lock, pkg, UN, V}];
{N,V} when hd(N) >= $A, hd(N) =< $Z ->
[{dep, N, V}, {lock, src, N, V}];
N when hd(N) >= $a, hd(N) =< $z ->
- UN = string:to_upper(N),
+ UN = rebar_string:uppercase(N),
[{dep, UN}, {lock, pkg, UN, "0.0.0"}];
N when hd(N) >= $A, hd(N) =< $Z ->
[{dep, N}, {lock, src, N, "0.0.0"}]
@@ -95,9 +95,9 @@ format_expected_mdeps(Deps) ->
format_expected_mixed_warnings(Warnings) ->
[case W of
- {N, Vsn} when hd(N) >= $a, hd(N) =< $z -> {pkg, string:to_upper(N), Vsn};
+ {N, Vsn} when hd(N) >= $a, hd(N) =< $z -> {pkg, rebar_string:uppercase(N), Vsn};
{N, Vsn} when hd(N) >= $A, hd(N) =< $Z -> {git, N, Vsn};
- N when hd(N) >= $a, hd(N) =< $z -> {pkg, string:to_upper(N), "0.0.0"};
+ N when hd(N) >= $a, hd(N) =< $z -> {pkg, rebar_string:uppercase(N), "0.0.0"};
N when hd(N) >= $A, hd(N) =< $Z -> {git, N, "0.0.0"}
end || W <- Warnings].
diff --git a/test/rebar_profiles_SUITE.erl b/test/rebar_profiles_SUITE.erl
index 11aca6a..324a771 100644
--- a/test/rebar_profiles_SUITE.erl
+++ b/test/rebar_profiles_SUITE.erl
@@ -542,7 +542,7 @@ get_compiled_profile_erl_opts(Profiles, Config) ->
[default] ->
["compile"];
_ ->
- ["as", string:join(PStrs, ","), "compile"]
+ ["as", rebar_string:join(PStrs, ","), "compile"]
end,
{ok, State} = rebar_test_utils:run_and_check(
Config, RebarConfig, Command, {ok, [{app, Name}]}),
diff --git a/test/rebar_test_utils.erl b/test/rebar_test_utils.erl
index 0ccec56..c1e8b62 100644
--- a/test/rebar_test_utils.erl
+++ b/test/rebar_test_utils.erl
@@ -167,14 +167,14 @@ expand_deps(pkg, [{Name, Vsn, Deps} | Rest]) ->
[{Dep, expand_deps(pkg, Deps)} | expand_deps(pkg, Rest)];
expand_deps(mixed, [{Name, Deps} | Rest]) ->
Dep = if hd(Name) >= $a, hd(Name) =< $z ->
- {pkg, string:to_upper(Name), "0.0.0", undefined}
+ {pkg, rebar_string:uppercase(Name), "0.0.0", undefined}
; hd(Name) >= $A, hd(Name) =< $Z ->
{Name, ".*", {git, "https://example.org/user/"++Name++".git", "master"}}
end,
[{Dep, expand_deps(mixed, Deps)} | expand_deps(mixed, Rest)];
expand_deps(mixed, [{Name, Vsn, Deps} | Rest]) ->
Dep = if hd(Name) >= $a, hd(Name) =< $z ->
- {pkg, string:to_upper(Name), Vsn, undefined}
+ {pkg, rebar_string:uppercase(Name), Vsn, undefined}
; hd(Name) >= $A, hd(Name) =< $Z ->
{Name, Vsn, {git, "https://example.org/user/"++Name++".git", {tag, Vsn}}}
end,
@@ -477,7 +477,7 @@ package_app(AppDir, DestDir, PkgName) ->
{ok, Contents} = file:read_file(filename:join(DestDir, "contents.tar.gz")),
Blob = <<"3who cares", Contents/binary>>,
<<X:256/big-unsigned>> = crypto:hash(sha256, Blob),
- BinChecksum = list_to_binary(string:to_upper(lists:flatten(io_lib:format("~64.16.0b", [X])))),
+ BinChecksum = list_to_binary(rebar_string:uppercase(lists:flatten(io_lib:format("~64.16.0b", [X])))),
ok = file:write_file(filename:join(DestDir, "CHECKSUM"), BinChecksum),
PkgFiles = ["contents.tar.gz", "VERSION", "metadata.config", "CHECKSUM"],
Archive = filename:join(DestDir, Name),
@@ -485,5 +485,5 @@ package_app(AppDir, DestDir, PkgName) ->
lists:zip(PkgFiles, [filename:join(DestDir,F) || F <- PkgFiles])),
{ok, BinFull} = file:read_file(Archive),
<<E:128/big-unsigned-integer>> = crypto:hash(md5, BinFull),
- Etag = string:to_lower(lists:flatten(io_lib:format("~32.16.0b", [E]))),
+ Etag = rebar_string:lowercase(lists:flatten(io_lib:format("~32.16.0b", [E]))),
{BinChecksum, Etag}.
diff --git a/test/rebar_unlock_SUITE.erl b/test/rebar_unlock_SUITE.erl
index b2c0205..a8d1400 100644
--- a/test/rebar_unlock_SUITE.erl
+++ b/test/rebar_unlock_SUITE.erl
@@ -33,7 +33,7 @@ pkgunlock(Config) ->
rebar_test_utils:run_and_check(Config, [], ["unlock", "cf,certifi"], {ok, []}),
?assertEqual(Locks -- ["bbmustache","cf","certifi"], read_locks(Config)),
?assertEqual(Hashes -- ["bbmustache","cf","certifi"], read_hashes(Config)),
- rebar_test_utils:run_and_check(Config, [], ["unlock", string:join(Locks,",")], {ok, []}),
+ rebar_test_utils:run_and_check(Config, [], ["unlock", rebar_string:join(Locks,",")], {ok, []}),
?assertEqual({error, enoent}, read_locks(Config)),
?assertEqual({error, enoent}, read_hashes(Config)),
ok.
@@ -48,7 +48,7 @@ unlock(Config) ->
?assert(false =/= lists:keyfind(<<"itc">>, 1, rebar_state:get(State, {locks, default}))),
rebar_test_utils:run_and_check(Config, [], ["unlock", "gproc,itc"], {ok, []}),
?assertEqual(Locks -- ["uuid","gproc","itc"], read_locks(Config)),
- rebar_test_utils:run_and_check(Config, [], ["unlock", string:join(Locks,",")], {ok, []}),
+ rebar_test_utils:run_and_check(Config, [], ["unlock", rebar_string:join(Locks,",")], {ok, []}),
?assertEqual({error, enoent}, read_locks(Config)),
ok.