File 0833-Fix-typos-in-lib-eunit-ftp.patch of Package erlang
From b9ad685fdc7d1838a6f71a0fa2768e384ff44f68 Mon Sep 17 00:00:00 2001
From: "Kian-Meng, Ang" <kianmeng@cpan.org>
Date: Thu, 16 Dec 2021 09:20:39 +0800
Subject: [PATCH] Fix typos in lib/{eunit,ftp}
---
lib/eunit/src/eunit_data.erl | 2 +-
lib/ftp/src/ftp.erl | 4 ++--
lib/ftp/src/ftp_progress.erl | 4 ++--
lib/ftp/src/ftp_response.erl | 8 ++++----
lib/ftp/test/erl_make_certs.erl | 2 +-
lib/ftp/test/ftp_SUITE.erl | 14 ++++++-------
lib/ftp/test/ftp_SUITE_data/vsftpd.conf | 2 +-
lib/ftp/test/ftp_format_SUITE.erl | 20 +++++++++----------
.../ftp_simple_client_server_data/vsftpd.conf | 2 +-
9 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/lib/eunit/src/eunit_data.erl b/lib/eunit/src/eunit_data.erl
index c9dc184970..702d3a5687 100644
--- a/lib/eunit/src/eunit_data.erl
+++ b/lib/eunit/src/eunit_data.erl
@@ -105,7 +105,7 @@
%% @type fileName() = string()
%% TODO: Can we mark up tests as known-failures?
-%% TODO: Is it possible to handle known timout/setup failures?
+%% TODO: Is it possible to handle known timeout/setup failures?
%% TODO: Add diagnostic tests which never fail, but may cause warnings?
%% ---------------------------------------------------------------------
diff --git a/lib/ftp/src/ftp.erl b/lib/ftp/src/ftp.erl
index 221eac3dac..c0ae13d053 100644
--- a/lib/ftp/src/ftp.erl
+++ b/lib/ftp/src/ftp.erl
@@ -1255,7 +1255,7 @@ handle_cast({Pid, close}, State) ->
error_logger:info_report(Report),
{noreply, State};
-%% Catch all - This can oly happen if the application programmer writes
+%% Catch all - This can only happen if the application programmer writes
%% really bad code that violates the API.
handle_cast(Msg, State) ->
{stop, {'API_violation_connection_closed', Msg}, State}.
@@ -2258,7 +2258,7 @@ activate_connection(API, CloseTag, Socket0) ->
case API:setopts(Socket, [{active, once}]) of
ok ->
ok;
- {error, _} -> %% inet can retrun einval instead of closed
+ {error, _} -> %% inet can return einval instead of closed
self() ! {CloseTag, Socket}
end.
diff --git a/lib/ftp/src/ftp_progress.erl b/lib/ftp/src/ftp_progress.erl
index 64c612519d..f6c01c3f81 100644
--- a/lib/ftp/src/ftp_progress.erl
+++ b/lib/ftp/src/ftp_progress.erl
@@ -18,8 +18,8 @@
%% %CopyrightEnd%
%%
%%
-%% Description: This module impements a temporary process that
-%% performes progress reporting during file transfer calling a user
+%% Description: This module implements a temporary process that
+%% performs progress reporting during file transfer calling a user
%% defined callback function. Its life span is as long as the ftp connection
%% processes that spawned it lives. The purpose of this process is to
%% shild the ftp connection process from errors and time consuming operations
diff --git a/lib/ftp/src/ftp_response.erl b/lib/ftp/src/ftp_response.erl
index 8d00153ba8..91288993c6 100644
--- a/lib/ftp/src/ftp_response.erl
+++ b/lib/ftp/src/ftp_response.erl
@@ -18,7 +18,7 @@
%% %CopyrightEnd%
%%
%%
-%% Description: This module impements handling of ftp server responses.
+%% Description: This module implements handling of ftp server responses.
-module(ftp_response).
@@ -50,7 +50,7 @@
%% {continue, {Data,
%% AccLines, StatusCode}}
%%
-%% Data = binary() - data recived on the control connection from the
+%% Data = binary() - data received on the control connection from the
%% ftp-server.
%% AccLines = [string()]
%% StatusCode = start | {byte(), byte(), byte()} | finish -
@@ -95,7 +95,7 @@ parse_lines(<<?CR, ?LF, C1, C2, C3, ?WHITE_SPACE, Rest/binary>>, Lines, {C1, C2,
%% Potential end found wait for more data
parse_lines(<<?CR, ?LF, C1, C2, C3>> = Bin, Lines, {C1, C2, C3}) ->
{continue, {Bin, Lines, {C1, C2, C3}}};
-%% Intermidate line begining with status code
+%% Intermidate line beginning with status code
parse_lines(<<?CR, ?LF, C1, C2, C3, Rest/binary>>, Lines, {C1, C2, C3}) ->
parse_lines(Rest, [C3, C2, C1, ?LF, ?CR | Lines], {C1, C2, C3});
@@ -184,7 +184,7 @@ interpret_status(?POS_PREL,_,_) -> pos_prel;
interpret_status(?POS_COMPL, ?AUTH_ACC, 4) -> tls_upgrade;
%% Positive Completion Reply
interpret_status(?POS_COMPL,_,_) -> pos_compl;
-%% Positive Intermediate Reply nedd account
+%% Positive Intermediate Reply need account
interpret_status(?POS_INTERM,?AUTH_ACC,2) -> pos_interm_acct;
%% Positive Intermediate Reply
interpret_status(?POS_INTERM,_,_) -> pos_interm;
diff --git a/lib/ftp/test/erl_make_certs.erl b/lib/ftp/test/erl_make_certs.erl
index 2af2d8c3e9..546f33ed0c 100644
--- a/lib/ftp/test/erl_make_certs.erl
+++ b/lib/ftp/test/erl_make_certs.erl
@@ -44,7 +44,7 @@
%% {title, Title}
%% {dnQualifer, DnQ}
%% issuer = {Issuer, IssuerKey} true (i.e. a ca cert is created)
-%% (obs IssuerKey migth be {Key, Password}
+%% (Note! The IssuerKey might be {Key, Password}
%% key = KeyFile|KeyBin|rsa|dsa|ec Subject PublicKey rsa, dsa or ec generates key
%%
%%
diff --git a/lib/ftp/test/ftp_SUITE.erl b/lib/ftp/test/ftp_SUITE.erl
index fb6468b499..71ddd667f4 100644
--- a/lib/ftp/test/ftp_SUITE.erl
+++ b/lib/ftp/test/ftp_SUITE.erl
@@ -516,7 +516,7 @@ ls(Config0) ->
%%-------------------------------------------------------------------------
nlist() ->
[{doc,"Open an ftp connection; nlist the current directory, and the "
- "\"test\" directory. Nlist does not behave consistenly over "
+ "\"test\" directory. Nlist does not behave consistently over "
"operating systems. On some it is an error to have an empty "
"directory."}].
nlist(Config0) ->
@@ -888,7 +888,7 @@ quote(Config) ->
Pid = proplists:get_value(ftp, Config),
["257 \""++_Rest] = ftp:quote(Pid, "pwd"), %% 257
[_| _] = ftp:quote(Pid, "help"),
- %% This negativ test causes some ftp servers to hang. This test
+ %% This negative test causes some ftp servers to hang. This test
%% is not important for the client, so we skip it for now.
%%["425 Can't build data connection: Connection refused."]
%% = ftp:quote(Pid, "list"),
@@ -948,7 +948,7 @@ unexpected_call(Config) when is_list(Config) ->
Flag = process_flag(trap_exit, true),
Pid = proplists:get_value(ftp, Config),
- %% Serious programming fault, connetion will be shut down
+ %% A serious programming fault, the connection will be shut down
case (catch gen_server:call(Pid, {self(), foobar, 10}, infinity)) of
{error, {connection_terminated, 'API_violation'}} ->
ok;
@@ -965,7 +965,7 @@ unexpected_cast()->
unexpected_cast(Config) when is_list(Config) ->
Flag = process_flag(trap_exit, true),
Pid = proplists:get_value(ftp, Config),
- %% Serious programming fault, connetion will be shut down
+ %% A serious programming fault, the connection will be shut down
gen_server:cast(Pid, {self(), foobar, 10}),
ct:sleep(500),
undefined = process_info(Pid, status),
@@ -977,7 +977,7 @@ unexpected_bang()->
unexpected_bang(Config) when is_list(Config) ->
Flag = process_flag(trap_exit, true),
Pid = proplists:get_value(ftp, Config),
- %% Could be an innocent misstake the connection lives.
+ %% Could be an innocent mistake the connection lives.
Pid ! foobar,
ct:sleep(500),
{status, _} = process_info(Pid, status),
@@ -1016,7 +1016,7 @@ clean_shutdown(Config) ->
%%-------------------------------------------------------------------------
ftp_worker() ->
[{doc, "Makes sure the ftp worker processes are added and removed "
- "appropriatly to/from the supervison tree."}].
+ "appropriately to/from the supervison tree."}].
ftp_worker(Config) ->
Pid = proplists:get_value(ftp,Config),
case supervisor:which_children(ftp_sup) of
@@ -1217,7 +1217,7 @@ start_ftpd(Config0) ->
ct:log("Ftp server ~p started on ~p:~p but is unusable:~n~p:~p",
[AbsName,Host,Port,Class,Exception]),
stop_ftpd(Config),
- {skip, [AbsName," started but unusuable"]}
+ {skip, [AbsName," started but unusable"]}
end;
{error,Msg} ->
{skip, [AbsName," not started: ",Msg]}
diff --git a/lib/ftp/test/ftp_SUITE_data/vsftpd.conf b/lib/ftp/test/ftp_SUITE_data/vsftpd.conf
index 51cea2dcd8..7a2bf67805 100644
--- a/lib/ftp/test/ftp_SUITE_data/vsftpd.conf
+++ b/lib/ftp/test/ftp_SUITE_data/vsftpd.conf
@@ -2,7 +2,7 @@
###
### Some parameters are given in the vsftpd start command.
###
-### Typical command-line paramters are such that has a file path
+### Typical command-line parameters are such that has a file path
### component like cert files.
###
diff --git a/lib/ftp/test/ftp_format_SUITE.erl b/lib/ftp/test/ftp_format_SUITE.erl
index e1d0de2390..a4a3ca28bd 100644
--- a/lib/ftp/test/ftp_format_SUITE.erl
+++ b/lib/ftp/test/ftp_format_SUITE.erl
@@ -64,7 +64,7 @@ end_per_testcase(_, _) ->
%%-------------------------------------------------------------------------
ftp_150() ->
- [{doc, "Especially check that respons can be devided in a random place."}].
+ [{doc, "Especially check that a response can be divided in a random place."}].
ftp_150(Config) when is_list(Config) ->
FtpResponse = ["150 ASCII data conn", "ection for /bin/ls ",
"(134.138.177", ".89,50434) (0 bytes).\r\n"],
@@ -75,7 +75,7 @@ ftp_150(Config) when is_list(Config) ->
{pos_prel, _} = ftp_response:interpret(Msg).
ftp_200() ->
- [{doc, "Especially check that respons can be devided after the first status "
+ [{doc, "Especially check that a response can be divided after the first status "
"code character and in the end delimiter."}].
ftp_200(Config) when is_list(Config) ->
FtpResponse = ["2", "00 PORT command successful.", [?CR], [?LF]],
@@ -86,8 +86,8 @@ ftp_200(Config) when is_list(Config) ->
ok.
ftp_220() ->
- [{doc, "Especially check that respons can be devided after the "
- "first with space "}].
+ [{doc, "Especially check that a response can be divided after the "
+ "first white space "}].
ftp_220(Config) when is_list(Config) ->
FtpResponse = ["220 ","fingon FTP server (SunOS 5.8) ready.\r\n"],
@@ -97,7 +97,7 @@ ftp_220(Config) when is_list(Config) ->
ok.
ftp_226() ->
- [{doc, "Especially check that respons can be devided after second status code"
+ [{doc, "Especially check that a response can be divided after second status code"
" character and in the end delimiter."}].
ftp_226(Config) when is_list(Config) ->
FtpResponse = ["22" "6 Transfer complete.\r", [?LF]],
@@ -118,7 +118,7 @@ ftp_257(Config) when is_list(Config) ->
ok.
ftp_331() ->
- [{doc, "Especially check that respons can be devided after the third status "
+ [{doc, "Especially check that a response can be divided after the third status "
" status code character."}].
ftp_331(Config) when is_list(Config) ->
%% Brake before white space after code
@@ -151,7 +151,7 @@ ftp_multiple_lines_status_in_msg(Config) when is_list(Config) ->
ok.
ftp_multiple_lines() ->
- [{doc, "Especially check multiple lines devided in significant places"}].
+ [{doc, "Especially check multiple lines divided in significant places"}].
ftp_multiple_lines(Config) when is_list(Config) ->
FtpResponse = ["21", "4","-The",
" following commands are recognized:\r\n"
@@ -231,9 +231,9 @@ ftp_multiple_lines(Config) when is_list(Config) ->
ftp_other_status_codes() ->
[{doc, "Check that other valid status codes, than the ones above, are handled"
- "by ftp_response:interpret/1. Note there are som ftp status codes"
- "that will not be received with the current ftp instruction support,"
- "they are not included here."}].
+ "by ftp_response:interpret/1. Note that there are some ftp status codes"
+ "that will not be received with the current ftp instruction support."
+ "They are not included here."}].
ftp_other_status_codes(Config) when is_list(Config) ->
%% 1XX
diff --git a/lib/ftp/test/property_test/ftp_simple_client_server_data/vsftpd.conf b/lib/ftp/test/property_test/ftp_simple_client_server_data/vsftpd.conf
index fd48e2abf0..dc6d0ff0b3 100644
--- a/lib/ftp/test/property_test/ftp_simple_client_server_data/vsftpd.conf
+++ b/lib/ftp/test/property_test/ftp_simple_client_server_data/vsftpd.conf
@@ -2,7 +2,7 @@
###
### Some parameters are given in the vsftpd start command.
###
-### Typical command-line paramters are such that has a file path
+### Typical command-line parameters are such that has a file path
### component like cert files.
###
--
2.31.1