aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r--lib/stdlib/test/beam_lib_SUITE.erl2
-rw-r--r--lib/stdlib/test/c_SUITE.erl34
-rw-r--r--lib/stdlib/test/dets_SUITE.erl4
-rw-r--r--lib/stdlib/test/epp_SUITE.erl44
-rw-r--r--lib/stdlib/test/erl_expand_records_SUITE.erl2
-rw-r--r--lib/stdlib/test/erl_lint_SUITE.erl4
-rw-r--r--lib/stdlib/test/erl_pp_SUITE.erl4
-rw-r--r--lib/stdlib/test/error_logger_h_SUITE.erl8
-rw-r--r--lib/stdlib/test/escript_SUITE.erl38
-rw-r--r--lib/stdlib/test/ets_SUITE.erl30
-rw-r--r--lib/stdlib/test/ets_tough_SUITE.erl4
-rw-r--r--lib/stdlib/test/file_sorter_SUITE.erl2
-rw-r--r--lib/stdlib/test/filelib_SUITE.erl18
-rw-r--r--lib/stdlib/test/filename_SUITE.erl10
-rw-r--r--lib/stdlib/test/fixtable_SUITE.erl4
-rw-r--r--lib/stdlib/test/io_SUITE.erl2
-rw-r--r--lib/stdlib/test/io_proto_SUITE.erl20
-rw-r--r--lib/stdlib/test/log_mf_h_SUITE.erl2
-rw-r--r--lib/stdlib/test/ms_transform_SUITE.erl2
-rw-r--r--lib/stdlib/test/qlc_SUITE.erl6
-rw-r--r--lib/stdlib/test/re_SUITE.erl2
-rw-r--r--lib/stdlib/test/select_SUITE.erl4
-rw-r--r--lib/stdlib/test/shell_SUITE.erl34
-rw-r--r--lib/stdlib/test/supervisor_SUITE.erl2
-rw-r--r--lib/stdlib/test/sys_SUITE.erl2
-rw-r--r--lib/stdlib/test/tar_SUITE.erl38
-rw-r--r--lib/stdlib/test/zip_SUITE.erl40
27 files changed, 181 insertions, 181 deletions
diff --git a/lib/stdlib/test/beam_lib_SUITE.erl b/lib/stdlib/test/beam_lib_SUITE.erl
index bb56efb11e..bf6e30ec83 100644
--- a/lib/stdlib/test/beam_lib_SUITE.erl
+++ b/lib/stdlib/test/beam_lib_SUITE.erl
@@ -30,7 +30,7 @@
-else.
-include_lib("common_test/include/ct.hrl").
-define(format(S, A), ok).
--define(privdir, ?config(priv_dir, Conf)).
+-define(privdir, proplists:get_value(priv_dir, Conf)).
-endif.
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
diff --git a/lib/stdlib/test/c_SUITE.erl b/lib/stdlib/test/c_SUITE.erl
index c46434f599..266918581b 100644
--- a/lib/stdlib/test/c_SUITE.erl
+++ b/lib/stdlib/test/c_SUITE.erl
@@ -52,15 +52,15 @@ end_per_group(_GroupName, Config) ->
%% OTP-1209: Check that c:c/2 works also with option 'outdir'.
c_1(Config) when is_list(Config) ->
- R = filename:join(?config(data_dir, Config), "m.erl"),
- W = ?config(priv_dir, Config),
+ R = filename:join(proplists:get_value(data_dir, Config), "m.erl"),
+ W = proplists:get_value(priv_dir, Config),
Result = c(R,[{outdir,W}]),
{ok, m} = Result.
%% OTP-1209: Check that c:c/2 works also with option 'outdir'.
c_2(Config) when is_list(Config) ->
- R = filename:join(?config(data_dir, Config), "m"),
- W = ?config(priv_dir, Config),
+ R = filename:join(proplists:get_value(data_dir, Config), "m"),
+ W = proplists:get_value(priv_dir, Config),
Result = c(R,[{outdir,W}]),
{ok, m} = Result.
@@ -71,8 +71,8 @@ c_2(Config) when is_list(Config) ->
%% OTP-1209: Check that c:c/2 works also with option 'outdir'
%% (same as current directory).
c_3(Config) when is_list(Config) ->
- R = filename:join(?config(data_dir, Config), "m.erl"),
- W = ?config(priv_dir, Config),
+ R = filename:join(proplists:get_value(data_dir, Config), "m.erl"),
+ W = proplists:get_value(priv_dir, Config),
file:set_cwd(W),
Result = c(R,[{outdir,W}]),
{ok, m} = Result.
@@ -80,8 +80,8 @@ c_3(Config) when is_list(Config) ->
%% OTP-1209: Check that c:c/2 works also with option 'outdir'
%% (same as current directory).
c_4(Config) when is_list(Config) ->
- R = filename:join(?config(data_dir, Config), "m"),
- W = ?config(priv_dir, Config),
+ R = filename:join(proplists:get_value(data_dir, Config), "m"),
+ W = proplists:get_value(priv_dir, Config),
file:set_cwd(W),
Result = c(R,[{outdir,W}]),
{ok, m} = Result.
@@ -90,15 +90,15 @@ c_4(Config) when is_list(Config) ->
%% Check that c:nc/2 works also with option 'outdir'.
nc_1(Config) when is_list(Config) ->
- R = filename:join(?config(data_dir, Config), "m.erl"),
- W = ?config(priv_dir, Config),
+ R = filename:join(proplists:get_value(data_dir, Config), "m.erl"),
+ W = proplists:get_value(priv_dir, Config),
Result = nc(R,[{outdir,W}]),
{ok, m} = Result.
%% Check that c:nc/2 works also with option 'outdir'.
nc_2(Config) when is_list(Config) ->
- R = filename:join(?config(data_dir, Config), "m"),
- W = ?config(priv_dir, Config),
+ R = filename:join(proplists:get_value(data_dir, Config), "m"),
+ W = proplists:get_value(priv_dir, Config),
Result = nc(R,[{outdir,W}]),
{ok, m} = Result.
@@ -109,8 +109,8 @@ nc_2(Config) when is_list(Config) ->
%% Check that c:nc/2 works also with option 'outdir'
%% (same as current directory).
nc_3(Config) when is_list(Config) ->
- R = filename:join(?config(data_dir, Config), "m.erl"),
- W = ?config(priv_dir, Config),
+ R = filename:join(proplists:get_value(data_dir, Config), "m.erl"),
+ W = proplists:get_value(priv_dir, Config),
file:set_cwd(W),
Result = nc(R,[{outdir,W}]),
{ok, m} = Result.
@@ -118,14 +118,14 @@ nc_3(Config) when is_list(Config) ->
%% Check that c:nc/2 works also with option 'outdir'
%% (same as current directory).
nc_4(Config) when is_list(Config) ->
- R = filename:join(?config(data_dir, Config), "m"),
- W = ?config(priv_dir, Config),
+ R = filename:join(proplists:get_value(data_dir, Config), "m"),
+ W = proplists:get_value(priv_dir, Config),
file:set_cwd(W),
Result = nc(R,[{outdir,W}]),
{ok, m} = Result.
ls(Config) when is_list(Config) ->
- Directory = ?config(data_dir, Config),
+ Directory = proplists:get_value(data_dir, Config),
ok = c:ls(Directory),
File = filename:join(Directory, "m.erl"),
ok = c:ls(File),
diff --git a/lib/stdlib/test/dets_SUITE.erl b/lib/stdlib/test/dets_SUITE.erl
index 2b9ee8bbcc..8948f496c4 100644
--- a/lib/stdlib/test/dets_SUITE.erl
+++ b/lib/stdlib/test/dets_SUITE.erl
@@ -30,8 +30,8 @@
-else.
-include_lib("common_test/include/ct.hrl").
-define(format(S, A), ok).
--define(privdir(Conf), ?config(priv_dir, Conf)).
--define(datadir(Conf), ?config(data_dir, Conf)).
+-define(privdir(Conf), proplists:get_value(priv_dir, Conf)).
+-define(datadir(Conf), proplists:get_value(data_dir, Conf)).
-endif.
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
diff --git a/lib/stdlib/test/epp_SUITE.erl b/lib/stdlib/test/epp_SUITE.erl
index d18f99acf5..3e1aaef378 100644
--- a/lib/stdlib/test/epp_SUITE.erl
+++ b/lib/stdlib/test/epp_SUITE.erl
@@ -87,7 +87,7 @@ end_per_group(_GroupName, Config) ->
%% Recursive macros hang or crash epp (OTP-1398).
rec_1(Config) when is_list(Config) ->
- File = filename:join(?config(data_dir, Config), "mac.erl"),
+ File = filename:join(proplists:get_value(data_dir, Config), "mac.erl"),
{ok, List} = epp_parse_file(File, [], []),
%% we should encounter errors
{value, _} = lists:keysearch(error, 1, List),
@@ -95,7 +95,7 @@ rec_1(Config) when is_list(Config) ->
ok.
include_local(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
File = filename:join(DataDir, "include_local.erl"),
FooHrl = filename:join([DataDir,"include","foo.hrl"]),
BarHrl = filename:join([DataDir,"include","bar.hrl"]),
@@ -173,21 +173,21 @@ check_errors([_ | Rest]) ->
upcase_mac_1(Config) when is_list(Config) ->
- File = filename:join(?config(data_dir, Config), "mac2.erl"),
+ File = filename:join(proplists:get_value(data_dir, Config), "mac2.erl"),
{ok, List} = epp:parse_file(File, [], []),
[_, {attribute, _, plupp, Tuple} | _] = List,
Tuple = {1, 1, 3, 3},
ok.
upcase_mac_2(Config) when is_list(Config) ->
- File = filename:join(?config(data_dir, Config), "mac2.erl"),
+ File = filename:join(proplists:get_value(data_dir, Config), "mac2.erl"),
{ok, List} = epp:parse_file(File, [], [{p, 5}, {'P', 6}]),
[_, {attribute, _, plupp, Tuple} | _] = List,
Tuple = {5, 5, 6, 6},
ok.
predef_mac(Config) when is_list(Config) ->
- File = filename:join(?config(data_dir, Config), "mac3.erl"),
+ File = filename:join(proplists:get_value(data_dir, Config), "mac3.erl"),
{ok, List} = epp:parse_file(File, [], []),
[_,
{attribute, Anno, l, Line1},
@@ -202,7 +202,7 @@ predef_mac(Config) when is_list(Config) ->
ok.
variable_1(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
File = filename:join(DataDir, "variable_1.erl"),
true = os:putenv("VAR", DataDir),
%% variable_1.erl includes variable_1_include.hrl and
@@ -223,7 +223,7 @@ otp_4870(Config) when is_list(Config) ->
%% crashing erl_scan
otp_4871(Config) when is_list(Config) ->
- Dir = ?config(priv_dir, Config),
+ Dir = proplists:get_value(priv_dir, Config),
File = filename:join(Dir, "otp_4871.erl"),
ok = file:write_file(File, "-module(otp_4871)."),
%% Testing crash in erl_scan. Unfortunately there currently is
@@ -258,7 +258,7 @@ otp_4871_parse_file(Epp) ->
%% OTP-5362. The -file attribute is recognized.
otp_5362(Config) when is_list(Config) ->
- Dir = ?config(priv_dir, Config),
+ Dir = proplists:get_value(priv_dir, Config),
Copts = [return, strong_validation,{i,Dir}],
@@ -421,7 +421,7 @@ otp_5362(Config) when is_list(Config) ->
ok.
pmod(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
Pmod = filename:join(DataDir, "pmod.erl"),
case epp:parse_file([Pmod], [], []) of
{ok,Forms} ->
@@ -444,7 +444,7 @@ not_circular(Config) when is_list(Config) ->
%% Skip some bytes in the beginning of the file.
skip_header(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
File = filename:join([PrivDir, "epp_test_skip_header.erl"]),
ok = file:write_file(File,
<<"some bytes
@@ -482,7 +482,7 @@ otp_6277(Config) when is_list(Config) ->
%% OTP-7702. Wrong line number in stringifying macro expansion.
otp_7702(Config) when is_list(Config) ->
- Dir = ?config(priv_dir, Config),
+ Dir = proplists:get_value(priv_dir, Config),
File = filename:join(Dir, "file_7702.erl"),
Contents = <<"-module(file_7702).
@@ -787,7 +787,7 @@ otp_8130(Config) when is_list(Config) ->
],
[] = check(Config, Cks),
- Dir = ?config(priv_dir, Config),
+ Dir = proplists:get_value(priv_dir, Config),
File = filename:join(Dir, "otp_8130.erl"),
ok = file:write_file(File,
"-module(otp_8130).\n"
@@ -1117,7 +1117,7 @@ overload_mac(Config) when is_list(Config) ->
%% OTP-8388. More tests on overloaded macros.
otp_8388(Config) when is_list(Config) ->
- Dir = ?config(priv_dir, Config),
+ Dir = proplists:get_value(priv_dir, Config),
File = filename:join(Dir, "otp_8388.erl"),
ok = file:write_file(File, <<"-module(otp_8388)."
"-define(LINE, a).">>),
@@ -1164,7 +1164,7 @@ otp_8388(Config) when is_list(Config) ->
%% OTP-8470. Bugfix (one request - two replies).
otp_8470(Config) when is_list(Config) ->
- Dir = ?config(priv_dir, Config),
+ Dir = proplists:get_value(priv_dir, Config),
C = <<"-file(\"erl_parse.yrl\", 486).\n"
"-file(\"erl_parse.yrl\", 488).\n">>,
File = filename:join(Dir, "otp_8470.erl"),
@@ -1195,7 +1195,7 @@ otp_8911(Config) when is_list(Config) ->
end.
do_otp_8911(Config) ->
{ok, CWD} = file:get_cwd(),
- ok = file:set_cwd(?config(priv_dir, Config)),
+ ok = file:set_cwd(proplists:get_value(priv_dir, Config)),
File = "i.erl",
Cont = <<"-module(i).
@@ -1241,7 +1241,7 @@ otp_10302(Config) when is_list(Config) ->
{3,file_io_server,invalid_unicode}],[]}}
],
[] = compile(Config, Cs),
- Dir = ?config(priv_dir, Config),
+ Dir = proplists:get_value(priv_dir, Config),
File = filename:join(Dir, "otp_10302.erl"),
utf8 = encoding("coding: utf-8", File),
utf8 = encoding("coding: UTF-8", File),
@@ -1306,7 +1306,7 @@ encoding_nocom(Enc, File) ->
%% OTP-10820. Unicode filenames.
otp_10820(Config) when is_list(Config) ->
L = [915,953,959,973,957,953,954,959,957,964],
- Dir = ?config(priv_dir, Config),
+ Dir = proplists:get_value(priv_dir, Config),
File = filename:join(Dir, L++".erl"),
C1 = <<"%% coding: utf-8\n -module(any).">>,
ok = do_otp_10820(File, C1, "+pc latin1"),
@@ -1327,7 +1327,7 @@ do_otp_10820(File, C, PC) ->
%% OTP-11728. Bugfix circular macro.
otp_11728(Config) when is_list(Config) ->
- Dir = ?config(priv_dir, Config),
+ Dir = proplists:get_value(priv_dir, Config),
H = <<"-define(MACRO,[[]++?MACRO]).">>,
HrlFile = filename:join(Dir, "otp_11728.hrl"),
ok = file:write_file(HrlFile, H),
@@ -1349,7 +1349,7 @@ otp_11728(Config) when is_list(Config) ->
%% Check the new API for setting the default encoding.
encoding(Config) when is_list(Config) ->
- Dir = ?config(priv_dir, Config),
+ Dir = proplists:get_value(priv_dir, Config),
ErlFile = filename:join(Dir, "encoding.erl"),
%% Try a latin-1 file with no encoding given.
@@ -1527,7 +1527,7 @@ eval_tests(Config, Fun, Tests) ->
check_test(Config, Test) ->
Filename = "epp_test.erl",
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
File = filename:join(PrivDir, Filename),
ok = file:write_file(File, Test),
case epp:parse_file(File, [PrivDir], []) of
@@ -1542,7 +1542,7 @@ check_test(Config, Test) ->
compile_test(Config, Test0) ->
Test = [<<"-module(epp_test). -compile(export_all). ">>, Test0],
Filename = "epp_test.erl",
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
File = filename:join(PrivDir, Filename),
ok = file:write_file(File, Test),
Opts = [export_all,return,nowarn_unused_record,{outdir,PrivDir}],
@@ -1596,7 +1596,7 @@ unopaque_forms(Forms) ->
run_test(Config, Test0) ->
Test = [<<"-module(epp_test). -compile(export_all). ">>, Test0],
Filename = "epp_test.erl",
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
File = filename:join(PrivDir, Filename),
ok = file:write_file(File, Test),
Opts = [return, {i,PrivDir},{outdir,PrivDir}],
diff --git a/lib/stdlib/test/erl_expand_records_SUITE.erl b/lib/stdlib/test/erl_expand_records_SUITE.erl
index d88fa1e152..7fed7fce56 100644
--- a/lib/stdlib/test/erl_expand_records_SUITE.erl
+++ b/lib/stdlib/test/erl_expand_records_SUITE.erl
@@ -29,7 +29,7 @@
-define(t, test_server).
-else.
-include_lib("common_test/include/ct.hrl").
--define(privdir, ?config(priv_dir, Config)).
+-define(privdir, proplists:get_value(priv_dir, Config)).
-endif.
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
diff --git a/lib/stdlib/test/erl_lint_SUITE.erl b/lib/stdlib/test/erl_lint_SUITE.erl
index 5fd4574aa8..29a389d4b8 100644
--- a/lib/stdlib/test/erl_lint_SUITE.erl
+++ b/lib/stdlib/test/erl_lint_SUITE.erl
@@ -29,8 +29,8 @@
-define(t, test_server).
-else.
-include_lib("common_test/include/ct.hrl").
--define(datadir, ?config(data_dir, Conf)).
--define(privdir, ?config(priv_dir, Conf)).
+-define(datadir, proplists:get_value(data_dir, Conf)).
+-define(privdir, proplists:get_value(priv_dir, Conf)).
-endif.
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
diff --git a/lib/stdlib/test/erl_pp_SUITE.erl b/lib/stdlib/test/erl_pp_SUITE.erl
index 66ef34f48e..4d44f7686a 100644
--- a/lib/stdlib/test/erl_pp_SUITE.erl
+++ b/lib/stdlib/test/erl_pp_SUITE.erl
@@ -32,8 +32,8 @@
-define(t, test_server).
-else.
-include_lib("common_test/include/ct.hrl").
--define(datadir, ?config(data_dir, Config)).
--define(privdir, ?config(priv_dir, Config)).
+-define(datadir, proplists:get_value(data_dir, Config)).
+-define(privdir, proplists:get_value(priv_dir, Config)).
-endif.
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
diff --git a/lib/stdlib/test/error_logger_h_SUITE.erl b/lib/stdlib/test/error_logger_h_SUITE.erl
index eff35347e7..30811f3fb4 100644
--- a/lib/stdlib/test/error_logger_h_SUITE.erl
+++ b/lib/stdlib/test/error_logger_h_SUITE.erl
@@ -48,7 +48,7 @@ end_per_group(_GroupName, Config) ->
Config.
logfile(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
LogDir = filename:join(PrivDir, ?MODULE),
Log = filename:join(LogDir, "logfile.log"),
ok = filelib:ensure_dir(Log),
@@ -77,7 +77,7 @@ logfile(Config) ->
ok.
logfile_truncated(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
LogDir = filename:join(PrivDir, ?MODULE),
Log = filename:join(LogDir, "logfile_truncated.log"),
ok = filelib:ensure_dir(Log),
@@ -102,7 +102,7 @@ do_one_logfile(Log, Ev, Depth) ->
analyse_events(Log, Ev, [], Depth).
tty(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
LogDir = filename:join(PrivDir, ?MODULE),
Log = filename:join(LogDir, "tty.log"),
ok = filelib:ensure_dir(Log),
@@ -125,7 +125,7 @@ tty(Config) ->
ok.
tty_truncated(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
LogDir = filename:join(PrivDir, ?MODULE),
Log = filename:join(LogDir, "tty_truncated.log"),
ok = filelib:ensure_dir(Log),
diff --git a/lib/stdlib/test/escript_SUITE.erl b/lib/stdlib/test/escript_SUITE.erl
index 6c618b9814..30aaac70c2 100644
--- a/lib/stdlib/test/escript_SUITE.erl
+++ b/lib/stdlib/test/escript_SUITE.erl
@@ -78,7 +78,7 @@ end_per_testcase(_Case, _Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
basic(Config) when is_list(Config) ->
- Data = ?config(data_dir, Config),
+ Data = proplists:get_value(data_dir, Config),
Dir = filename:absname(Data), %Get rid of trailing slash.
run(Dir, "factorial 5",
<<"factorial 5 = 120\nExitCode:0">>),
@@ -95,7 +95,7 @@ basic(Config) when is_list(Config) ->
[data_dir,<<"factorial_warning:12: Warning: function bar/0 is unused\nExitCode:0">>]),
run_with_opts(Dir, "-c -s", "factorial_warning",
[data_dir,<<"factorial_warning:12: Warning: function bar/0 is unused\nExitCode:0">>]),
- run(Dir, "filesize "++filename:join(?config(data_dir, Config),"filesize"),
+ run(Dir, "filesize "++filename:join(proplists:get_value(data_dir, Config),"filesize"),
[data_dir,<<"filesize:11: Warning: function id/1 is unused\n324\nExitCode:0">>]),
run(Dir, "test_script_name",
[data_dir,<<"test_script_name\nExitCode:0">>]),
@@ -111,7 +111,7 @@ basic(Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
errors(Config) when is_list(Config) ->
- Data = ?config(data_dir, Config),
+ Data = proplists:get_value(data_dir, Config),
Dir = filename:absname(Data), %Get rid of trailing slash.
run(Dir, "compile_error",
[data_dir,<<"compile_error:5: syntax error before: '*'\n">>,
@@ -130,7 +130,7 @@ errors(Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
strange_name(Config) when is_list(Config) ->
- Data = ?config(data_dir, Config),
+ Data = proplists:get_value(data_dir, Config),
Dir = filename:absname(Data), %Get rid of trailing slash.
run(Dir, "strange.name -arg1 arg2 arg3",
[<<"main:[\"-arg1\",\"arg2\",\"arg3\"]\n"
@@ -140,7 +140,7 @@ strange_name(Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
emulator_flags(Config) when is_list(Config) ->
- Data = ?config(data_dir, Config),
+ Data = proplists:get_value(data_dir, Config),
Dir = filename:absname(Data), %Get rid of trailing slash.
run(Dir, "emulator_flags -arg1 arg2 arg3",
[<<"main:[\"-arg1\",\"arg2\",\"arg3\"]\n"
@@ -154,7 +154,7 @@ emulator_flags(Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
emulator_flags_no_shebang(Config) when is_list(Config) ->
- Data = ?config(data_dir, Config),
+ Data = proplists:get_value(data_dir, Config),
Dir = filename:absname(Data), %Get rid of trailing slash.
%% Need run_with_opts, to always use "escript" explicitly
run_with_opts(Dir, "", "emulator_flags_no_shebang -arg1 arg2 arg3",
@@ -172,14 +172,14 @@ emulator_flags_no_shebang(Config) when is_list(Config) ->
module_script(Config) when is_list(Config) ->
%% Read orig file
- Data = ?config(data_dir, Config),
+ Data = proplists:get_value(data_dir, Config),
OrigFile = filename:join([Data,"emulator_flags"]),
{ok, OrigBin} = file:read_file(OrigFile),
[Shebang, Mode, Flags | Source] = string:tokens(binary_to_list(OrigBin), "\n"),
{ok, OrigFI} = file:read_file_info(OrigFile),
%% Write source file
- Priv = ?config(priv_dir, Config),
+ Priv = proplists:get_value(priv_dir, Config),
Dir = filename:absname(Priv), % Get rid of trailing slash.
Base = "module_script",
ErlFile = filename:join([Priv, Base ++ ".erl"]),
@@ -274,14 +274,14 @@ module_script(Config) when is_list(Config) ->
%% Generate a new escript containing the beam code and the escript header
beam_script(Config) when is_list(Config) ->
%% Read orig file
- Data = ?config(data_dir, Config),
+ Data = proplists:get_value(data_dir, Config),
OrigFile = filename:join([Data,"emulator_flags"]),
{ok, OrigBin} = file:read_file(OrigFile),
[Shebang, Mode, Flags | Source] = string:tokens(binary_to_list(OrigBin), "\n"),
{ok, OrigFI} = file:read_file_info(OrigFile),
%% Write source file
- Priv = ?config(priv_dir, Config),
+ Priv = proplists:get_value(priv_dir, Config),
Dir = filename:absname(Priv), % Get rid of trailing slash.
Base = "beam_script",
ErlFile = filename:join([Priv, Base ++ ".erl"]),
@@ -380,8 +380,8 @@ beam_script(Config) when is_list(Config) ->
archive_script(Config) when is_list(Config) ->
%% Copy the orig files to priv_dir
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Archive = filename:join([PrivDir, "archive_script.zip"]),
{ok, _} = zip:create(Archive, ["archive_script"],
[{compress, []}, {cwd, DataDir}]),
@@ -507,8 +507,8 @@ archive_script(Config) when is_list(Config) ->
%%
archive_script_file_access(Config) when is_list(Config) ->
%% Copy the orig files to priv_dir
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
MainMod = "archive_script_file_access",
MainSrc = MainMod ++ ".erl",
@@ -651,7 +651,7 @@ compile_files([], _, _) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
epp(Config) when is_list(Config) ->
- Data = ?config(data_dir, Config),
+ Data = proplists:get_value(data_dir, Config),
Dir = filename:absname(Data), %Get rid of trailing slash.
run(Dir, "factorial_epp 5",
<<"factorial 5 = 120\nExitCode:0">>),
@@ -708,8 +708,8 @@ create_and_extract(Config) when is_list(Config) ->
prepare_creation(Base, Config) ->
%% Read the source
- PrivDir = ?config(priv_dir, Config),
- DataDir = ?config(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
OrigFile = filename:join([DataDir,"emulator_flags"]),
{ok, FileInfo} = file:read_file_info(OrigFile),
NewFile = filename:join([PrivDir, Base]),
@@ -908,7 +908,7 @@ emulate_escript_foldl(Fun, Acc, File) ->
end.
unicode(Config) when is_list(Config) ->
- Data = ?config(data_dir, Config),
+ Data = proplists:get_value(data_dir, Config),
Dir = filename:absname(Data), %Get rid of trailing slash.
run(Dir, "unicode1",
[<<"escript: exception error: an error occurred when evaluating"
@@ -927,7 +927,7 @@ unicode(Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
overflow(Config) when is_list(Config) ->
- Data = ?config(data_dir, Config),
+ Data = proplists:get_value(data_dir, Config),
Dir = filename:absname(Data), %Get rid of trailing slash.
run(Dir, "arg_overflow",
[<<"ExitCode:0">>]),
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index 96b268d3be..678c225d25 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -1226,8 +1226,8 @@ make_better_sub2() ->
%% Heavy random matching, comparing set with ordered_set.
match_heavy(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir,Config),
- DataDir = ?config(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir,Config),
+ DataDir = proplists:get_value(data_dir, Config),
%% Easier to have in process dictionary when manually
%% running the test function.
put(where_to_read,DataDir),
@@ -2361,7 +2361,7 @@ bad_table(Config) when is_list(Config) ->
%% Open and close disk_log to stabilize etsmem.
Name = make_ref(),
- File = filename:join([?config(priv_dir, Config),"bad_table.dummy"]),
+ File = filename:join([proplists:get_value(priv_dir, Config),"bad_table.dummy"]),
{ok, Name} = disk_log:open([{name, Name}, {file, File}]),
disk_log:close(Name),
file:delete(File),
@@ -3372,7 +3372,7 @@ vre_fix_tables(Tab) ->
verify_rescheduling_exit(Config, ForEachData, Flags, Fix, NOTabs, NOProcs) ->
NoFix = 5,
- TestCase = atom_to_list(?config(test_case, Config)),
+ TestCase = atom_to_list(proplists:get_value(test_case, Config)),
Parent = self(),
KillMe = make_ref(),
PFun =
@@ -3918,7 +3918,7 @@ dups_do(Opts) ->
%% Test the ets:tab2file function on an empty ets table.
tab2file(Config) when is_list(Config) ->
- FName = filename:join([?config(priv_dir, Config),"tab2file_case"]),
+ FName = filename:join([proplists:get_value(priv_dir, Config),"tab2file_case"]),
tab2file_do(FName, []),
tab2file_do(FName, [{sync,true}]),
tab2file_do(FName, [{sync,false}]),
@@ -3960,7 +3960,7 @@ tab2file2_do(Opts, Config) ->
EtsMem = etsmem(),
Tab = ets_new(ets_SUITE_foo_tab, [named_table, private,
{keypos, 2} | Opts]),
- FName = filename:join([?config(priv_dir, Config),"tab2file2_case"]),
+ FName = filename:join([proplists:get_value(priv_dir, Config),"tab2file2_case"]),
ok = fill_tab2(Tab, 0, 10000), % Fill up the table (grucho mucho!)
Len = length(ets:tab2list(Tab)),
Mem = ets:info(Tab, memory),
@@ -4018,8 +4018,8 @@ tabfile_ext1(Config) when is_list(Config) ->
repeat_for_opts(fun(Opts) -> tabfile_ext1_do(Opts, Config) end).
tabfile_ext1_do(Opts,Config) ->
- FName = filename:join([?config(priv_dir, Config),"nisse.dat"]),
- FName2 = filename:join([?config(priv_dir, Config),"countflip.dat"]),
+ FName = filename:join([proplists:get_value(priv_dir, Config),"nisse.dat"]),
+ FName2 = filename:join([proplists:get_value(priv_dir, Config),"countflip.dat"]),
L = lists:seq(1,10),
T = ets_new(x,Opts),
Name = make_ref(),
@@ -4056,8 +4056,8 @@ tabfile_ext2(Config) when is_list(Config) ->
repeat_for_opts(fun(Opts) -> tabfile_ext2_do(Opts,Config) end).
tabfile_ext2_do(Opts,Config) ->
- FName = filename:join([?config(priv_dir, Config),"olle.dat"]),
- FName2 = filename:join([?config(priv_dir, Config),"bitflip.dat"]),
+ FName = filename:join([proplists:get_value(priv_dir, Config),"olle.dat"]),
+ FName2 = filename:join([proplists:get_value(priv_dir, Config),"bitflip.dat"]),
L = lists:seq(1,10),
T = ets_new(x,Opts),
Name = make_ref(),
@@ -4090,8 +4090,8 @@ tabfile_ext2_do(Opts,Config) ->
%% Test verification of (named) tables without extended info.
tabfile_ext3(Config) when is_list(Config) ->
- FName = filename:join([?config(priv_dir, Config),"namn.dat"]),
- FName2 = filename:join([?config(priv_dir, Config),"ncountflip.dat"]),
+ FName = filename:join([proplists:get_value(priv_dir, Config),"namn.dat"]),
+ FName2 = filename:join([proplists:get_value(priv_dir, Config),"ncountflip.dat"]),
L = lists:seq(1,10),
Name = make_ref(),
?MODULE = ets_new(?MODULE,[named_table]),
@@ -4121,7 +4121,7 @@ tabfile_ext3(Config) when is_list(Config) ->
%% Tests verification of large table with md5 sum.
tabfile_ext4(Config) when is_list(Config) ->
- FName = filename:join([?config(priv_dir, Config),"bauta.dat"]),
+ FName = filename:join([proplists:get_value(priv_dir, Config),"bauta.dat"]),
LL = lists:seq(1,10000),
TL = ets_new(x,[]),
Name2 = make_ref(),
@@ -4160,7 +4160,7 @@ tabfile_ext4(Config) when is_list(Config) ->
%% Test that no disk_log is left open when file has been corrupted.
badfile(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir,Config),
+ PrivDir = proplists:get_value(priv_dir,Config),
File = filename:join(PrivDir, "badfile"),
_ = file:delete(File),
T = ets:new(table, []),
@@ -4747,7 +4747,7 @@ successive_delete(Table,From,To,Type,TType) ->
successive_delete(Table, Next, To, Type,TType).
gen_dets_filename(Config,N) ->
- filename:join(?config(priv_dir,Config),
+ filename:join(proplists:get_value(priv_dir,Config),
"testdets_" ++ integer_to_list(N) ++ ".dets").
otp_6842_select_1000(Config) when is_list(Config) ->
diff --git a/lib/stdlib/test/ets_tough_SUITE.erl b/lib/stdlib/test/ets_tough_SUITE.erl
index 1cdaaed0f0..c83c17217b 100644
--- a/lib/stdlib/test/ets_tough_SUITE.erl
+++ b/lib/stdlib/test/ets_tough_SUITE.erl
@@ -78,7 +78,7 @@ ex1(Config) when is_list(Config) ->
ex1_sub(Config) ->
{A,B} = prep(Config),
N =
- case ?config(ets_tough_SUITE_iters,Config) of
+ case proplists:get_value(ets_tough_SUITE_iters,Config) of
undefined ->
5000;
Other ->
@@ -93,7 +93,7 @@ ex1_sub(Config) ->
prep(Config) ->
rand:seed(exsplus),
put(dump_ticket,none),
- DumpDir = filename:join(?config(priv_dir,Config), "ets_tough"),
+ DumpDir = filename:join(proplists:get_value(priv_dir,Config), "ets_tough"),
file:make_dir(DumpDir),
put(dump_dir,DumpDir),
process_flag(trap_exit,true),
diff --git a/lib/stdlib/test/file_sorter_SUITE.erl b/lib/stdlib/test/file_sorter_SUITE.erl
index 2e7499c058..379f4d609b 100644
--- a/lib/stdlib/test/file_sorter_SUITE.erl
+++ b/lib/stdlib/test/file_sorter_SUITE.erl
@@ -30,7 +30,7 @@
-else.
-include_lib("common_test/include/ct.hrl").
-define(format(S, A), ok).
--define(privdir(Conf), ?config(priv_dir, Conf)).
+-define(privdir(Conf), proplists:get_value(priv_dir, Conf)).
-endif.
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
diff --git a/lib/stdlib/test/filelib_SUITE.erl b/lib/stdlib/test/filelib_SUITE.erl
index 5b28c03270..16616a3207 100644
--- a/lib/stdlib/test/filelib_SUITE.erl
+++ b/lib/stdlib/test/filelib_SUITE.erl
@@ -65,7 +65,7 @@ end_per_group(_GroupName, Config) ->
wildcard_one(Config) when is_list(Config) ->
{ok,OldCwd} = file:get_cwd(),
- Dir = filename:join(?config(priv_dir, Config), "wildcard_one"),
+ Dir = filename:join(proplists:get_value(priv_dir, Config), "wildcard_one"),
ok = file:make_dir(Dir),
do_wildcard_1(Dir,
fun(Wc) ->
@@ -85,7 +85,7 @@ wildcard_one(Config) when is_list(Config) ->
ok.
wildcard_two(Config) when is_list(Config) ->
- Dir = filename:join(?config(priv_dir, Config), "wildcard_two"),
+ Dir = filename:join(proplists:get_value(priv_dir, Config), "wildcard_two"),
ok = file:make_dir(Dir),
do_wildcard_1(Dir, fun(Wc) -> io:format("~p~n",[{Wc,Dir, X = filelib:wildcard(Wc, Dir)}]),X end),
do_wildcard_1(Dir, fun(Wc) -> filelib:wildcard(Wc, Dir++"/") end),
@@ -270,7 +270,7 @@ do_wildcard_9(Dir, Wcf) ->
fold_files(Config) when is_list(Config) ->
- Dir = filename:join(?config(priv_dir, Config), "fold_files"),
+ Dir = filename:join(proplists:get_value(priv_dir, Config), "fold_files"),
ok = file:make_dir(Dir),
Dirs = [filename:join(Dir, D) || D <- ["blurf","blurf/blarf"]],
foreach(fun(D) -> ok = file:make_dir(D) end, Dirs),
@@ -329,7 +329,7 @@ del([]) -> ok.
%% Test that filelib:ensure_dir/1 returns ok or {error,Reason}.
otp_5960(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Dir = filename:join(PrivDir, "otp_5960_dir"),
Name1 = filename:join(Dir, name1),
Name2 = filename:join(Dir, name2),
@@ -354,7 +354,7 @@ otp_5960(Config) when is_list(Config) ->
end.
ensure_dir_eexist(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Dir = filename:join(PrivDir, "ensure_dir_eexist"),
Name = filename:join(Dir, "same_name_as_file_and_dir"),
ok = filelib:ensure_dir(Name),
@@ -369,7 +369,7 @@ ensure_dir_eexist(Config) when is_list(Config) ->
ok.
ensure_dir_symlink(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Dir = filename:join(PrivDir, "ensure_dir_symlink"),
Name = filename:join(Dir, "same_name_as_file_and_dir"),
ok = filelib:ensure_dir(Name),
@@ -388,7 +388,7 @@ ensure_dir_symlink(Config) when is_list(Config) ->
end.
wildcard_symlink(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Dir = filename:join(PrivDir, ?MODULE_STRING++"_wildcard_symlink"),
SubDir = filename:join(Dir, "sub"),
AFile = filename:join(SubDir, "a_file"),
@@ -448,7 +448,7 @@ basenames(Dir, Files) ->
end || F <- Files].
is_file_symlink(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Dir = filename:join(PrivDir, ?MODULE_STRING++"_is_file_symlink"),
SubDir = filename:join(Dir, "sub"),
AFile = filename:join(SubDir, "a_file"),
@@ -481,7 +481,7 @@ is_file_symlink(Config) ->
end.
file_props_symlink(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Dir = filename:join(PrivDir, ?MODULE_STRING++"_file_props_symlink"),
AFile = filename:join(Dir, "a_file"),
Alias = filename:join(Dir, "symlink"),
diff --git a/lib/stdlib/test/filename_SUITE.erl b/lib/stdlib/test/filename_SUITE.erl
index 9dc147bee9..3d6734b790 100644
--- a/lib/stdlib/test/filename_SUITE.erl
+++ b/lib/stdlib/test/filename_SUITE.erl
@@ -72,7 +72,7 @@ end_per_group(_GroupName, Config) ->
absname(Config) when is_list(Config) ->
case os:type() of
{win32, _} ->
- [Drive|_] = ?config(priv_dir, Config),
+ [Drive|_] = proplists:get_value(priv_dir, Config),
Temp = filename:join([Drive|":/"], "temp"),
case file:make_dir(Temp) of
ok -> ok;
@@ -132,7 +132,7 @@ absname(Config) when is_list(Config) ->
absname_2(Config) when is_list(Config) ->
case os:type() of
{win32, _} ->
- [Drive|_] = ?config(priv_dir, Config),
+ [Drive|_] = proplists:get_value(priv_dir, Config),
[Drive|":/temp/foo"] = filename:absname(foo, [Drive|":/temp"]),
[Drive|":/temp/foo"] = filename:absname("foo", [Drive|":/temp"]),
[Drive|":/temp/../ebin"] = filename:absname("../ebin",
@@ -429,7 +429,7 @@ find_src(Config) when is_list(Config) ->
%% Make sure that find_src works for a slim BEAM file.
OldPath = code:get_path(),
try
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
code:add_patha(PrivDir),
Src = "simple",
SrcPath = filename:join(PrivDir, Src) ++ ".erl",
@@ -452,7 +452,7 @@ find_src(Config) when is_list(Config) ->
absname_bin(Config) when is_list(Config) ->
case os:type() of
{win32, _} ->
- [Drive|_] = ?config(priv_dir, Config),
+ [Drive|_] = proplists:get_value(priv_dir, Config),
Temp = filename:join([Drive|":/"], "temp"),
case file:make_dir(Temp) of
ok -> ok;
@@ -504,7 +504,7 @@ absname_bin(Config) when is_list(Config) ->
absname_bin_2(Config) when is_list(Config) ->
case os:type() of
{win32, _} ->
- [Drive|_] = ?config(priv_dir, Config),
+ [Drive|_] = proplists:get_value(priv_dir, Config),
<<Drive:8,":/temp/foo">> = filename:absname(<<"foo">>, <<Drive:8,":/temp">>),
<<Drive:8,":/temp/../ebin">> = filename:absname(<<"../ebin">>,
<<Drive:8,":/temp">>),
diff --git a/lib/stdlib/test/fixtable_SUITE.erl b/lib/stdlib/test/fixtable_SUITE.erl
index d681349fcd..de100a11d6 100644
--- a/lib/stdlib/test/fixtable_SUITE.erl
+++ b/lib/stdlib/test/fixtable_SUITE.erl
@@ -70,7 +70,7 @@ end_per_group(_GroupName, Config) ->
-define(HELPER_NODE, (atom_to_list(?MODULE) ++ "_helper1")).
init_per_testcase(_Func, Config) ->
- PrivDir = ?config(priv_dir,Config),
+ PrivDir = proplists:get_value(priv_dir,Config),
file:make_dir(PrivDir),
Config.
@@ -370,7 +370,7 @@ multiple_processes(Tab, Mod) ->
dets_filename(Base, Config) when is_atom(Base) ->
dets_filename(atom_to_list(Base) ++ ".dat", Config);
dets_filename(Basename, Config) ->
- PrivDir = ?config(priv_dir,Config),
+ PrivDir = proplists:get_value(priv_dir,Config),
filename:join(PrivDir, Basename).
command_loop() ->
diff --git a/lib/stdlib/test/io_SUITE.erl b/lib/stdlib/test/io_SUITE.erl
index 17c2488b5b..ddc55b1466 100644
--- a/lib/stdlib/test/io_SUITE.erl
+++ b/lib/stdlib/test/io_SUITE.erl
@@ -48,7 +48,7 @@
-else.
-include_lib("common_test/include/ct.hrl").
-define(format(S, A), ok).
--define(privdir(Conf), ?config(priv_dir, Conf)).
+-define(privdir(Conf), proplists:get_value(priv_dir, Conf)).
-endif.
init_per_testcase(_Case, Config) ->
diff --git a/lib/stdlib/test/io_proto_SUITE.erl b/lib/stdlib/test/io_proto_SUITE.erl
index 6c0e4241a9..ecd0d44db9 100644
--- a/lib/stdlib/test/io_proto_SUITE.erl
+++ b/lib/stdlib/test/io_proto_SUITE.erl
@@ -48,7 +48,7 @@
-define(privdir(_), "./io_SUITE_priv").
-else.
-include_lib("common_test/include/ct.hrl").
--define(privdir(Conf), ?config(priv_dir, Conf)).
+-define(privdir(Conf), proplists:get_value(priv_dir, Conf)).
-endif.
%%-define(debug, true).
@@ -69,7 +69,7 @@ init_per_testcase(_Case, Config) ->
os:putenv("TERM","vt100"),
[{term, Term} | Config].
end_per_testcase(_Case, Config) ->
- Term = ?config(term,Config),
+ Term = proplists:get_value(term,Config),
os:putenv("TERM",Term),
ok.
@@ -152,7 +152,7 @@ unicode_prompt(Config) when is_list(Config) ->
%% Check io:setopts and io:getopts functions.
setopts_getopts(Config) when is_list(Config) ->
- FileName = filename:join([?config(priv_dir,Config),
+ FileName = filename:join([proplists:get_value(priv_dir,Config),
"io_proto_SUITE_setopts_getopts.dat"]),
{ok,WFile} = file:open(FileName,[write]),
Server = start_io_server_proxy(),
@@ -272,8 +272,8 @@ get_lc_ctype() ->
%% Test various unicode options.
unicode_options(Config) when is_list(Config) ->
- DataDir = ?config(data_dir,Config),
- PrivDir = ?config(priv_dir,Config),
+ DataDir = proplists:get_value(data_dir,Config),
+ PrivDir = proplists:get_value(priv_dir,Config),
%% A string in both russian and greek characters, which is present
%% in all the internal test files (but in different formats of course)...
TestData = [1090,1093,1077,32,1073,1080,1075,32,
@@ -463,7 +463,7 @@ unicode_options(Config) when is_list(Config) ->
%% Tests various unicode options on random generated files.
unicode_options_gen(Config) when is_list(Config) ->
random:seed(1240, 900586, 553728),
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
AllModes = [utf8,utf16,{utf16,big},{utf16,little},
utf32,{utf32,big},{utf32,little}],
FSize = 9*1024,
@@ -659,8 +659,8 @@ random_unicode(N) ->
%% Test variants with binary option.
binary_options(Config) when is_list(Config) ->
- DataDir = ?config(data_dir,Config),
- PrivDir = ?config(priv_dir,Config),
+ DataDir = proplists:get_value(data_dir,Config),
+ PrivDir = proplists:get_value(priv_dir,Config),
TestData = unicode:characters_to_binary(
[1090,1093,1077,32,1073,1080,1075,32,
1088,1077,1076,32,1092,1086,1100,32,1093,
@@ -754,7 +754,7 @@ bc_with_r12_1(Config) ->
N1 = list_to_atom(atom_to_list(Name1) ++ "@" ++ hostname()),
test_server:start_node(Name1, peer, [{args, "-pz \""++PA++"\""},
{erl,[{release,"r12b"}]}]),
- DataDir = ?config(data_dir,Config),
+ DataDir = proplists:get_value(data_dir,Config),
FileName1 = filename:join([DataDir,"testdata_latin1.dat"]),
TestDataLine1 = [229,228,246],
TestDataLine2 = [197,196,214],
@@ -1244,7 +1244,7 @@ read_modes_gl_1(_Config,Machine) ->
%% Test behaviour when reading broken Unicode files
broken_unicode(Config) when is_list(Config) ->
- Dir = ?config(priv_dir,Config),
+ Dir = proplists:get_value(priv_dir,Config),
Latin1Name = filename:join([Dir,"latin1_data_file.dat"]),
Utf8Name = filename:join([Dir,"utf8_data_file.dat"]),
Latin1Data = iolist_to_binary(lists:duplicate(10,lists:seq(0,255)++[255,255,255])),
diff --git a/lib/stdlib/test/log_mf_h_SUITE.erl b/lib/stdlib/test/log_mf_h_SUITE.erl
index 6d45d5f0cd..9b543aa37c 100644
--- a/lib/stdlib/test/log_mf_h_SUITE.erl
+++ b/lib/stdlib/test/log_mf_h_SUITE.erl
@@ -54,7 +54,7 @@ end_per_group(_GroupName, Config) ->
test(Config) when is_list(Config) ->
{ok, Pid} = gen_event:start_link(),
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Log1 = PrivDir ++ "/log1",
ok = file:make_dir(Log1),
Args1 = log_mf_h:init(Log1, 500, 3),
diff --git a/lib/stdlib/test/ms_transform_SUITE.erl b/lib/stdlib/test/ms_transform_SUITE.erl
index 39dbc42546..a8bd90de84 100644
--- a/lib/stdlib/test/ms_transform_SUITE.erl
+++ b/lib/stdlib/test/ms_transform_SUITE.erl
@@ -782,7 +782,7 @@ temp_name() ->
Conf = get(mts_config),
C = get(mts_tf_counter),
put(mts_tf_counter,C+1),
- filename:join([?config(priv_dir,Conf),
+ filename:join([proplists:get_value(priv_dir,Conf),
"tempfile"++integer_to_list(C)++".tmp"]).
diff --git a/lib/stdlib/test/qlc_SUITE.erl b/lib/stdlib/test/qlc_SUITE.erl
index 60737b20fa..75971bcf11 100644
--- a/lib/stdlib/test/qlc_SUITE.erl
+++ b/lib/stdlib/test/qlc_SUITE.erl
@@ -44,9 +44,9 @@
-define(t, test_server).
-else.
-include_lib("common_test/include/ct.hrl").
--define(datadir, ?config(data_dir, Config)).
--define(privdir, ?config(priv_dir, Config)).
--define(testcase, ?config(?TESTCASE, Config)).
+-define(datadir, proplists:get_value(data_dir, Config)).
+-define(privdir, proplists:get_value(priv_dir, Config)).
+-define(testcase, proplists:get_value(?TESTCASE, Config)).
-endif.
-include_lib("stdlib/include/ms_transform.hrl").
diff --git a/lib/stdlib/test/re_SUITE.erl b/lib/stdlib/test/re_SUITE.erl
index 7458aec13e..a937e7b1cf 100644
--- a/lib/stdlib/test/re_SUITE.erl
+++ b/lib/stdlib/test/re_SUITE.erl
@@ -65,7 +65,7 @@ end_per_group(_GroupName, Config) ->
%% Run all applicable tests from the PCRE testsuites.
pcre(Config) when is_list(Config) ->
- RootDir = ?config(data_dir, Config),
+ RootDir = proplists:get_value(data_dir, Config),
Res = run_pcre_tests:test(RootDir),
0 = lists:sum([ X || {X,_,_} <- Res ]),
{comment,Res}.
diff --git a/lib/stdlib/test/select_SUITE.erl b/lib/stdlib/test/select_SUITE.erl
index 50a9ec9709..b7e86377c4 100644
--- a/lib/stdlib/test/select_SUITE.erl
+++ b/lib/stdlib/test/select_SUITE.erl
@@ -110,7 +110,7 @@ table_factor({ets,_}) ->
100.
gen_dets_filename(Config,N) ->
- filename:join(?config(priv_dir,Config),
+ filename:join(proplists:get_value(priv_dir,Config),
"testdets_" ++ integer_to_list(N) ++ ".dets").
create_tables(Config) ->
@@ -198,7 +198,7 @@ destroy_tables([{dets,Tab}|T]) ->
init_random(Config) ->
- WriteDir = ReadDir = ?config(priv_dir,Config),
+ WriteDir = ReadDir = proplists:get_value(priv_dir,Config),
(catch file:make_dir(WriteDir)),
Seed = case file:consult(filename:join([ReadDir,
"preset_random_seed2.txt"])) of
diff --git a/lib/stdlib/test/shell_SUITE.erl b/lib/stdlib/test/shell_SUITE.erl
index 14b01a4109..af735218b9 100644
--- a/lib/stdlib/test/shell_SUITE.erl
+++ b/lib/stdlib/test/shell_SUITE.erl
@@ -56,11 +56,11 @@ config(priv_dir,_) ->
-export([init_per_testcase/2, end_per_testcase/2]).
init_per_testcase(_Case, Config) ->
OrigPath = code:get_path(),
- code:add_patha(?config(priv_dir,Config)),
+ code:add_patha(proplists:get_value(priv_dir,Config)),
[{orig_path,OrigPath} | Config].
end_per_testcase(_Case, Config) ->
- OrigPath = ?config(orig_path,Config),
+ OrigPath = proplists:get_value(orig_path,Config),
code:set_path(OrigPath),
application:unset_env(stdlib, restricted_shell),
(catch code:purge(user_default)),
@@ -113,7 +113,7 @@ end_per_group(_GroupName, Config) ->
start_restricted_from_shell(Config) when is_list(Config) ->
[{error,nofile}] = scan(<<"begin shell:start_restricted("
"nonexisting_module) end.">>),
- Test = filename:join(?config(priv_dir, Config),
+ Test = filename:join(proplists:get_value(priv_dir, Config),
"test_restricted.erl"),
Contents = <<"-module(test_restricted).
-export([local_allowed/3, non_local_allowed/3]).
@@ -188,7 +188,7 @@ ok.
%% Check restricted shell when started from the command line.
start_restricted_on_command_line(Config) when is_list(Config) ->
{ok,Node} = start_node(shell_suite_helper_1,
- "-pa "++?config(priv_dir,Config)++
+ "-pa "++proplists:get_value(priv_dir,Config)++
" -stdlib restricted_shell foo"),
"Warning! Restricted shell module foo not found: nofile"++_ =
t({Node, <<"begin m() end.">>}),
@@ -197,7 +197,7 @@ start_restricted_on_command_line(Config) when is_list(Config) ->
[ok] =
(catch scan({Node, <<"begin q() end.">>})),
test_server:stop_node(Node),
- Test = filename:join(?config(priv_dir, Config),
+ Test = filename:join(proplists:get_value(priv_dir, Config),
"test_restricted2.erl"),
Contents = <<"-module(test_restricted2).
-export([local_allowed/3, non_local_allowed/3]).
@@ -215,7 +215,7 @@ start_restricted_on_command_line(Config) when is_list(Config) ->
">>,
ok = compile_file(Config, Test, Contents, []),
{ok,Node2} = start_node(shell_suite_helper_2,
- "-pa "++?config(priv_dir,Config)++
+ "-pa "++proplists:get_value(priv_dir,Config)++
" -stdlib restricted_shell test_restricted2"),
"Module" ++ _ = t({Node2,<<"begin m() end.">>, utf8}),
"exception exit: restricted shell does not allow c(foo)" =
@@ -240,7 +240,7 @@ start_restricted_on_command_line(Config) when is_list(Config) ->
restricted_local(Config) when is_list(Config) ->
[{error,nofile}] = scan(<<"begin shell:start_restricted("
"nonexisting_module) end.">>),
- Test = filename:join(?config(priv_dir, Config),
+ Test = filename:join(proplists:get_value(priv_dir, Config),
"test_restricted_local.erl"),
Contents = <<"-module(test_restricted_local).
-export([local_allowed/3, non_local_allowed/3]).
@@ -261,7 +261,7 @@ restricted_local(Config) when is_list(Config) ->
{false,State}.
">>,
ok = compile_file(Config, Test, Contents, []),
- Test2 = filename:join(?config(priv_dir, Config),
+ Test2 = filename:join(proplists:get_value(priv_dir, Config),
"user_default.erl"),
Contents2 = <<"-module(user_default).
-export([funkis/1,apple/1]).
@@ -374,7 +374,7 @@ records(Config) when is_list(Config) ->
RR4 = "rr(" ++ MS ++ ", '_', {d,test1}).",
[[state]] = scan(RR4),
- Test = filename:join(?config(priv_dir, Config), "test.erl"),
+ Test = filename:join(proplists:get_value(priv_dir, Config), "test.erl"),
Contents = <<"-module(test).
-record(state, {bin :: binary(),
reply = no,
@@ -400,7 +400,7 @@ records(Config) when is_list(Config) ->
scan(RR7),
PreReply = scan(<<"rr(prim_file).">>), % preloaded...
true = is_list(PreReply),
- Dir = filename:join(?config(priv_dir, Config), "*.erl"),
+ Dir = filename:join(proplists:get_value(priv_dir, Config), "*.erl"),
RR8 = "rp(rr(\"" ++ Dir ++ "\")).",
[_,ok] = scan(RR8),
file:delete(Test),
@@ -2225,14 +2225,14 @@ otp_5990(Config) when is_list(Config) ->
%% OTP-6166. Order of record definitions.
otp_6166(Config) when is_list(Config) ->
- Test1 = filename:join(?config(priv_dir, Config), "test1.hrl"),
+ Test1 = filename:join(proplists:get_value(priv_dir, Config), "test1.hrl"),
Contents1 = <<"-module(test1).
-record(r5, {f}). -record(r3, {f = #r5{}}). "
"-record(r1, {f = #r3{}}). -record(r4, {f = #r1{}}). "
"-record(r2, {f = #r4{}}).">>,
ok = file:write_file(Test1, Contents1),
- Test2 = filename:join(?config(priv_dir, Config), "test2.hrl"),
+ Test2 = filename:join(proplists:get_value(priv_dir, Config), "test2.hrl"),
Contents2 = <<"-module(test2).
-record(r5, {f}). -record(r3, {f = #r5{}}). "
"-record(r1, {f = #r3{}}). -record(r4, {f = #r1{}}). "
@@ -2434,7 +2434,7 @@ otp_6554(Config) when is_list(Config) ->
"exception error: no function clause matching call to results/1" =
comm_err(<<"results(foo).">>),
- Test = filename:join(?config(priv_dir, Config),
+ Test = filename:join(proplists:get_value(priv_dir, Config),
"otp_6554.erl"),
Contents = <<"-module(otp_6554).
-export([local_allowed/3, non_local_allowed/3]).
@@ -2585,7 +2585,7 @@ otp_8393(Config) when is_list(Config) ->
non_local_allowed(_,_,State) ->
{false,State}.
">>,
- Test = filename:join(?config(priv_dir, Config),
+ Test = filename:join(proplists:get_value(priv_dir, Config),
"test_restricted_shell.erl"),
ok = compile_file(Config, Test, Contents, []),
_ = shell:prompt_func(default),
@@ -2672,7 +2672,7 @@ prompt_err(B) ->
%% OTP-10302. Unicode.
otp_10302(Config) when is_list(Config) ->
{ok,Node} = start_node(shell_suite_helper_2,
- "-pa "++?config(priv_dir,Config)++
+ "-pa "++proplists:get_value(priv_dir,Config)++
" +pc unicode"),
Test1 =
<<"begin
@@ -3017,7 +3017,7 @@ run_file(Config, Module, Test) ->
ok.
compile_file(Config, File, Test, Opts0) ->
- Opts = [export_all,return,{outdir,?config(priv_dir, Config)}|Opts0],
+ Opts = [export_all,return,{outdir,proplists:get_value(priv_dir, Config)}|Opts0],
ok = file:write_file(File, Test),
case compile:file(File, Opts) of
{ok, _M, _Ws} -> ok;
@@ -3027,7 +3027,7 @@ compile_file(Config, File, Test, Opts0) ->
filename(Name, Config) when is_atom(Name) ->
filename(atom_to_list(Name), Config);
filename(Name, Config) ->
- filename:join(?config(priv_dir, Config), Name).
+ filename:join(proplists:get_value(priv_dir, Config), Name).
start_node(Name, Xargs) ->
N = test_server:start_node(Name, slave, [{args, " " ++ Xargs}]),
diff --git a/lib/stdlib/test/supervisor_SUITE.erl b/lib/stdlib/test/supervisor_SUITE.erl
index 42775cf77d..9de5a57e7f 100644
--- a/lib/stdlib/test/supervisor_SUITE.erl
+++ b/lib/stdlib/test/supervisor_SUITE.erl
@@ -815,7 +815,7 @@ temporary_shutdown(Config) when is_list(Config) ->
faulty_application_shutdown(Config) when is_list(Config) ->
%% Set some paths
- AppDir = filename:join(?config(data_dir, Config), "app_faulty"),
+ AppDir = filename:join(proplists:get_value(data_dir, Config), "app_faulty"),
EbinDir = filename:join(AppDir, "ebin"),
%% Start faulty app
diff --git a/lib/stdlib/test/sys_SUITE.erl b/lib/stdlib/test/sys_SUITE.erl
index 3f87c21b3e..39bc835824 100644
--- a/lib/stdlib/test/sys_SUITE.erl
+++ b/lib/stdlib/test/sys_SUITE.erl
@@ -63,7 +63,7 @@ log(Config) when is_list(Config) ->
ok.
log_to_file(Config) when is_list(Config) ->
- TempName = test_server:temp_name(?config(priv_dir,Config) ++ "sys."),
+ TempName = test_server:temp_name(proplists:get_value(priv_dir,Config) ++ "sys."),
{ok,_Server} = start(),
ok = sys:log_to_file(?server,TempName),
{ok,-44} = public_call(44),
diff --git a/lib/stdlib/test/tar_SUITE.erl b/lib/stdlib/test/tar_SUITE.erl
index 28f42c6b37..7f20851445 100644
--- a/lib/stdlib/test/tar_SUITE.erl
+++ b/lib/stdlib/test/tar_SUITE.erl
@@ -64,7 +64,7 @@ borderline(Config) when is_list(Config) ->
%% of the private directory path.
{ok, Cwd} = file:get_cwd(),
- RootDir = ?config(priv_dir, Config),
+ RootDir = proplists:get_value(priv_dir, Config),
TempDir = remove_prefix(Cwd++"/", filename:join(RootDir, "borderline")),
ok = file:make_dir(TempDir),
@@ -201,7 +201,7 @@ next_random(X) ->
%% and uncompressed archives.
%% Also test the 'cooked' option.
atomic(Config) when is_list(Config) ->
- ok = file:set_cwd(?config(priv_dir, Config)),
+ ok = file:set_cwd(proplists:get_value(priv_dir, Config)),
DataFiles = data_files(),
Names = [Name || {Name,_,_} <- DataFiles],
io:format("Names: ~p", [Names]),
@@ -279,7 +279,7 @@ create_files([]) ->
%% Test to extract an Unix tar file containing filenames longer than
%% 100 characters and empty directories.
long_names(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
Long = filename:join(DataDir, "long_names.tar"),
run_in_short_tempdir(Config,
fun() -> do_long_names(Long) end).
@@ -365,8 +365,8 @@ bad_tar(Config) when is_list(Config) ->
try_bad(Name0, Reason, Config) ->
%% Intentionally no macros here.
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Name = Name0 ++ ".tar",
io:format("~nTrying ~s", [Name]),
Full = filename:join(DataDir, Name),
@@ -392,7 +392,7 @@ try_bad(Name0, Reason, Config) ->
%% Tests that some common errors return correct error codes
%% and that format_error/1 handles them correctly.
errors(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
%% Give the tar file the same name as a directory.
BadTar = filename:join(PrivDir, "bad_tarfile.tar"),
@@ -439,8 +439,8 @@ remove_prefix(_, Result) ->
%% Test extracting a tar archive from a binary.
extract_from_binary(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Long = filename:join(DataDir, "no_fancy_stuff.tar"),
ExtractDir = filename:join(PrivDir, "extract_from_binary"),
ok = file:make_dir(ExtractDir),
@@ -462,8 +462,8 @@ extract_from_binary(Config) when is_list(Config) ->
extract_from_binary_compressed(Config) when is_list(Config) ->
%% Test extracting a compressed tar archive from a binary.
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Name = filename:join(DataDir, "cooked_tar_problem.tar.gz"),
ExtractDir = filename:join(PrivDir, "extract_from_binary_compressed"),
ok = file:make_dir(ExtractDir),
@@ -495,8 +495,8 @@ extract_from_binary_compressed(Config) when is_list(Config) ->
%% Test extracting a tar archive from an open file.
extract_from_open_file(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Long = filename:join(DataDir, "no_fancy_stuff.tar"),
ExtractDir = filename:join(PrivDir, "extract_from_open_file"),
ok = file:make_dir(ExtractDir),
@@ -520,7 +520,7 @@ extract_from_open_file(Config) when is_list(Config) ->
%% Test that archives containing symlinks can be created and extracted.
symlinks(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Dir = filename:join(PrivDir, "symlinks"),
ok = file:make_dir(Dir),
ABadSymlink = filename:join(Dir, "bad_symlink"),
@@ -627,7 +627,7 @@ long_symlink(Dir) ->
ok.
open_add_close(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ok = file:set_cwd(PrivDir),
Dir = filename:join(PrivDir, "open_add_close"),
ok = file:make_dir(Dir),
@@ -668,8 +668,8 @@ oac_files() ->
cooked_compressed(Config) when is_list(Config) ->
%% Test that a compressed archive can be read in cooked mode.
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Name = filename:join(DataDir, "cooked_tar_problem.tar.gz"),
%% Try table/2 and extract/2.
@@ -693,7 +693,7 @@ cooked_compressed(Config) when is_list(Config) ->
%% Test that an archive can be created directly from binaries and
%% that an archive can be extracted into binaries.
memory(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
FileBins = [{"bar/fum", <<"BARFUM">>},{"foo", <<"FOO">>}],
Name1 = filename:join(DataDir, "memory.tar"),
@@ -720,7 +720,7 @@ memory(Config) when is_list(Config) ->
%% Test filenames with characters outside the US ASCII range.
unicode(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
do_unicode(PrivDir),
case has_transparent_naming() of
true ->
@@ -800,7 +800,7 @@ delete_files([Item|Rest]) ->
%% 260 characters.
run_in_short_tempdir(Config, Fun) ->
{ok,Cwd} = file:get_cwd(),
- PrivDir0 = ?config(priv_dir, Config),
+ PrivDir0 = proplists:get_value(priv_dir, Config),
%% Normalize name to make sure that there is no slash at the end.
PrivDir = filename:absname(PrivDir0),
diff --git a/lib/stdlib/test/zip_SUITE.erl b/lib/stdlib/test/zip_SUITE.erl
index 68bf8fa845..57ad869f24 100644
--- a/lib/stdlib/test/zip_SUITE.erl
+++ b/lib/stdlib/test/zip_SUITE.erl
@@ -60,7 +60,7 @@ end_per_group(_GroupName, Config) ->
%% multiple times with different file sizes. Also check that the
%% modification date of the extracted file has survived.
borderline(Config) when is_list(Config) ->
- RootDir = ?config(priv_dir, Config),
+ RootDir = proplists:get_value(priv_dir, Config),
TempDir = filename:join(RootDir, "borderline"),
ok = file:make_dir(TempDir),
@@ -217,7 +217,7 @@ next_random(X) ->
%% Test the 'atomic' operations: zip/unzip/list_dir, on archives.
%% Also test the 'cooked' option.
atomic(Config) when is_list(Config) ->
- ok = file:set_cwd(?config(priv_dir, Config)),
+ ok = file:set_cwd(proplists:get_value(priv_dir, Config)),
DataFiles = data_files(),
Names = [Name || {Name,_,_} <- DataFiles],
io:format("Names: ~p", [Names]),
@@ -243,7 +243,7 @@ atomic(Config) when is_list(Config) ->
%% Test the openzip_open/2, openzip_get/1, openzip_get/2, openzip_close/1
%% and openzip_list_dir/1 functions.
openzip_api(Config) when is_list(Config) ->
- ok = file:set_cwd(?config(priv_dir, Config)),
+ ok = file:set_cwd(proplists:get_value(priv_dir, Config)),
DataFiles = data_files(),
Names = [Name || {Name, _, _} <- DataFiles],
io:format("Names: ~p", [Names]),
@@ -280,7 +280,7 @@ openzip_api(Config) when is_list(Config) ->
%% Test the zip_open/2, zip_get/1, zip_get/2, zip_close/1,
%% and zip_list_dir/1 functions.
zip_api(Config) when is_list(Config) ->
- ok = file:set_cwd(?config(priv_dir, Config)),
+ ok = file:set_cwd(proplists:get_value(priv_dir, Config)),
DataFiles = data_files(),
Names = [Name || {Name, _, _} <- DataFiles],
io:format("Names: ~p", [Names]),
@@ -351,8 +351,8 @@ spawned_zip_dead(ZipSrv) ->
%% Test options for unzip, only cwd and file_list currently.
unzip_options(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
Long = filename:join(DataDir, "abc.zip"),
%% create a temp directory
@@ -379,8 +379,8 @@ unzip_options(Config) when is_list(Config) ->
%% Test unzip a jar file (OTP-7382).
unzip_jar(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
JarFile = filename:join(DataDir, "test.jar"),
%% create a temp directory
@@ -405,13 +405,13 @@ unzip_jar(Config) when is_list(Config) ->
%% Test the options for unzip, only cwd currently.
zip_options(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ok = file:set_cwd(PrivDir),
DataFiles = data_files(),
Names = [Name || {Name, _, _} <- DataFiles],
%% Make sure cwd is not where we get the files
- ok = file:set_cwd(?config(data_dir, Config)),
+ ok = file:set_cwd(proplists:get_value(data_dir, Config)),
%% Create a zip archive
{ok, {_,Zip}} =
@@ -495,7 +495,7 @@ create_files([]) ->
%% Try zip:unzip/1 on some corrupted zip files.
bad_zip(Config) when is_list(Config) ->
- ok = file:set_cwd(?config(priv_dir, Config)),
+ ok = file:set_cwd(proplists:get_value(priv_dir, Config)),
try_bad("bad_crc", {bad_crc, "abc.txt"}, Config),
try_bad("bad_central_directory", bad_central_directory, Config),
try_bad("bad_file_header", bad_file_header, Config),
@@ -515,7 +515,7 @@ try_bad(N, R, Config) ->
try_bad(Name0, Reason, What, Config) ->
%% Intentionally no macros here.
- DataDir = ?config(data_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
Name = Name0 ++ ".zip",
io:format("~nTrying ~s", [Name]),
Full = filename:join(DataDir, Name),
@@ -530,8 +530,8 @@ try_bad(Name0, Reason, What, Config) ->
%% Test extracting to binary with memory option.
unzip_to_binary(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
WorkDir = filename:join(PrivDir, "unzip_to_binary"),
_ = file:make_dir(WorkDir),
@@ -552,8 +552,8 @@ unzip_to_binary(Config) when is_list(Config) ->
%% Test compressing to binary with memory option.
zip_to_binary(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
WorkDir = filename:join(PrivDir, "zip_to_binary"),
_ = file:make_dir(WorkDir),
@@ -605,8 +605,8 @@ aliases(Config) when is_list(Config) ->
%% Test extracting a zip archive from a binary.
unzip_from_binary(Config) when is_list(Config) ->
- DataDir = ?config(data_dir, Config),
- PrivDir = ?config(priv_dir, Config),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
ExtractDir = filename:join(PrivDir, "extract_from_binary"),
ok = file:make_dir(ExtractDir),
Archive = filename:join(ExtractDir, "abc.zip"),
@@ -674,7 +674,7 @@ do_delete_files([Item|Rest], Cnt) ->
%% Test control of which files that should be compressed.
compress_control(Config) when is_list(Config) ->
- ok = file:set_cwd(?config(priv_dir, Config)),
+ ok = file:set_cwd(proplists:get_value(priv_dir, Config)),
Dir = "compress_control",
Files = [
{Dir, dir, $d},
@@ -805,7 +805,7 @@ extensions([], Old) ->
Old.
foldl(Config) ->
- PrivDir = ?config(priv_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
File = filename:join([PrivDir, "foldl.zip"]),
FooBin = <<"FOO">>,