summaryrefslogtreecommitdiff
path: root/test/rebar_test_utils.erl
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2017-11-16 22:14:48 -0500
committerGitHub <noreply@github.com>2017-11-16 22:14:48 -0500
commit94976d51db59d644ad540ffcacd52dd2c4d83398 (patch)
treebf055a7d2b472d7c59d59330c8691c1e3b6342b3 /test/rebar_test_utils.erl
parent9d050dd2bf014a2d7a2890d19ff2b396ed27a4f5 (diff)
parent2d5cd9c00cfa4e58066b48beee4057fdd52cc7be (diff)
Merge pull request #1660 from ferd/otp-21-preparedness
OTP-21 readiness, Full Unicode support
Diffstat (limited to 'test/rebar_test_utils.erl')
-rw-r--r--test/rebar_test_utils.erl8
1 files changed, 4 insertions, 4 deletions
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}.