浏览代码

1394: refined export list and tests

pull/1395/head
Artem Pervin 8 年前
父节点
当前提交
c0184eae70
共有 2 个文件被更改,包括 9 次插入4 次删除
  1. +2
    -2
      src/rebar_utils.erl
  2. +7
    -2
      test/rebar_utils_SUITE.erl

+ 2
- 2
src/rebar_utils.erl 查看文件

@ -71,8 +71,8 @@
list_dir/1,
user_agent/0,
reread_config/1,
get_proxy_auth/0,
set_proxy_auth/1]).
get_proxy_auth/0]).
%% for internal use only
-export([otp_release/0]).

+ 7
- 2
test/rebar_utils_SUITE.erl 查看文件

@ -276,15 +276,20 @@ tup_merge(_Config) ->
).
proxy_auth(_Config) ->
Host = "host:",
Port = "1234",
application:unset_env(rebar, proxy_auth),
%% proxy auth not set
?assertEqual([], rebar_utils:get_proxy_auth()),
%% proxy auth with regular username/password
rebar_utils:set_proxy_auth("Username:Password"),
os:putenv("http_proxy", "http://Username:Password@" ++ Host ++ Port),
rebar_utils:set_httpc_options(),
?assertEqual([{proxy_auth, {"Username", "Password"}}],
rebar_utils:get_proxy_auth()),
%% proxy auth with username missing and url encoded password
rebar_utils:set_proxy_auth(":%3F!abc%23%24"),
os:putenv("http_proxy", "http://:%3F!abc%23%24@" ++ Host ++ Port),
rebar_utils:set_httpc_options(),
?assertEqual([{proxy_auth, {"", "?!abc#$"}}],
rebar_utils:get_proxy_auth()).

正在加载...
取消
保存