diff options
author | Björn Gustavsson <[email protected]> | 2016-03-02 06:50:54 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-03-09 13:22:59 +0100 |
commit | 33b414783b37dc0c242c729fa3fa843cd648e3e0 (patch) | |
tree | 7d4f40be30fca15fa09efdc89334246f4a0c7da9 /lib/stdlib/test/zip_SUITE.erl | |
parent | 477f490820a28e479527e93d420f26ea23fdf3e3 (diff) | |
download | otp-33b414783b37dc0c242c729fa3fa843cd648e3e0.tar.gz otp-33b414783b37dc0c242c729fa3fa843cd648e3e0.tar.bz2 otp-33b414783b37dc0c242c729fa3fa843cd648e3e0.zip |
Remove ?line macros
While we are it, also re-ident the files.
Diffstat (limited to 'lib/stdlib/test/zip_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/zip_SUITE.erl | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/lib/stdlib/test/zip_SUITE.erl b/lib/stdlib/test/zip_SUITE.erl index c1da498f49..68bf8fa845 100644 --- a/lib/stdlib/test/zip_SUITE.erl +++ b/lib/stdlib/test/zip_SUITE.erl @@ -311,7 +311,7 @@ zip_api(Config) when is_list(Config) -> %% Clean up. delete_files([Names]), - ok. + ok. %% Test that zip doesn't leak processes and ports where the %% controlling process dies without closing an zip opened with @@ -362,19 +362,19 @@ unzip_options(Config) when is_list(Config) -> FList = ["quotes/rain.txt","wikipedia.txt"], %% Unzip a zip file in Subdir - ?line {ok, RetList} = zip:unzip(Long, [{cwd, Subdir}, - {file_list, FList}]), + {ok, RetList} = zip:unzip(Long, [{cwd, Subdir}, + {file_list, FList}]), %% Verify. - ?line true = (length(FList) =:= length(RetList)), - ?line lists:foreach(fun(F)-> {ok,B} = file:read_file(filename:join(DataDir, F)), - {ok,B} = file:read_file(filename:join(Subdir, F)) end, - FList), - ?line lists:foreach(fun(F)-> ok = file:delete(F) end, - RetList), + true = (length(FList) =:= length(RetList)), + lists:foreach(fun(F)-> {ok,B} = file:read_file(filename:join(DataDir, F)), + {ok,B} = file:read_file(filename:join(Subdir, F)) end, + FList), + lists:foreach(fun(F)-> ok = file:delete(F) end, + RetList), %% Clean up and verify no more files. - ?line 0 = delete_files([Subdir]), + 0 = delete_files([Subdir]), ok. %% Test unzip a jar file (OTP-7382). @@ -393,14 +393,14 @@ unzip_jar(Config) when is_list(Config) -> {ok, RetList} = zip:unzip(JarFile), %% Verify. - ?line lists:foreach(fun(F)-> {ok,B} = file:read_file(filename:join(DataDir, F)), - {ok,B} = file:read_file(filename:join(Subdir, F)) end, - FList), - ?line lists:foreach(fun(F)-> ok = file:delete(F) end, - RetList), + lists:foreach(fun(F)-> {ok,B} = file:read_file(filename:join(DataDir, F)), + {ok,B} = file:read_file(filename:join(Subdir, F)) end, + FList), + lists:foreach(fun(F)-> ok = file:delete(F) end, + RetList), %% Clean up and verify no more files. - ?line 0 = delete_files([Subdir]), + 0 = delete_files([Subdir]), ok. %% Test the options for unzip, only cwd currently. @@ -811,26 +811,26 @@ foldl(Config) -> FooBin = <<"FOO">>, BarBin = <<"BAR">>, Files = [{"foo", FooBin}, {"bar", BarBin}], - ?line {ok, {File, Bin}} = zip:create(File, Files, [memory]), + {ok, {File, Bin}} = zip:create(File, Files, [memory]), ZipFun = fun(N, I, B, Acc) -> [{N, B(), I()} | Acc] end, - ?line {ok, FileSpec} = zip:foldl(ZipFun, [], {File, Bin}), - ?line [{"bar", BarBin, #file_info{}}, {"foo", FooBin, #file_info{}}] = FileSpec, - ?line {ok, {File, Bin}} = zip:create(File, lists:reverse(FileSpec), [memory]), - ?line {foo_bin, FooBin} = + {ok, FileSpec} = zip:foldl(ZipFun, [], {File, Bin}), + [{"bar", BarBin, #file_info{}}, {"foo", FooBin, #file_info{}}] = FileSpec, + {ok, {File, Bin}} = zip:create(File, lists:reverse(FileSpec), [memory]), + {foo_bin, FooBin} = try zip:foldl(fun("foo", _, B, _) -> throw(B()); (_, _, _, Acc) -> Acc end, [], {File, Bin}) catch throw:FooBin -> {foo_bin, FooBin} end, - ?line ok = file:write_file(File, Bin), - ?line {ok, FileSpec} = zip:foldl(ZipFun, [], File), + ok = file:write_file(File, Bin), + {ok, FileSpec} = zip:foldl(ZipFun, [], File), - ?line {error, einval} = zip:foldl(fun() -> ok end, [], File), - ?line {error, einval} = zip:foldl(ZipFun, [], 42), - ?line {error, einval} = zip:foldl(ZipFun, [], {File, 42}), + {error, einval} = zip:foldl(fun() -> ok end, [], File), + {error, einval} = zip:foldl(ZipFun, [], 42), + {error, einval} = zip:foldl(ZipFun, [], {File, 42}), - ?line ok = file:delete(File), - ?line {error, enoent} = zip:foldl(ZipFun, [], File), + ok = file:delete(File), + {error, enoent} = zip:foldl(ZipFun, [], File), ok. |