summaryrefslogtreecommitdiff
path: root/lib/inets/test/ftp_macosx_x86_test.erl
blob: 17b7160b95255a5b48c717befe50f27fbb593176 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
%%
%% %CopyrightBegin%
%% 
%% Copyright Ericsson AB 2005-2010. All Rights Reserved.
%% 
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
%% 
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
%% 
%% %CopyrightEnd%
%%
%%

-module(ftp_macosx_x86_test).

-compile(export_all).

-include_lib("common_test/include/ct.hrl").

-define(LIB_MOD,ftp_suite_lib).
-define(CASE_WRAPPER(_A_,_B_,_C_),?LIB_MOD:wrapper(_A_,_B_,_C_)).
-define(PLATFORM,"Macosx x86 ").

%% Test server callback functions
%%--------------------------------------------------------------------
%% Function: init_per_suite(Config) -> Config
%% Config - [tuple()]
%%   A list of key/value pairs, holding the test case configuration.
%% Description: Initiation before the whole suite
%%
%% Note: This function is free to add any key/value pairs to the Config
%% variable, but should NOT alter/remove any existing entries.
%%--------------------------------------------------------------------
init_per_suite(Config) ->
    {File, NewFile} = ?LIB_MOD:test_filenames(),
    NewConfig = [{file, File}, {new_file, NewFile} | Config],
    ?LIB_MOD:ftpd_init(macosx_x86, NewConfig).

%%--------------------------------------------------------------------
%% Function: end_per_suite(Config) -> _
%% Config - [tuple()]
%%   A list of key/value pairs, holding the test case configuration.
%% Description: Cleanup after the whole suite
%%--------------------------------------------------------------------
end_per_suite(Config) ->
    ?LIB_MOD:ftpd_fin(Config).

%%--------------------------------------------------------------------
%% Function: init_per_testcase(TestCase, Config) -> Config
%% Case - atom()
%%   Name of the test case that is about to be run.
%% Config - [tuple()]
%%   A list of key/value pairs, holding the test case configuration.
%%
%% Description: Initiation before each test case
%%
%% Note: This function is free to add any key/value pairs to the Config
%% variable, but should NOT alter/remove any existing entries.
%% Description: Initiation before each test case
%%--------------------------------------------------------------------
init_per_testcase(Case, Config) ->
    ftp_suite_lib:init_per_testcase(Case, Config).
%%--------------------------------------------------------------------
%% Function: end_per_testcase(TestCase, Config) -> _
%% Case - atom()
%%   Name of the test case that is about to be run.
%% Config - [tuple()]
%%   A list of key/value pairs, holding the test case configuration.
%% Description: Cleanup after each test case
%%--------------------------------------------------------------------
end_per_testcase(Case, Config) ->
    ftp_suite_lib:end_per_testcase(Case, Config).

%%--------------------------------------------------------------------
%% Function: all(Clause) -> TestCases
%% Clause - atom() - suite | doc
%% TestCases - [Case] 
%% Case - atom()
%%   Name of a test case.
%% Description: Returns a list of all test cases in this test suite
%%--------------------------------------------------------------------
all() -> 
[open, open_port, {group, passive}, {group, active},
 api_missuse, not_owner, {group, progress_report}].

groups() -> 
    [{passive, [], ftp_suite_lib:passive(suite)},
 {active, [], ftp_suite_lib:active(suite)},
 {progress_report, [],
  ftp_suite_lib:progress_report(suite)}].

init_per_group(_GroupName, Config) ->
	Config.

end_per_group(_GroupName, Config) ->
	Config.


%% Test cases starts here.
%%--------------------------------------------------------------------
open(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open/1).
open_port(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open_port/1).
api_missuse(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:api_missuse/1).
not_owner(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:not_owner/1).

passive_user(X) -> ?LIB_MOD:passive_user(X).
passive_pwd(X) -> ?LIB_MOD:passive_pwd(X).
passive_cd(X) -> ?LIB_MOD:passive_cd(X).
passive_lcd(X) -> ?LIB_MOD:passive_lcd(X).
passive_ls(X) -> ?LIB_MOD:passive_ls(X).
passive_nlist(X) -> ?LIB_MOD:passive_nlist([{wildcard_support, false} | X]).
passive_rename(X) -> ?LIB_MOD:passive_rename(X).
passive_delete(X) -> ?LIB_MOD:passive_delete(X).
passive_mkdir(X) -> ?LIB_MOD:passive_mkdir(X).
passive_send(X) -> ?LIB_MOD:passive_send(X).
passive_send_bin(X) -> ?LIB_MOD:passive_send_bin(X).
passive_send_chunk(X) -> ?LIB_MOD:passive_send_chunk(X).
passive_append(X) -> ?LIB_MOD:passive_append(X).
passive_append_bin(X) -> ?LIB_MOD:passive_append_bin(X).
passive_append_chunk(X) -> ?LIB_MOD:passive_append_chunk(X).
passive_recv(X) -> ?LIB_MOD:passive_recv(X).
passive_recv_bin(X) -> ?LIB_MOD:passive_recv_bin(X).
passive_recv_chunk(X) -> ?LIB_MOD:passive_recv_chunk(X).
passive_type(X) -> ?LIB_MOD:passive_type(X).
passive_quote(X) -> ?LIB_MOD:passive_quote(X).
passive_ip_v6_disabled(X) -> ?LIB_MOD:passive_ip_v6_disabled(X).
active_user(X) -> ?LIB_MOD:active_user(X). 
active_pwd(X) -> ?LIB_MOD:active_pwd(X). 
active_cd(X) -> ?LIB_MOD:active_cd(X).
active_lcd(X) -> ?LIB_MOD:active_lcd(X). 
active_ls(X) -> ?LIB_MOD:active_ls(X). 
active_nlist(X) -> ?LIB_MOD:active_nlist([{wildcard_support, false} | X]). 
active_rename(X) -> ?LIB_MOD:active_rename(X). 
active_delete(X) -> ?LIB_MOD:active_delete(X). 
active_mkdir(X) -> ?LIB_MOD:active_mkdir(X). 
active_send(X) -> ?LIB_MOD:active_send(X). 
active_send_bin(X) -> ?LIB_MOD:active_send_bin(X). 
active_send_chunk(X) -> ?LIB_MOD:active_send_chunk(X). 
active_append(X) -> ?LIB_MOD:active_append(X). 
active_append_bin(X) -> ?LIB_MOD:active_append_bin(X). 
active_append_chunk(X) -> ?LIB_MOD:active_append_chunk(X). 
active_recv(X) -> ?LIB_MOD:active_recv(X). 
active_recv_bin(X) -> ?LIB_MOD:active_recv_bin(X). 
active_recv_chunk(X) -> ?LIB_MOD:active_recv_chunk(X). 
active_type(X) -> ?LIB_MOD:active_type(X). 
active_quote(X) -> ?LIB_MOD:active_quote(X). 
active_ip_v6_disabled(X) -> ?LIB_MOD:active_ip_v6_disabled(X).
progress_report_send(X) -> ?LIB_MOD:progress_report_send(X).
progress_report_recv(X) -> ?LIB_MOD:progress_report_recv(X).

fin(Config) ->
    ?LIB_MOD:ftpd_fin(Config).