sl@0
|
1 |
//
|
sl@0
|
2 |
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
// All rights reserved.
|
sl@0
|
4 |
// This component and the accompanying materials are made available
|
sl@0
|
5 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
// which accompanies this distribution, and is available
|
sl@0
|
7 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
//
|
sl@0
|
9 |
// Initial Contributors:
|
sl@0
|
10 |
// Nokia Corporation - initial contribution.
|
sl@0
|
11 |
//
|
sl@0
|
12 |
// Contributors:
|
sl@0
|
13 |
//
|
sl@0
|
14 |
// Description:
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//! @file
|
sl@0
|
17 |
//! @SYMTestSuiteName pbase-f32-sfsrv-publicapi-os
|
sl@0
|
18 |
//! @SYMScriptTestEnvironment This test script requires a basic ROM.
|
sl@0
|
19 |
//! @SYMScriptAuthor Dmitri Trofimov
|
sl@0
|
20 |
//! @SYMScriptDescription The test script contains API tests for the following functions of TFindFile class:
|
sl@0
|
21 |
//! @SYMCreationDate 17/12/2006
|
sl@0
|
22 |
//! TFindFile(RFs &aFs);
|
sl@0
|
23 |
//! TInt FindByPath(const TDesC &aFileName, const TDesC *aPathList);
|
sl@0
|
24 |
//! TInt FindByDir(const TDesC &aFileName, const TDesC &aDirPath);
|
sl@0
|
25 |
//! TInt FindWildByPath(const TDesC &aFileName, const TDesC *aPathList, CDir *&aDirList);
|
sl@0
|
26 |
//! TInt FindWildByDir(const TDesC &aFileName, const TDesC &aDirPath, CDir *&aDir);
|
sl@0
|
27 |
//! TInt Find();
|
sl@0
|
28 |
//! TInt FindWild(CDir *&aDirList);
|
sl@0
|
29 |
//! const TDesC &File() const;
|
sl@0
|
30 |
|
sl@0
|
31 |
LOAD_SUITE T_SfSrv
|
sl@0
|
32 |
DELAY 5000
|
sl@0
|
33 |
|
sl@0
|
34 |
|
sl@0
|
35 |
START_TESTCASE SETUP_FILES
|
sl@0
|
36 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
37 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
38 |
CREATE_OBJECT CFileMan CFileMan1
|
sl@0
|
39 |
COMMAND RFs1 new
|
sl@0
|
40 |
COMMAND RFs1 Connect
|
sl@0
|
41 |
COMMAND RFs1 MkDirAll test_dir
|
sl@0
|
42 |
COMMAND RFs1 MkDirAll test_dir1
|
sl@0
|
43 |
COMMAND RFs1 MkDirAll test_dir2
|
sl@0
|
44 |
COMMAND CFileMan1 NewL fileman_fs
|
sl@0
|
45 |
COMMAND CFileMan1 Copy test_file1
|
sl@0
|
46 |
COMMAND CFileMan1 Close
|
sl@0
|
47 |
COMMAND CFileMan1 Copy test_file2
|
sl@0
|
48 |
COMMAND CFileMan1 Close
|
sl@0
|
49 |
COMMAND CFileMan1 Copy test_file3
|
sl@0
|
50 |
COMMAND CFileMan1 Close
|
sl@0
|
51 |
COMMAND CFileMan1 ~
|
sl@0
|
52 |
COMMAND RFs1 ~
|
sl@0
|
53 |
END_TEST_BLOCK
|
sl@0
|
54 |
END_TESTCASE SETUP_FILES
|
sl@0
|
55 |
|
sl@0
|
56 |
|
sl@0
|
57 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0001
|
sl@0
|
58 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0001
|
sl@0
|
59 |
//! @SYMAPI TFindFile
|
sl@0
|
60 |
//! @SYMTestCaseDesc TFindFile() passing a reference to a connected file session as a parameter. This tests for successful object creation and initialization.
|
sl@0
|
61 |
//! Uses API elements: TFindFile()
|
sl@0
|
62 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
63 |
//! 2. Call Connect().
|
sl@0
|
64 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
65 |
//!
|
sl@0
|
66 |
//! @SYMTestStatus Implemented
|
sl@0
|
67 |
//! @SYMTestPriority Critical
|
sl@0
|
68 |
//! @SYMTestExpectedResults Function does not leave nor panic
|
sl@0
|
69 |
//! @SYMTestType CIT
|
sl@0
|
70 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
71 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
72 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
73 |
COMMAND RFs1 new
|
sl@0
|
74 |
COMMAND RFs1 Connect
|
sl@0
|
75 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0001-command4new
|
sl@0
|
76 |
COMMAND TFindFile1 ~
|
sl@0
|
77 |
COMMAND RFs1 ~
|
sl@0
|
78 |
END_TEST_BLOCK
|
sl@0
|
79 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0001
|
sl@0
|
80 |
|
sl@0
|
81 |
|
sl@0
|
82 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0002
|
sl@0
|
83 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0002
|
sl@0
|
84 |
//! @SYMAPI TFindFile
|
sl@0
|
85 |
//! @SYMTestCaseDesc FindByPath() test. This tests for successful finding of a file.
|
sl@0
|
86 |
//! Uses API elements: FindByPath()
|
sl@0
|
87 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
88 |
//! 2. Call Connect().
|
sl@0
|
89 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
90 |
//! 4. Call FindByPath() passing file name "Test1.txt" and path "\base\t_sfsrv\t_findfile\test1\;\base\t_sfsrv\t_findfile\test2\" as arguments.
|
sl@0
|
91 |
//!
|
sl@0
|
92 |
//! @SYMTestStatus Implemented
|
sl@0
|
93 |
//! @SYMTestPriority Critical
|
sl@0
|
94 |
//! @SYMTestExpectedResults FindByPath returns KErrNone.
|
sl@0
|
95 |
//! @SYMTestType CIT
|
sl@0
|
96 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
97 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
98 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
99 |
CREATE_OBJECT TEntry TEntry1
|
sl@0
|
100 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
101 |
COMMAND RFs1 new
|
sl@0
|
102 |
COMMAND RFs1 Connect
|
sl@0
|
103 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0002-command4new
|
sl@0
|
104 |
COMMAND TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0002-command5FindByPath
|
sl@0
|
105 |
COMMAND TFindFile1 ~
|
sl@0
|
106 |
COMMAND RFs1 ~
|
sl@0
|
107 |
END_TEST_BLOCK
|
sl@0
|
108 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0002
|
sl@0
|
109 |
|
sl@0
|
110 |
|
sl@0
|
111 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0003
|
sl@0
|
112 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0003
|
sl@0
|
113 |
//! @SYMAPI TFindFile
|
sl@0
|
114 |
//! @SYMTestCaseDesc FindByPath() negative test. This tests for function returning KErrNotFound when the file cannot be found.
|
sl@0
|
115 |
//! Uses API elements: FindByPath()
|
sl@0
|
116 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
117 |
//! 2. Call Connect().
|
sl@0
|
118 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
119 |
//! 4. Call FindByPath() passing file name "Test3.txt" and path "\base\t_sfsrv\t_findfile\test1\;\base\t_sfsrv\t_findfile\test2\" as arguments.
|
sl@0
|
120 |
//!
|
sl@0
|
121 |
//! @SYMTestStatus Implemented
|
sl@0
|
122 |
//! @SYMTestPriority Critical
|
sl@0
|
123 |
//! @SYMTestExpectedResults FindByPath returns KErrNotFound.
|
sl@0
|
124 |
//! @SYMTestType CIT
|
sl@0
|
125 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
126 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
127 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
128 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
129 |
COMMAND RFs1 new
|
sl@0
|
130 |
COMMAND RFs1 Connect
|
sl@0
|
131 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0003-command4new
|
sl@0
|
132 |
COMMAND !Error=-1 TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0003-command5FindByPath
|
sl@0
|
133 |
COMMAND TFindFile1 ~
|
sl@0
|
134 |
COMMAND RFs1 ~
|
sl@0
|
135 |
END_TEST_BLOCK
|
sl@0
|
136 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0003
|
sl@0
|
137 |
|
sl@0
|
138 |
|
sl@0
|
139 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0004
|
sl@0
|
140 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0004
|
sl@0
|
141 |
//! @SYMAPI TFindFile
|
sl@0
|
142 |
//! @SYMTestCaseDesc FindByPath() negative test. This test for function returning KErrArgument when filename is empty.
|
sl@0
|
143 |
//! Uses API elements: FindByPath()
|
sl@0
|
144 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
145 |
//! 2. Call Connect().
|
sl@0
|
146 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
147 |
//! 4. Call FindByPath() passing file empty name and path "\base\t_sfsrv\t_findfile\test1\;\base\t_sfsrv\t_findfile\test2\" as arguments.
|
sl@0
|
148 |
//!
|
sl@0
|
149 |
//! @SYMTestStatus Implemented
|
sl@0
|
150 |
//! @SYMTestPriority Critical
|
sl@0
|
151 |
//! @SYMTestExpectedResults FindByPath returns KErrArgument.
|
sl@0
|
152 |
//! @SYMTestType CIT
|
sl@0
|
153 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
154 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
155 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
156 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
157 |
COMMAND RFs1 new
|
sl@0
|
158 |
COMMAND RFs1 Connect
|
sl@0
|
159 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0004-command4new
|
sl@0
|
160 |
COMMAND !Error=-6 TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0004-command5FindByPath
|
sl@0
|
161 |
COMMAND TFindFile1 ~
|
sl@0
|
162 |
COMMAND RFs1 ~
|
sl@0
|
163 |
END_TEST_BLOCK
|
sl@0
|
164 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0004
|
sl@0
|
165 |
|
sl@0
|
166 |
|
sl@0
|
167 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0005
|
sl@0
|
168 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0005
|
sl@0
|
169 |
//! @SYMAPI TFindFile
|
sl@0
|
170 |
//! @SYMTestCaseDesc FindByPath() negative test. This test for function returning KErrArgument when filename and path is empty.
|
sl@0
|
171 |
//! Uses API elements: FindByPath()
|
sl@0
|
172 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
173 |
//! 2. Call Connect().
|
sl@0
|
174 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
175 |
//! 4. Call FindByPath() passing file empty name and empty path as arguments.
|
sl@0
|
176 |
//!
|
sl@0
|
177 |
//! @SYMTestStatus Implemented
|
sl@0
|
178 |
//! @SYMTestPriority Critical
|
sl@0
|
179 |
//! @SYMTestExpectedResults FindByPath returns KErrArgument.
|
sl@0
|
180 |
//! @SYMTestType CIT
|
sl@0
|
181 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
182 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
183 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
184 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
185 |
COMMAND RFs1 new
|
sl@0
|
186 |
COMMAND RFs1 Connect
|
sl@0
|
187 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0005-command4new
|
sl@0
|
188 |
COMMAND !Error=-6 TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0005-command5FindByPath
|
sl@0
|
189 |
COMMAND TFindFile1 ~
|
sl@0
|
190 |
COMMAND RFs1 ~
|
sl@0
|
191 |
END_TEST_BLOCK
|
sl@0
|
192 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0005
|
sl@0
|
193 |
|
sl@0
|
194 |
|
sl@0
|
195 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0006
|
sl@0
|
196 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0006
|
sl@0
|
197 |
//! @SYMAPI TFindFile
|
sl@0
|
198 |
//! @SYMTestCaseDesc FindByPath() negative test where filename has wildcard and other characters.
|
sl@0
|
199 |
//! Uses API elements: FindByPath()
|
sl@0
|
200 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
201 |
//! 2. Call Connect().
|
sl@0
|
202 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
203 |
//! 4. Call FindByPath() passing file name "$%&?*" and path "\" as arguments.
|
sl@0
|
204 |
//!
|
sl@0
|
205 |
//! @SYMTestStatus Implemented
|
sl@0
|
206 |
//! @SYMTestPriority Critical
|
sl@0
|
207 |
//! @SYMTestExpectedResults FindByPath returns KErrNotFound.
|
sl@0
|
208 |
//! @SYMTestType CIT
|
sl@0
|
209 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
210 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
211 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
212 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
213 |
COMMAND RFs1 new
|
sl@0
|
214 |
COMMAND RFs1 Connect
|
sl@0
|
215 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0006-command4new
|
sl@0
|
216 |
COMMAND !Error=-1 TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0006-command5FindByPath
|
sl@0
|
217 |
COMMAND TFindFile1 ~
|
sl@0
|
218 |
COMMAND RFs1 ~
|
sl@0
|
219 |
END_TEST_BLOCK
|
sl@0
|
220 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0006
|
sl@0
|
221 |
|
sl@0
|
222 |
|
sl@0
|
223 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0007
|
sl@0
|
224 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0007
|
sl@0
|
225 |
//! @SYMAPI TFindFile
|
sl@0
|
226 |
//! @SYMTestCaseDesc FindByPath() negative test where path has wildcard and other characters.
|
sl@0
|
227 |
//! Uses API elements: FindByPath()
|
sl@0
|
228 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
229 |
//! 2. Call Connect().
|
sl@0
|
230 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
231 |
//! 4. Call FindByPath() passing file name "a" and path "$%&*?" as arguments.
|
sl@0
|
232 |
//!
|
sl@0
|
233 |
//! @SYMTestStatus Implemented
|
sl@0
|
234 |
//! @SYMTestPriority Critical
|
sl@0
|
235 |
//! @SYMTestExpectedResults FindByPath returns KErrNotFound.
|
sl@0
|
236 |
//! @SYMTestType CIT
|
sl@0
|
237 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
238 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
239 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
240 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
241 |
COMMAND RFs1 new
|
sl@0
|
242 |
COMMAND RFs1 Connect
|
sl@0
|
243 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0007-command4new
|
sl@0
|
244 |
COMMAND !Error=-1 TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0007-command5FindByPath
|
sl@0
|
245 |
COMMAND TFindFile1 ~
|
sl@0
|
246 |
COMMAND RFs1 ~
|
sl@0
|
247 |
END_TEST_BLOCK
|
sl@0
|
248 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0007
|
sl@0
|
249 |
|
sl@0
|
250 |
|
sl@0
|
251 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0008
|
sl@0
|
252 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0008
|
sl@0
|
253 |
//! @SYMAPI TFindFile
|
sl@0
|
254 |
//! @SYMTestCaseDesc FindByDir() test. This test for successful finding of file.
|
sl@0
|
255 |
//! Uses API elements: FindByDir()
|
sl@0
|
256 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
257 |
//! 2. Call Connect().
|
sl@0
|
258 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
259 |
//! 4. Call FindByDir() passing file name "Test1.txt" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
|
sl@0
|
260 |
//!
|
sl@0
|
261 |
//! @SYMTestStatus Implemented
|
sl@0
|
262 |
//! @SYMTestPriority Critical
|
sl@0
|
263 |
//! @SYMTestExpectedResults FindByDir() returns KErrNone.
|
sl@0
|
264 |
//! @SYMTestType CIT
|
sl@0
|
265 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
266 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
267 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
268 |
CREATE_OBJECT TEntry TEntry1
|
sl@0
|
269 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
270 |
COMMAND RFs1 new
|
sl@0
|
271 |
COMMAND RFs1 Connect
|
sl@0
|
272 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0008-command4new
|
sl@0
|
273 |
COMMAND TFindFile1 FindByDir PBASE-F32-FindFile-PublicApi-0008-command5FindByDir
|
sl@0
|
274 |
COMMAND TFindFile1 ~
|
sl@0
|
275 |
COMMAND RFs1 ~
|
sl@0
|
276 |
END_TEST_BLOCK
|
sl@0
|
277 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0008
|
sl@0
|
278 |
|
sl@0
|
279 |
|
sl@0
|
280 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0009
|
sl@0
|
281 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0009
|
sl@0
|
282 |
//! @SYMAPI TFindFile
|
sl@0
|
283 |
//! @SYMTestCaseDesc FindByDir() negative test. This tests for function returning KErrNotFound when the file cannot be found.
|
sl@0
|
284 |
//! Uses API elements: FindByDir()
|
sl@0
|
285 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
286 |
//! 2. Call Connect().
|
sl@0
|
287 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
288 |
//! 4. Call FindByDir() passing file name "Test3.txt" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
|
sl@0
|
289 |
//!
|
sl@0
|
290 |
//! @SYMTestStatus Implemented
|
sl@0
|
291 |
//! @SYMTestPriority Critical
|
sl@0
|
292 |
//! @SYMTestExpectedResults FindByDir() returns KErrNotFound.
|
sl@0
|
293 |
//! @SYMTestType CIT
|
sl@0
|
294 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
295 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
296 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
297 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
298 |
COMMAND RFs1 new
|
sl@0
|
299 |
COMMAND RFs1 Connect
|
sl@0
|
300 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0009-command4new
|
sl@0
|
301 |
COMMAND !Error=-1 TFindFile1 FindByDir PBASE-F32-FindFile-PublicApi-0009-command5FindByDir
|
sl@0
|
302 |
COMMAND TFindFile1 ~
|
sl@0
|
303 |
COMMAND RFs1 ~
|
sl@0
|
304 |
END_TEST_BLOCK
|
sl@0
|
305 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0009
|
sl@0
|
306 |
|
sl@0
|
307 |
|
sl@0
|
308 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0010
|
sl@0
|
309 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0010
|
sl@0
|
310 |
//! @SYMAPI TFindFile
|
sl@0
|
311 |
//! @SYMTestCaseDesc FindByDir() negative test. This tests for function returning KErrArgument when file name is empty.
|
sl@0
|
312 |
//! Uses API elements: FindByDir()
|
sl@0
|
313 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
314 |
//! 2. Call Connect().
|
sl@0
|
315 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
316 |
//! 4. Call FindByDir() passing file empty name and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
|
sl@0
|
317 |
//!
|
sl@0
|
318 |
//! @SYMTestStatus Implemented
|
sl@0
|
319 |
//! @SYMTestPriority Critical
|
sl@0
|
320 |
//! @SYMTestExpectedResults FindByDir() returns KErrArgument.
|
sl@0
|
321 |
//! @SYMTestType CIT
|
sl@0
|
322 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
323 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
324 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
325 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
326 |
COMMAND RFs1 new
|
sl@0
|
327 |
COMMAND RFs1 Connect
|
sl@0
|
328 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0010-command4new
|
sl@0
|
329 |
COMMAND !Error=-6 TFindFile1 FindByDir PBASE-F32-FindFile-PublicApi-0010-command5FindByDir
|
sl@0
|
330 |
COMMAND TFindFile1 ~
|
sl@0
|
331 |
COMMAND RFs1 ~
|
sl@0
|
332 |
END_TEST_BLOCK
|
sl@0
|
333 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0010
|
sl@0
|
334 |
|
sl@0
|
335 |
|
sl@0
|
336 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0011
|
sl@0
|
337 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0011
|
sl@0
|
338 |
//! @SYMAPI TFindFile
|
sl@0
|
339 |
//! @SYMTestCaseDesc FindWildByPath() test. This tests for successful finding of file with wildcard.
|
sl@0
|
340 |
//! Uses API elements: FindWildByPath()
|
sl@0
|
341 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
342 |
//! 2. Call Connect().
|
sl@0
|
343 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
344 |
//! 4. Call FindWildByPath() passing file name "Test?.*" and path "\base\t_sfsrv\t_findfile\test1\;\base\t_sfsrv\t_findfile\test2\" as arguments.
|
sl@0
|
345 |
//!
|
sl@0
|
346 |
//! @SYMTestStatus Implemented
|
sl@0
|
347 |
//! @SYMTestPriority Critical
|
sl@0
|
348 |
//! @SYMTestExpectedResults FindWildByPath() returns KErrNone.
|
sl@0
|
349 |
//! @SYMTestType CIT
|
sl@0
|
350 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
351 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
352 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
353 |
CREATE_OBJECT TEntry TEntry1
|
sl@0
|
354 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
355 |
COMMAND RFs1 new
|
sl@0
|
356 |
COMMAND RFs1 Connect
|
sl@0
|
357 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0011-command4new
|
sl@0
|
358 |
COMMAND TFindFile1 FindWildByPath PBASE-F32-FindFile-PublicApi-0011-command5FindWildByPath
|
sl@0
|
359 |
//!//!COMMAND TFindFile1 cleanup
|
sl@0
|
360 |
COMMAND TFindFile1 ~
|
sl@0
|
361 |
COMMAND RFs1 ~
|
sl@0
|
362 |
END_TEST_BLOCK
|
sl@0
|
363 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0011
|
sl@0
|
364 |
|
sl@0
|
365 |
|
sl@0
|
366 |
|
sl@0
|
367 |
|
sl@0
|
368 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0012
|
sl@0
|
369 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0012
|
sl@0
|
370 |
//! @SYMAPI TFindFile
|
sl@0
|
371 |
//! @SYMTestCaseDesc FindWildByPath() negative test. This tests for function returning KErrNotFound when the file cannot be found.
|
sl@0
|
372 |
//! Uses API elements: FindWildByPath()
|
sl@0
|
373 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
374 |
//! 2. Call Connect().
|
sl@0
|
375 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
376 |
//! 4. Call FindWildByPath() passing file name "?ester.*" and path "\base\t_sfsrv\t_findfile\test1\;\base\t_sfsrv\t_findfile\test2\" as arguments.
|
sl@0
|
377 |
//!
|
sl@0
|
378 |
//! @SYMTestStatus Implemented
|
sl@0
|
379 |
//! @SYMTestPriority Critical
|
sl@0
|
380 |
//! @SYMTestExpectedResults FindWildByPath() returns KErrNotFound.
|
sl@0
|
381 |
//! @SYMTestType CIT
|
sl@0
|
382 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
383 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
384 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
385 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
386 |
COMMAND RFs1 new
|
sl@0
|
387 |
COMMAND RFs1 Connect
|
sl@0
|
388 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0012-command4new
|
sl@0
|
389 |
COMMAND !Error=-1 TFindFile1 FindWildByPath PBASE-F32-FindFile-PublicApi-0012-command5FindWildByPath
|
sl@0
|
390 |
//!//!COMMAND TFindFile1 cleanup
|
sl@0
|
391 |
COMMAND TFindFile1 ~
|
sl@0
|
392 |
COMMAND RFs1 ~
|
sl@0
|
393 |
END_TEST_BLOCK
|
sl@0
|
394 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0012
|
sl@0
|
395 |
|
sl@0
|
396 |
|
sl@0
|
397 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0013
|
sl@0
|
398 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0013
|
sl@0
|
399 |
//! @SYMAPI TFindFile
|
sl@0
|
400 |
//! @SYMTestCaseDesc FindWildByPath() negative test. This tests for function returning KErrArgument when the file cannot be found.
|
sl@0
|
401 |
//! Uses API elements: FindWildByPath()
|
sl@0
|
402 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
403 |
//! 2. Call Connect().
|
sl@0
|
404 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
405 |
//! 4. Call FindWildByPath() passing file empry name and path "\base\t_sfsrv\t_findfile\test1\;\base\t_sfsrv\t_findfile\test2\" as arguments.
|
sl@0
|
406 |
//!
|
sl@0
|
407 |
//!
|
sl@0
|
408 |
//! @SYMTestStatus Implemented
|
sl@0
|
409 |
//! @SYMTestPriority Critical
|
sl@0
|
410 |
//! @SYMTestExpectedResults FindWildByPath() returns KErrArgument.
|
sl@0
|
411 |
//! @SYMTestType CIT
|
sl@0
|
412 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
413 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
414 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
415 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
416 |
COMMAND RFs1 new
|
sl@0
|
417 |
COMMAND RFs1 Connect
|
sl@0
|
418 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0013-command4new
|
sl@0
|
419 |
COMMAND !Error=-6 TFindFile1 FindWildByPath PBASE-F32-FindFile-PublicApi-0013-command5FindWildByPath
|
sl@0
|
420 |
//!COMMAND TFindFile1 cleanup
|
sl@0
|
421 |
COMMAND TFindFile1 ~
|
sl@0
|
422 |
COMMAND RFs1 ~
|
sl@0
|
423 |
END_TEST_BLOCK
|
sl@0
|
424 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0013
|
sl@0
|
425 |
|
sl@0
|
426 |
|
sl@0
|
427 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0014
|
sl@0
|
428 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0014
|
sl@0
|
429 |
//! @SYMAPI TFindFile
|
sl@0
|
430 |
//! @SYMTestCaseDesc FindWildByDir() test. This tests for successful finding of file with wildcard in name.
|
sl@0
|
431 |
//! Uses API elements: FindWildByDir()
|
sl@0
|
432 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
433 |
//! 2. Call Connect().
|
sl@0
|
434 |
//! 3. Create TFindFile object passing a reference to a connected file session as a parameter.
|
sl@0
|
435 |
//! 4. Call FindWildByDir() passing file name "Test?.*" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
|
sl@0
|
436 |
//!
|
sl@0
|
437 |
//! @SYMTestStatus Implemented
|
sl@0
|
438 |
//! @SYMTestPriority Critical
|
sl@0
|
439 |
//! @SYMTestExpectedResults FindWildByDir() returns KErrNone.
|
sl@0
|
440 |
//! @SYMTestType CIT
|
sl@0
|
441 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
442 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
443 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
444 |
CREATE_OBJECT TEntry TEntry1
|
sl@0
|
445 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
446 |
COMMAND RFs1 new
|
sl@0
|
447 |
COMMAND RFs1 Connect
|
sl@0
|
448 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0014-command4new
|
sl@0
|
449 |
COMMAND TFindFile1 FindWildByDir PBASE-F32-FindFile-PublicApi-0014-command5FindWildByDir
|
sl@0
|
450 |
COMMAND TFindFile1 ~
|
sl@0
|
451 |
COMMAND RFs1 ~
|
sl@0
|
452 |
END_TEST_BLOCK
|
sl@0
|
453 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0014
|
sl@0
|
454 |
|
sl@0
|
455 |
|
sl@0
|
456 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0015
|
sl@0
|
457 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0015
|
sl@0
|
458 |
//! @SYMAPI TFindFile
|
sl@0
|
459 |
//! @SYMTestCaseDesc FindWildByDir() negative test. This test for function returning KErrNotFound when the file cannont be found.
|
sl@0
|
460 |
//! Uses API elements: FindWildByDir()
|
sl@0
|
461 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
462 |
//! 2. Call Connect().
|
sl@0
|
463 |
//! 3. Create TFindFile object passing a reference to a connected file session as a parameter.
|
sl@0
|
464 |
//! 4. Call FindWildByDir() passing file name "?ester.*" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
|
sl@0
|
465 |
//!
|
sl@0
|
466 |
//! @SYMTestStatus Implemented
|
sl@0
|
467 |
//! @SYMTestPriority Critical
|
sl@0
|
468 |
//! @SYMTestExpectedResults FindWildByDir() returns KErrNotFound.
|
sl@0
|
469 |
//! @SYMTestType CIT
|
sl@0
|
470 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
471 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
472 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
473 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
474 |
COMMAND RFs1 new
|
sl@0
|
475 |
COMMAND RFs1 Connect
|
sl@0
|
476 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0015-command4new
|
sl@0
|
477 |
COMMAND !Error=-1 TFindFile1 FindWildByDir PBASE-F32-FindFile-PublicApi-0015-command5FindWildByDir
|
sl@0
|
478 |
COMMAND TFindFile1 ~
|
sl@0
|
479 |
COMMAND RFs1 ~
|
sl@0
|
480 |
END_TEST_BLOCK
|
sl@0
|
481 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0015
|
sl@0
|
482 |
|
sl@0
|
483 |
|
sl@0
|
484 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0016
|
sl@0
|
485 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0016
|
sl@0
|
486 |
//! @SYMAPI TFindFile
|
sl@0
|
487 |
//! @SYMTestCaseDesc FindWildByDir() negative test. This tests function returning KErrArgument when the file name is empty.
|
sl@0
|
488 |
//! Uses API elements: FindWildByDir()
|
sl@0
|
489 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
490 |
//! 2. Call Connect().
|
sl@0
|
491 |
//! 3. Create TFindFile object passing a reference to a connected file session as a parameter.
|
sl@0
|
492 |
//! 4. Call FindWildByDir() passing file empty name and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
|
sl@0
|
493 |
//!
|
sl@0
|
494 |
//! @SYMTestStatus Implemented
|
sl@0
|
495 |
//! @SYMTestPriority Critical
|
sl@0
|
496 |
//! @SYMTestExpectedResults FindWildByDir() returns KErrArgument.
|
sl@0
|
497 |
//! @SYMTestType CIT
|
sl@0
|
498 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
499 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
500 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
501 |
COMMAND RFs1 new
|
sl@0
|
502 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
503 |
COMMAND RFs1 Connect
|
sl@0
|
504 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0016-command4new
|
sl@0
|
505 |
COMMAND !Error=-6 TFindFile1 FindWildByDir PBASE-F32-FindFile-PublicApi-0016-command5FindWildByDir
|
sl@0
|
506 |
//!COMMAND TFindFile1 cleanup
|
sl@0
|
507 |
COMMAND TFindFile1 ~
|
sl@0
|
508 |
COMMAND RFs1 ~
|
sl@0
|
509 |
END_TEST_BLOCK
|
sl@0
|
510 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0016
|
sl@0
|
511 |
|
sl@0
|
512 |
|
sl@0
|
513 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0017
|
sl@0
|
514 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0017
|
sl@0
|
515 |
//! @SYMAPI TFindFile
|
sl@0
|
516 |
//! @SYMTestCaseDesc Find() test. This tests for successful finding of file after FindByPath() call.
|
sl@0
|
517 |
//! Uses API elements: FindByPath(), Find()
|
sl@0
|
518 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
519 |
//! 2. Call Connect().
|
sl@0
|
520 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
521 |
//! 4. Call FindByPath() passing file name "Test1.txt" and path "\base\t_sfsrv\t_findfile\test1\;\base\t_sfsrv\t_findfile\test2\" as arguments.
|
sl@0
|
522 |
//! 5. Call Find().
|
sl@0
|
523 |
//! 6. Call File() with checking that value is '\base\t_sfsrv\t_findfile\test2\Test1.txt'
|
sl@0
|
524 |
//!
|
sl@0
|
525 |
//! @SYMTestStatus Implemented
|
sl@0
|
526 |
//! @SYMTestPriority Critical
|
sl@0
|
527 |
//! @SYMTestExpectedResults Find() returns KErrNone.
|
sl@0
|
528 |
//! @SYMTestType CIT
|
sl@0
|
529 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
530 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
531 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
532 |
CREATE_OBJECT TEntry TEntry1
|
sl@0
|
533 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
534 |
COMMAND RFs1 new
|
sl@0
|
535 |
COMMAND RFs1 Connect
|
sl@0
|
536 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0017-command4new
|
sl@0
|
537 |
COMMAND TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0017-command5FindByPath
|
sl@0
|
538 |
COMMAND TFindFile1 Find
|
sl@0
|
539 |
COMMAND TFindFile1 File correct_file_path2
|
sl@0
|
540 |
COMMAND TFindFile1 ~
|
sl@0
|
541 |
COMMAND RFs1 ~
|
sl@0
|
542 |
END_TEST_BLOCK
|
sl@0
|
543 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0017
|
sl@0
|
544 |
|
sl@0
|
545 |
|
sl@0
|
546 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0018
|
sl@0
|
547 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0018
|
sl@0
|
548 |
//! @SYMAPI TFindFile
|
sl@0
|
549 |
//! @SYMTestCaseDesc Find() negative test. This tests for function returning KErrNotFound when file cannot be found after FindByPath() call.
|
sl@0
|
550 |
//! Uses API elements: FindByPath(), Find()
|
sl@0
|
551 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
552 |
//! 2. Call Connect().
|
sl@0
|
553 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
554 |
//! 4. Call FindByPath() passing file name "Test2.txt" and path "\base\t_sfsrv\t_findfile\test1\;\base\t_sfsrv\t_findfile\test2\" as arguments.
|
sl@0
|
555 |
//! 5. Call Find().
|
sl@0
|
556 |
//!
|
sl@0
|
557 |
//! @SYMTestStatus Implemented
|
sl@0
|
558 |
//! @SYMTestPriority Critical
|
sl@0
|
559 |
//! @SYMTestExpectedResults Find() returns KErrNotFound.
|
sl@0
|
560 |
//! @SYMTestType CIT
|
sl@0
|
561 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
562 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
563 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
564 |
COMMAND RFs1 new
|
sl@0
|
565 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
566 |
COMMAND RFs1 Connect
|
sl@0
|
567 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0018-command4new
|
sl@0
|
568 |
COMMAND TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0018-command5FindByPath
|
sl@0
|
569 |
COMMAND !Error=-1 TFindFile1 Find
|
sl@0
|
570 |
COMMAND TFindFile1 ~
|
sl@0
|
571 |
COMMAND RFs1 ~
|
sl@0
|
572 |
END_TEST_BLOCK
|
sl@0
|
573 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0018
|
sl@0
|
574 |
|
sl@0
|
575 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0020
|
sl@0
|
576 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0020
|
sl@0
|
577 |
//! @SYMAPI TFindFile
|
sl@0
|
578 |
//! @SYMTestCaseDesc Find() negative test. This tests for function returning KErrNotFound when file cannot be found after
|
sl@0
|
579 |
//! FindByDir() call.
|
sl@0
|
580 |
//! Uses API elements: FindByDir(), Find()
|
sl@0
|
581 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
582 |
//! 2. Create RFile object
|
sl@0
|
583 |
//! 3. Call Rfs::Connect().
|
sl@0
|
584 |
//! 4. Call RFile::Create() and pass name "temp.txt" as parameter.
|
sl@0
|
585 |
//! 5. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
586 |
//! 6. Call FindByDir() passing file name "temp.txt" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
|
sl@0
|
587 |
//! 7. Call Find().
|
sl@0
|
588 |
//! 8. Call RFs::Delete() and pass name "temp.txt" as parameter.
|
sl@0
|
589 |
//!
|
sl@0
|
590 |
//! @SYMTestStatus Implemented
|
sl@0
|
591 |
//! @SYMTestPriority Critical
|
sl@0
|
592 |
//! @SYMTestExpectedResults Second Find() returns KErrNotFound.
|
sl@0
|
593 |
//! @SYMTestType CIT
|
sl@0
|
594 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
595 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
596 |
CREATE_OBJECT RFile RFile1
|
sl@0
|
597 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
598 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
599 |
COMMAND RFs1 new
|
sl@0
|
600 |
COMMAND RFile1 new
|
sl@0
|
601 |
COMMAND RFs1 Connect
|
sl@0
|
602 |
COMMAND RFile1 Create PBASE-F32-FindFile-PublicApi-0020-command1Create
|
sl@0
|
603 |
COMMAND RFile1 Close
|
sl@0
|
604 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0020-command4new
|
sl@0
|
605 |
COMMAND TFindFile1 FindByDir PBASE-F32-FindFile-PublicApi-0020-command5FindByDir
|
sl@0
|
606 |
COMMAND !Error=-1 TFindFile1 Find
|
sl@0
|
607 |
COMMAND TFindFile1 ~
|
sl@0
|
608 |
COMMAND RFs1 Delete PBASE-F32-FindFile-PublicApi-0020-command6Delete
|
sl@0
|
609 |
COMMAND RFile1 ~
|
sl@0
|
610 |
COMMAND RFs1 ~
|
sl@0
|
611 |
END_TEST_BLOCK
|
sl@0
|
612 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0020
|
sl@0
|
613 |
|
sl@0
|
614 |
|
sl@0
|
615 |
|
sl@0
|
616 |
|
sl@0
|
617 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0021
|
sl@0
|
618 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0021
|
sl@0
|
619 |
//! @SYMAPI TFindFile
|
sl@0
|
620 |
//! @SYMTestCaseDesc FindWild() test. This test for successful finding of file ather FindWildByPath() call.
|
sl@0
|
621 |
//! Uses API elements: FindWildByPath(), FindWild()
|
sl@0
|
622 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
623 |
//! 2. Call Connect().
|
sl@0
|
624 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
625 |
//! 4. Call FindWildByPath() passing file name "Test1.*" and path "\base\t_sfsrv\t_findfile\test1\;\base\t_sfsrv\t_findfile\test2\" as arguments.
|
sl@0
|
626 |
//! 5. Call FindWild()
|
sl@0
|
627 |
//!
|
sl@0
|
628 |
//! @SYMTestStatus Implemented
|
sl@0
|
629 |
//! @SYMTestPriority Critical
|
sl@0
|
630 |
//! @SYMTestExpectedResults FindWild() returns KErrNone.
|
sl@0
|
631 |
//! @SYMTestType CIT
|
sl@0
|
632 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
633 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
634 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
635 |
CREATE_OBJECT TEntry TEntry1
|
sl@0
|
636 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
637 |
COMMAND RFs1 new
|
sl@0
|
638 |
COMMAND RFs1 Connect
|
sl@0
|
639 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0021-command4new
|
sl@0
|
640 |
COMMAND TFindFile1 FindWildByPath PBASE-F32-FindFile-PublicApi-0021-command5FindWildByPath
|
sl@0
|
641 |
COMMAND TFindFile1 FindWild common_dir_wrapper
|
sl@0
|
642 |
COMMAND TFindFile1 ~
|
sl@0
|
643 |
COMMAND RFs1 ~
|
sl@0
|
644 |
END_TEST_BLOCK
|
sl@0
|
645 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0021
|
sl@0
|
646 |
|
sl@0
|
647 |
|
sl@0
|
648 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0022
|
sl@0
|
649 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0022
|
sl@0
|
650 |
//! @SYMAPI TFindFile
|
sl@0
|
651 |
//! @SYMTestCaseDesc FindWild() negative test. This test for function returning KErrNotFound if file cannot be found after FindWildByPath() call.
|
sl@0
|
652 |
//! Uses API elements: FindWildByPath(), FindWild()
|
sl@0
|
653 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
654 |
//! 2. Call Connect().
|
sl@0
|
655 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
656 |
//! 4. Call FindWildByPath() passing file name "Test2.txt" and path "\base\t_sfsrv\t_findfile\test1\;\base\t_sfsrv\t_findfile\test2\" as arguments.
|
sl@0
|
657 |
//! 5. Call FindWild()
|
sl@0
|
658 |
//!
|
sl@0
|
659 |
//! @SYMTestStatus Implemented
|
sl@0
|
660 |
//! @SYMTestPriority Critical
|
sl@0
|
661 |
//! @SYMTestExpectedResults FindWild() returns KErrNotFound.
|
sl@0
|
662 |
//! @SYMTestType CIT
|
sl@0
|
663 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
664 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
665 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
666 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
667 |
COMMAND RFs1 new
|
sl@0
|
668 |
COMMAND RFs1 Connect
|
sl@0
|
669 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0022-command4new
|
sl@0
|
670 |
COMMAND TFindFile1 FindWildByPath PBASE-F32-FindFile-PublicApi-0022-command5FindWildByPath
|
sl@0
|
671 |
COMMAND !Error=-1 TFindFile1 FindWild common_dir_wrapper
|
sl@0
|
672 |
COMMAND TFindFile1 ~
|
sl@0
|
673 |
COMMAND RFs1 ~
|
sl@0
|
674 |
END_TEST_BLOCK
|
sl@0
|
675 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0022
|
sl@0
|
676 |
|
sl@0
|
677 |
|
sl@0
|
678 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0024
|
sl@0
|
679 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0024
|
sl@0
|
680 |
//! @SYMAPI TFindFile
|
sl@0
|
681 |
//! @SYMTestCaseDesc FindWild() negative test. This test for function returning KErrNotFound if file cannot be found after FindWildByDir() call.
|
sl@0
|
682 |
//! Uses API elements: FindWildByDir(), FindWild()
|
sl@0
|
683 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
684 |
//! 2. Create RFile object
|
sl@0
|
685 |
//! 3. Call Connect().
|
sl@0
|
686 |
//! 4. Call RFile::Create() and pass name "temp.txt" as parameter.
|
sl@0
|
687 |
//! 5. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
688 |
//! 6. Call FindWildByDir() passing file name "temp.*" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
|
sl@0
|
689 |
//! 7. Call FindWild()
|
sl@0
|
690 |
//! 8. Call RFs::Delete() and pass name "temp.txt" as parameter.
|
sl@0
|
691 |
//!
|
sl@0
|
692 |
//! @SYMTestStatus Implemented
|
sl@0
|
693 |
//! @SYMTestPriority Critical
|
sl@0
|
694 |
//! @SYMTestExpectedResults Both FindWild() returns KErrNotFound.
|
sl@0
|
695 |
//! @SYMTestType CIT
|
sl@0
|
696 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
697 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
698 |
CREATE_OBJECT RFile RFile1
|
sl@0
|
699 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
700 |
CREATE_OBJECT TEntry TEntry1
|
sl@0
|
701 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
702 |
COMMAND RFs1 new
|
sl@0
|
703 |
COMMAND RFile1 new
|
sl@0
|
704 |
COMMAND RFs1 Connect
|
sl@0
|
705 |
COMMAND RFile1 Create PBASE-F32-FindFile-PublicApi-0024-command1Create
|
sl@0
|
706 |
COMMAND RFile1 Close
|
sl@0
|
707 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0024-command4new
|
sl@0
|
708 |
COMMAND TFindFile1 FindWildByDir PBASE-F32-FindFile-PublicApi-0024-command5FindWildByDir
|
sl@0
|
709 |
COMMAND !Error=-1 TFindFile1 FindWild common_dir_wrapper
|
sl@0
|
710 |
COMMAND TFindFile1 ~
|
sl@0
|
711 |
COMMAND RFs1 Delete PBASE-F32-FindFile-PublicApi-0024-command6Delete
|
sl@0
|
712 |
COMMAND RFile1 ~
|
sl@0
|
713 |
COMMAND RFs1 ~
|
sl@0
|
714 |
END_TEST_BLOCK
|
sl@0
|
715 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0024
|
sl@0
|
716 |
|
sl@0
|
717 |
|
sl@0
|
718 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0025
|
sl@0
|
719 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0025
|
sl@0
|
720 |
//! @SYMAPI TFindFile
|
sl@0
|
721 |
//! @SYMTestCaseDesc FindByPath() test. This tests for function to return correct data.
|
sl@0
|
722 |
//! Uses API elements: FindByPath(), File()
|
sl@0
|
723 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
724 |
//! 2. Call Connect().
|
sl@0
|
725 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
726 |
//! 4. Call FindByPath() passing file name "Test1.txt" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
|
sl@0
|
727 |
//! 5. Call File() with checking that value is '\base\t_sfsrv\t_findfile\test1\Test1.txt'
|
sl@0
|
728 |
//!
|
sl@0
|
729 |
//! @SYMTestStatus Implemented
|
sl@0
|
730 |
//! @SYMTestPriority Critical
|
sl@0
|
731 |
//! @SYMTestExpectedResults File returns "\base\t_sfsrv\t_findfile\test1\Test1.txt".
|
sl@0
|
732 |
//! @SYMTestType CIT
|
sl@0
|
733 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
734 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
735 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
736 |
CREATE_OBJECT TEntry TEntry1
|
sl@0
|
737 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
738 |
COMMAND RFs1 new
|
sl@0
|
739 |
COMMAND RFs1 Connect
|
sl@0
|
740 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0025-command4new
|
sl@0
|
741 |
COMMAND TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0025-command5FindByPath
|
sl@0
|
742 |
COMMAND TFindFile1 File correct_file_path
|
sl@0
|
743 |
COMMAND TFindFile1 ~
|
sl@0
|
744 |
COMMAND RFs1 ~
|
sl@0
|
745 |
END_TEST_BLOCK
|
sl@0
|
746 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0025
|
sl@0
|
747 |
|
sl@0
|
748 |
|
sl@0
|
749 |
|
sl@0
|
750 |
|
sl@0
|
751 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0027
|
sl@0
|
752 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0027
|
sl@0
|
753 |
//! @SYMAPI TFindFile
|
sl@0
|
754 |
//! @SYMTestCaseDesc FindWildByDir() test. This tests for successful finding of file without wildcard in name.
|
sl@0
|
755 |
//! Uses API elements: FindWildByDir()
|
sl@0
|
756 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
757 |
//! 2. Call Connect().
|
sl@0
|
758 |
//! 3. Create TFindFile object passing a reference to a connected file session as a parameter.
|
sl@0
|
759 |
//! 4. Call FindWildByDir() passing file name "Test1.txt" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
|
sl@0
|
760 |
//! 5. Call File() with checking that value is '\base\t_sfsrv\t_findfile\test1\Test1.txt'
|
sl@0
|
761 |
//!
|
sl@0
|
762 |
//! @SYMTestStatus Implemented
|
sl@0
|
763 |
//! @SYMTestPriority Critical
|
sl@0
|
764 |
//! @SYMTestExpectedResults FindWildByDir() returns KErrNone.
|
sl@0
|
765 |
//! @SYMTestType CIT
|
sl@0
|
766 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
767 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
768 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
769 |
CREATE_OBJECT TEntry TEntry1
|
sl@0
|
770 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
771 |
COMMAND RFs1 new
|
sl@0
|
772 |
COMMAND RFs1 Connect
|
sl@0
|
773 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0027-command4new
|
sl@0
|
774 |
COMMAND TFindFile1 FindWildByDir PBASE-F32-FindFile-PublicApi-0027-command5FindWildByDir
|
sl@0
|
775 |
COMMAND TFindFile1 File correct_file_path
|
sl@0
|
776 |
COMMAND TFindFile1 ~
|
sl@0
|
777 |
COMMAND RFs1 ~
|
sl@0
|
778 |
END_TEST_BLOCK
|
sl@0
|
779 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0027
|
sl@0
|
780 |
|
sl@0
|
781 |
|
sl@0
|
782 |
START_TESTCASE PBASE-F32-FindFile-PublicApi-0028
|
sl@0
|
783 |
//! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0028
|
sl@0
|
784 |
//! @SYMAPI TFindFile
|
sl@0
|
785 |
//! @SYMTestCaseDesc FindWildByPath() test. This tests for successful finding of file without wildcard in name.
|
sl@0
|
786 |
//! Uses API elements: FindWildByPath()
|
sl@0
|
787 |
//! @SYMTestActions 1. Create RFs object.
|
sl@0
|
788 |
//! 2. Call Connect().
|
sl@0
|
789 |
//! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
|
sl@0
|
790 |
//! 4. Call FindWildByPath() passing file name "Test1.txt" and path "\base\t_sfsrv\t_findfile\test1\;\base\t_sfsrv\t_findfile\test2\" as arguments.
|
sl@0
|
791 |
//! 5. Call File() with checking that value is '\base\t_sfsrv\t_findfile\test1\Test1.txt'
|
sl@0
|
792 |
//!
|
sl@0
|
793 |
//! @SYMTestStatus Implemented
|
sl@0
|
794 |
//! @SYMTestPriority Critical
|
sl@0
|
795 |
//! @SYMTestExpectedResults FindWildByPath() returns KErrNone.
|
sl@0
|
796 |
//! @SYMTestType CIT
|
sl@0
|
797 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
798 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
799 |
CREATE_OBJECT TFindFile TFindFile1
|
sl@0
|
800 |
CREATE_OBJECT TEntry TEntry1
|
sl@0
|
801 |
CREATE_OBJECT CDir CDir1
|
sl@0
|
802 |
COMMAND RFs1 new
|
sl@0
|
803 |
COMMAND RFs1 Connect
|
sl@0
|
804 |
COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0028-command4new
|
sl@0
|
805 |
COMMAND TFindFile1 FindWildByPath PBASE-F32-FindFile-PublicApi-0028-command5FindWildByPath
|
sl@0
|
806 |
COMMAND TFindFile1 File correct_file_path
|
sl@0
|
807 |
COMMAND TFindFile1 ~
|
sl@0
|
808 |
COMMAND RFs1 ~
|
sl@0
|
809 |
END_TEST_BLOCK
|
sl@0
|
810 |
END_TESTCASE PBASE-F32-FindFile-PublicApi-0028
|
sl@0
|
811 |
|
sl@0
|
812 |
|
sl@0
|
813 |
START_TESTCASE REMOVE_FILES
|
sl@0
|
814 |
START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
|
sl@0
|
815 |
CREATE_OBJECT RFs RFs1
|
sl@0
|
816 |
CREATE_OBJECT CFileMan CFileMan1
|
sl@0
|
817 |
COMMAND RFs1 new
|
sl@0
|
818 |
COMMAND RFs1 Connect
|
sl@0
|
819 |
COMMAND CFileMan1 NewL fileman_fs
|
sl@0
|
820 |
COMMAND CFileMan1 Delete all_files1
|
sl@0
|
821 |
COMMAND CFileMan1 Delete all_files2
|
sl@0
|
822 |
COMMAND RFs1 RmDir test_dir1
|
sl@0
|
823 |
COMMAND RFs1 RmDir test_dir2
|
sl@0
|
824 |
COMMAND RFs1 RmDir test_dir
|
sl@0
|
825 |
COMMAND CFileMan1 ~
|
sl@0
|
826 |
COMMAND RFs1 ~
|
sl@0
|
827 |
END_TEST_BLOCK
|
sl@0
|
828 |
END_TESTCASE REMOVE_FILES
|
sl@0
|
829 |
|