os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-FindFile-PublicApi-OS.script
First public contribution.
2 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
3 // All rights reserved.
4 // This component and the accompanying materials are made available
5 // under the terms of "Eclipse Public License v1.0"
6 // which accompanies this distribution, and is available
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 // Initial Contributors:
10 // Nokia Corporation - initial contribution.
17 //! @SYMTestSuiteName pbase-f32-sfsrv-publicapi-os
18 //! @SYMScriptTestEnvironment This test script requires a basic ROM.
19 //! @SYMScriptAuthor Dmitri Trofimov
20 //! @SYMScriptDescription The test script contains API tests for the following functions of TFindFile class:
21 //! @SYMCreationDate 17/12/2006
22 //! TFindFile(RFs &aFs);
23 //! TInt FindByPath(const TDesC &aFileName, const TDesC *aPathList);
24 //! TInt FindByDir(const TDesC &aFileName, const TDesC &aDirPath);
25 //! TInt FindWildByPath(const TDesC &aFileName, const TDesC *aPathList, CDir *&aDirList);
26 //! TInt FindWildByDir(const TDesC &aFileName, const TDesC &aDirPath, CDir *&aDir);
28 //! TInt FindWild(CDir *&aDirList);
29 //! const TDesC &File() const;
35 START_TESTCASE SETUP_FILES
36 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
37 CREATE_OBJECT RFs RFs1
38 CREATE_OBJECT CFileMan CFileMan1
41 COMMAND RFs1 MkDirAll test_dir
42 COMMAND RFs1 MkDirAll test_dir1
43 COMMAND RFs1 MkDirAll test_dir2
44 COMMAND CFileMan1 NewL fileman_fs
45 COMMAND CFileMan1 Copy test_file1
46 COMMAND CFileMan1 Close
47 COMMAND CFileMan1 Copy test_file2
48 COMMAND CFileMan1 Close
49 COMMAND CFileMan1 Copy test_file3
50 COMMAND CFileMan1 Close
54 END_TESTCASE SETUP_FILES
57 START_TESTCASE PBASE-F32-FindFile-PublicApi-0001
58 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0001
60 //! @SYMTestCaseDesc TFindFile() passing a reference to a connected file session as a parameter. This tests for successful object creation and initialization.
61 //! Uses API elements: TFindFile()
62 //! @SYMTestActions 1. Create RFs object.
63 //! 2. Call Connect().
64 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
66 //! @SYMTestStatus Implemented
67 //! @SYMTestPriority Critical
68 //! @SYMTestExpectedResults Function does not leave nor panic
70 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
71 CREATE_OBJECT RFs RFs1
72 CREATE_OBJECT TFindFile TFindFile1
75 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0001-command4new
79 END_TESTCASE PBASE-F32-FindFile-PublicApi-0001
82 START_TESTCASE PBASE-F32-FindFile-PublicApi-0002
83 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0002
85 //! @SYMTestCaseDesc FindByPath() test. This tests for successful finding of a file.
86 //! Uses API elements: FindByPath()
87 //! @SYMTestActions 1. Create RFs object.
88 //! 2. Call Connect().
89 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
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.
92 //! @SYMTestStatus Implemented
93 //! @SYMTestPriority Critical
94 //! @SYMTestExpectedResults FindByPath returns KErrNone.
96 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
97 CREATE_OBJECT RFs RFs1
98 CREATE_OBJECT TFindFile TFindFile1
99 CREATE_OBJECT TEntry TEntry1
100 CREATE_OBJECT CDir CDir1
103 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0002-command4new
104 COMMAND TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0002-command5FindByPath
108 END_TESTCASE PBASE-F32-FindFile-PublicApi-0002
111 START_TESTCASE PBASE-F32-FindFile-PublicApi-0003
112 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0003
113 //! @SYMAPI TFindFile
114 //! @SYMTestCaseDesc FindByPath() negative test. This tests for function returning KErrNotFound when the file cannot be found.
115 //! Uses API elements: FindByPath()
116 //! @SYMTestActions 1. Create RFs object.
117 //! 2. Call Connect().
118 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
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.
121 //! @SYMTestStatus Implemented
122 //! @SYMTestPriority Critical
123 //! @SYMTestExpectedResults FindByPath returns KErrNotFound.
125 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
126 CREATE_OBJECT RFs RFs1
127 CREATE_OBJECT TFindFile TFindFile1
128 CREATE_OBJECT CDir CDir1
131 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0003-command4new
132 COMMAND !Error=-1 TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0003-command5FindByPath
136 END_TESTCASE PBASE-F32-FindFile-PublicApi-0003
139 START_TESTCASE PBASE-F32-FindFile-PublicApi-0004
140 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0004
141 //! @SYMAPI TFindFile
142 //! @SYMTestCaseDesc FindByPath() negative test. This test for function returning KErrArgument when filename is empty.
143 //! Uses API elements: FindByPath()
144 //! @SYMTestActions 1. Create RFs object.
145 //! 2. Call Connect().
146 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
147 //! 4. Call FindByPath() passing file empty name and path "\base\t_sfsrv\t_findfile\test1\;\base\t_sfsrv\t_findfile\test2\" as arguments.
149 //! @SYMTestStatus Implemented
150 //! @SYMTestPriority Critical
151 //! @SYMTestExpectedResults FindByPath returns KErrArgument.
153 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
154 CREATE_OBJECT RFs RFs1
155 CREATE_OBJECT TFindFile TFindFile1
156 CREATE_OBJECT CDir CDir1
159 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0004-command4new
160 COMMAND !Error=-6 TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0004-command5FindByPath
164 END_TESTCASE PBASE-F32-FindFile-PublicApi-0004
167 START_TESTCASE PBASE-F32-FindFile-PublicApi-0005
168 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0005
169 //! @SYMAPI TFindFile
170 //! @SYMTestCaseDesc FindByPath() negative test. This test for function returning KErrArgument when filename and path is empty.
171 //! Uses API elements: FindByPath()
172 //! @SYMTestActions 1. Create RFs object.
173 //! 2. Call Connect().
174 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
175 //! 4. Call FindByPath() passing file empty name and empty path as arguments.
177 //! @SYMTestStatus Implemented
178 //! @SYMTestPriority Critical
179 //! @SYMTestExpectedResults FindByPath returns KErrArgument.
181 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
182 CREATE_OBJECT RFs RFs1
183 CREATE_OBJECT TFindFile TFindFile1
184 CREATE_OBJECT CDir CDir1
187 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0005-command4new
188 COMMAND !Error=-6 TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0005-command5FindByPath
192 END_TESTCASE PBASE-F32-FindFile-PublicApi-0005
195 START_TESTCASE PBASE-F32-FindFile-PublicApi-0006
196 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0006
197 //! @SYMAPI TFindFile
198 //! @SYMTestCaseDesc FindByPath() negative test where filename has wildcard and other characters.
199 //! Uses API elements: FindByPath()
200 //! @SYMTestActions 1. Create RFs object.
201 //! 2. Call Connect().
202 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
203 //! 4. Call FindByPath() passing file name "$%&?*" and path "\" as arguments.
205 //! @SYMTestStatus Implemented
206 //! @SYMTestPriority Critical
207 //! @SYMTestExpectedResults FindByPath returns KErrNotFound.
209 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
210 CREATE_OBJECT RFs RFs1
211 CREATE_OBJECT TFindFile TFindFile1
212 CREATE_OBJECT CDir CDir1
215 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0006-command4new
216 COMMAND !Error=-1 TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0006-command5FindByPath
220 END_TESTCASE PBASE-F32-FindFile-PublicApi-0006
223 START_TESTCASE PBASE-F32-FindFile-PublicApi-0007
224 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0007
225 //! @SYMAPI TFindFile
226 //! @SYMTestCaseDesc FindByPath() negative test where path has wildcard and other characters.
227 //! Uses API elements: FindByPath()
228 //! @SYMTestActions 1. Create RFs object.
229 //! 2. Call Connect().
230 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
231 //! 4. Call FindByPath() passing file name "a" and path "$%&*?" as arguments.
233 //! @SYMTestStatus Implemented
234 //! @SYMTestPriority Critical
235 //! @SYMTestExpectedResults FindByPath returns KErrNotFound.
237 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
238 CREATE_OBJECT RFs RFs1
239 CREATE_OBJECT TFindFile TFindFile1
240 CREATE_OBJECT CDir CDir1
243 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0007-command4new
244 COMMAND !Error=-1 TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0007-command5FindByPath
248 END_TESTCASE PBASE-F32-FindFile-PublicApi-0007
251 START_TESTCASE PBASE-F32-FindFile-PublicApi-0008
252 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0008
253 //! @SYMAPI TFindFile
254 //! @SYMTestCaseDesc FindByDir() test. This test for successful finding of file.
255 //! Uses API elements: FindByDir()
256 //! @SYMTestActions 1. Create RFs object.
257 //! 2. Call Connect().
258 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
259 //! 4. Call FindByDir() passing file name "Test1.txt" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
261 //! @SYMTestStatus Implemented
262 //! @SYMTestPriority Critical
263 //! @SYMTestExpectedResults FindByDir() returns KErrNone.
265 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
266 CREATE_OBJECT RFs RFs1
267 CREATE_OBJECT TFindFile TFindFile1
268 CREATE_OBJECT TEntry TEntry1
269 CREATE_OBJECT CDir CDir1
272 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0008-command4new
273 COMMAND TFindFile1 FindByDir PBASE-F32-FindFile-PublicApi-0008-command5FindByDir
277 END_TESTCASE PBASE-F32-FindFile-PublicApi-0008
280 START_TESTCASE PBASE-F32-FindFile-PublicApi-0009
281 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0009
282 //! @SYMAPI TFindFile
283 //! @SYMTestCaseDesc FindByDir() negative test. This tests for function returning KErrNotFound when the file cannot be found.
284 //! Uses API elements: FindByDir()
285 //! @SYMTestActions 1. Create RFs object.
286 //! 2. Call Connect().
287 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
288 //! 4. Call FindByDir() passing file name "Test3.txt" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
290 //! @SYMTestStatus Implemented
291 //! @SYMTestPriority Critical
292 //! @SYMTestExpectedResults FindByDir() returns KErrNotFound.
294 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
295 CREATE_OBJECT RFs RFs1
296 CREATE_OBJECT TFindFile TFindFile1
297 CREATE_OBJECT CDir CDir1
300 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0009-command4new
301 COMMAND !Error=-1 TFindFile1 FindByDir PBASE-F32-FindFile-PublicApi-0009-command5FindByDir
305 END_TESTCASE PBASE-F32-FindFile-PublicApi-0009
308 START_TESTCASE PBASE-F32-FindFile-PublicApi-0010
309 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0010
310 //! @SYMAPI TFindFile
311 //! @SYMTestCaseDesc FindByDir() negative test. This tests for function returning KErrArgument when file name is empty.
312 //! Uses API elements: FindByDir()
313 //! @SYMTestActions 1. Create RFs object.
314 //! 2. Call Connect().
315 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
316 //! 4. Call FindByDir() passing file empty name and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
318 //! @SYMTestStatus Implemented
319 //! @SYMTestPriority Critical
320 //! @SYMTestExpectedResults FindByDir() returns KErrArgument.
322 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
323 CREATE_OBJECT RFs RFs1
324 CREATE_OBJECT TFindFile TFindFile1
325 CREATE_OBJECT CDir CDir1
328 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0010-command4new
329 COMMAND !Error=-6 TFindFile1 FindByDir PBASE-F32-FindFile-PublicApi-0010-command5FindByDir
333 END_TESTCASE PBASE-F32-FindFile-PublicApi-0010
336 START_TESTCASE PBASE-F32-FindFile-PublicApi-0011
337 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0011
338 //! @SYMAPI TFindFile
339 //! @SYMTestCaseDesc FindWildByPath() test. This tests for successful finding of file with wildcard.
340 //! Uses API elements: FindWildByPath()
341 //! @SYMTestActions 1. Create RFs object.
342 //! 2. Call Connect().
343 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
344 //! 4. Call FindWildByPath() passing file name "Test?.*" and path "\base\t_sfsrv\t_findfile\test1\;\base\t_sfsrv\t_findfile\test2\" as arguments.
346 //! @SYMTestStatus Implemented
347 //! @SYMTestPriority Critical
348 //! @SYMTestExpectedResults FindWildByPath() returns KErrNone.
350 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
351 CREATE_OBJECT RFs RFs1
352 CREATE_OBJECT TFindFile TFindFile1
353 CREATE_OBJECT TEntry TEntry1
354 CREATE_OBJECT CDir CDir1
357 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0011-command4new
358 COMMAND TFindFile1 FindWildByPath PBASE-F32-FindFile-PublicApi-0011-command5FindWildByPath
359 //!//!COMMAND TFindFile1 cleanup
363 END_TESTCASE PBASE-F32-FindFile-PublicApi-0011
368 START_TESTCASE PBASE-F32-FindFile-PublicApi-0012
369 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0012
370 //! @SYMAPI TFindFile
371 //! @SYMTestCaseDesc FindWildByPath() negative test. This tests for function returning KErrNotFound when the file cannot be found.
372 //! Uses API elements: FindWildByPath()
373 //! @SYMTestActions 1. Create RFs object.
374 //! 2. Call Connect().
375 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
376 //! 4. Call FindWildByPath() passing file name "?ester.*" and path "\base\t_sfsrv\t_findfile\test1\;\base\t_sfsrv\t_findfile\test2\" as arguments.
378 //! @SYMTestStatus Implemented
379 //! @SYMTestPriority Critical
380 //! @SYMTestExpectedResults FindWildByPath() returns KErrNotFound.
382 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
383 CREATE_OBJECT RFs RFs1
384 CREATE_OBJECT TFindFile TFindFile1
385 CREATE_OBJECT CDir CDir1
388 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0012-command4new
389 COMMAND !Error=-1 TFindFile1 FindWildByPath PBASE-F32-FindFile-PublicApi-0012-command5FindWildByPath
390 //!//!COMMAND TFindFile1 cleanup
394 END_TESTCASE PBASE-F32-FindFile-PublicApi-0012
397 START_TESTCASE PBASE-F32-FindFile-PublicApi-0013
398 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0013
399 //! @SYMAPI TFindFile
400 //! @SYMTestCaseDesc FindWildByPath() negative test. This tests for function returning KErrArgument when the file cannot be found.
401 //! Uses API elements: FindWildByPath()
402 //! @SYMTestActions 1. Create RFs object.
403 //! 2. Call Connect().
404 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
405 //! 4. Call FindWildByPath() passing file empry name and path "\base\t_sfsrv\t_findfile\test1\;\base\t_sfsrv\t_findfile\test2\" as arguments.
408 //! @SYMTestStatus Implemented
409 //! @SYMTestPriority Critical
410 //! @SYMTestExpectedResults FindWildByPath() returns KErrArgument.
412 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
413 CREATE_OBJECT RFs RFs1
414 CREATE_OBJECT TFindFile TFindFile1
415 CREATE_OBJECT CDir CDir1
418 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0013-command4new
419 COMMAND !Error=-6 TFindFile1 FindWildByPath PBASE-F32-FindFile-PublicApi-0013-command5FindWildByPath
420 //!COMMAND TFindFile1 cleanup
424 END_TESTCASE PBASE-F32-FindFile-PublicApi-0013
427 START_TESTCASE PBASE-F32-FindFile-PublicApi-0014
428 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0014
429 //! @SYMAPI TFindFile
430 //! @SYMTestCaseDesc FindWildByDir() test. This tests for successful finding of file with wildcard in name.
431 //! Uses API elements: FindWildByDir()
432 //! @SYMTestActions 1. Create RFs object.
433 //! 2. Call Connect().
434 //! 3. Create TFindFile object passing a reference to a connected file session as a parameter.
435 //! 4. Call FindWildByDir() passing file name "Test?.*" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
437 //! @SYMTestStatus Implemented
438 //! @SYMTestPriority Critical
439 //! @SYMTestExpectedResults FindWildByDir() returns KErrNone.
441 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
442 CREATE_OBJECT RFs RFs1
443 CREATE_OBJECT TFindFile TFindFile1
444 CREATE_OBJECT TEntry TEntry1
445 CREATE_OBJECT CDir CDir1
448 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0014-command4new
449 COMMAND TFindFile1 FindWildByDir PBASE-F32-FindFile-PublicApi-0014-command5FindWildByDir
453 END_TESTCASE PBASE-F32-FindFile-PublicApi-0014
456 START_TESTCASE PBASE-F32-FindFile-PublicApi-0015
457 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0015
458 //! @SYMAPI TFindFile
459 //! @SYMTestCaseDesc FindWildByDir() negative test. This test for function returning KErrNotFound when the file cannont be found.
460 //! Uses API elements: FindWildByDir()
461 //! @SYMTestActions 1. Create RFs object.
462 //! 2. Call Connect().
463 //! 3. Create TFindFile object passing a reference to a connected file session as a parameter.
464 //! 4. Call FindWildByDir() passing file name "?ester.*" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
466 //! @SYMTestStatus Implemented
467 //! @SYMTestPriority Critical
468 //! @SYMTestExpectedResults FindWildByDir() returns KErrNotFound.
470 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
471 CREATE_OBJECT RFs RFs1
472 CREATE_OBJECT TFindFile TFindFile1
473 CREATE_OBJECT CDir CDir1
476 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0015-command4new
477 COMMAND !Error=-1 TFindFile1 FindWildByDir PBASE-F32-FindFile-PublicApi-0015-command5FindWildByDir
481 END_TESTCASE PBASE-F32-FindFile-PublicApi-0015
484 START_TESTCASE PBASE-F32-FindFile-PublicApi-0016
485 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0016
486 //! @SYMAPI TFindFile
487 //! @SYMTestCaseDesc FindWildByDir() negative test. This tests function returning KErrArgument when the file name is empty.
488 //! Uses API elements: FindWildByDir()
489 //! @SYMTestActions 1. Create RFs object.
490 //! 2. Call Connect().
491 //! 3. Create TFindFile object passing a reference to a connected file session as a parameter.
492 //! 4. Call FindWildByDir() passing file empty name and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
494 //! @SYMTestStatus Implemented
495 //! @SYMTestPriority Critical
496 //! @SYMTestExpectedResults FindWildByDir() returns KErrArgument.
498 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
499 CREATE_OBJECT RFs RFs1
500 CREATE_OBJECT TFindFile TFindFile1
502 CREATE_OBJECT CDir CDir1
504 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0016-command4new
505 COMMAND !Error=-6 TFindFile1 FindWildByDir PBASE-F32-FindFile-PublicApi-0016-command5FindWildByDir
506 //!COMMAND TFindFile1 cleanup
510 END_TESTCASE PBASE-F32-FindFile-PublicApi-0016
513 START_TESTCASE PBASE-F32-FindFile-PublicApi-0017
514 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0017
515 //! @SYMAPI TFindFile
516 //! @SYMTestCaseDesc Find() test. This tests for successful finding of file after FindByPath() call.
517 //! Uses API elements: FindByPath(), Find()
518 //! @SYMTestActions 1. Create RFs object.
519 //! 2. Call Connect().
520 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
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.
523 //! 6. Call File() with checking that value is '\base\t_sfsrv\t_findfile\test2\Test1.txt'
525 //! @SYMTestStatus Implemented
526 //! @SYMTestPriority Critical
527 //! @SYMTestExpectedResults Find() returns KErrNone.
529 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
530 CREATE_OBJECT RFs RFs1
531 CREATE_OBJECT TFindFile TFindFile1
532 CREATE_OBJECT TEntry TEntry1
533 CREATE_OBJECT CDir CDir1
536 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0017-command4new
537 COMMAND TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0017-command5FindByPath
538 COMMAND TFindFile1 Find
539 COMMAND TFindFile1 File correct_file_path2
543 END_TESTCASE PBASE-F32-FindFile-PublicApi-0017
546 START_TESTCASE PBASE-F32-FindFile-PublicApi-0018
547 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0018
548 //! @SYMAPI TFindFile
549 //! @SYMTestCaseDesc Find() negative test. This tests for function returning KErrNotFound when file cannot be found after FindByPath() call.
550 //! Uses API elements: FindByPath(), Find()
551 //! @SYMTestActions 1. Create RFs object.
552 //! 2. Call Connect().
553 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
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.
557 //! @SYMTestStatus Implemented
558 //! @SYMTestPriority Critical
559 //! @SYMTestExpectedResults Find() returns KErrNotFound.
561 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
562 CREATE_OBJECT RFs RFs1
563 CREATE_OBJECT TFindFile TFindFile1
565 CREATE_OBJECT CDir CDir1
567 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0018-command4new
568 COMMAND TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0018-command5FindByPath
569 COMMAND !Error=-1 TFindFile1 Find
573 END_TESTCASE PBASE-F32-FindFile-PublicApi-0018
575 START_TESTCASE PBASE-F32-FindFile-PublicApi-0020
576 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0020
577 //! @SYMAPI TFindFile
578 //! @SYMTestCaseDesc Find() negative test. This tests for function returning KErrNotFound when file cannot be found after
579 //! FindByDir() call.
580 //! Uses API elements: FindByDir(), Find()
581 //! @SYMTestActions 1. Create RFs object.
582 //! 2. Create RFile object
583 //! 3. Call Rfs::Connect().
584 //! 4. Call RFile::Create() and pass name "temp.txt" as parameter.
585 //! 5. Create TFindFile object passing a reference to the connected file session as a parameter.
586 //! 6. Call FindByDir() passing file name "temp.txt" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
588 //! 8. Call RFs::Delete() and pass name "temp.txt" as parameter.
590 //! @SYMTestStatus Implemented
591 //! @SYMTestPriority Critical
592 //! @SYMTestExpectedResults Second Find() returns KErrNotFound.
594 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
595 CREATE_OBJECT RFs RFs1
596 CREATE_OBJECT RFile RFile1
597 CREATE_OBJECT TFindFile TFindFile1
598 CREATE_OBJECT CDir CDir1
602 COMMAND RFile1 Create PBASE-F32-FindFile-PublicApi-0020-command1Create
604 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0020-command4new
605 COMMAND TFindFile1 FindByDir PBASE-F32-FindFile-PublicApi-0020-command5FindByDir
606 COMMAND !Error=-1 TFindFile1 Find
608 COMMAND RFs1 Delete PBASE-F32-FindFile-PublicApi-0020-command6Delete
612 END_TESTCASE PBASE-F32-FindFile-PublicApi-0020
617 START_TESTCASE PBASE-F32-FindFile-PublicApi-0021
618 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0021
619 //! @SYMAPI TFindFile
620 //! @SYMTestCaseDesc FindWild() test. This test for successful finding of file ather FindWildByPath() call.
621 //! Uses API elements: FindWildByPath(), FindWild()
622 //! @SYMTestActions 1. Create RFs object.
623 //! 2. Call Connect().
624 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
625 //! 4. Call FindWildByPath() passing file name "Test1.*" and path "\base\t_sfsrv\t_findfile\test1\;\base\t_sfsrv\t_findfile\test2\" as arguments.
626 //! 5. Call FindWild()
628 //! @SYMTestStatus Implemented
629 //! @SYMTestPriority Critical
630 //! @SYMTestExpectedResults FindWild() returns KErrNone.
632 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
633 CREATE_OBJECT RFs RFs1
634 CREATE_OBJECT TFindFile TFindFile1
635 CREATE_OBJECT TEntry TEntry1
636 CREATE_OBJECT CDir CDir1
639 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0021-command4new
640 COMMAND TFindFile1 FindWildByPath PBASE-F32-FindFile-PublicApi-0021-command5FindWildByPath
641 COMMAND TFindFile1 FindWild common_dir_wrapper
645 END_TESTCASE PBASE-F32-FindFile-PublicApi-0021
648 START_TESTCASE PBASE-F32-FindFile-PublicApi-0022
649 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0022
650 //! @SYMAPI TFindFile
651 //! @SYMTestCaseDesc FindWild() negative test. This test for function returning KErrNotFound if file cannot be found after FindWildByPath() call.
652 //! Uses API elements: FindWildByPath(), FindWild()
653 //! @SYMTestActions 1. Create RFs object.
654 //! 2. Call Connect().
655 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
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.
657 //! 5. Call FindWild()
659 //! @SYMTestStatus Implemented
660 //! @SYMTestPriority Critical
661 //! @SYMTestExpectedResults FindWild() returns KErrNotFound.
663 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
664 CREATE_OBJECT RFs RFs1
665 CREATE_OBJECT TFindFile TFindFile1
666 CREATE_OBJECT CDir CDir1
669 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0022-command4new
670 COMMAND TFindFile1 FindWildByPath PBASE-F32-FindFile-PublicApi-0022-command5FindWildByPath
671 COMMAND !Error=-1 TFindFile1 FindWild common_dir_wrapper
675 END_TESTCASE PBASE-F32-FindFile-PublicApi-0022
678 START_TESTCASE PBASE-F32-FindFile-PublicApi-0024
679 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0024
680 //! @SYMAPI TFindFile
681 //! @SYMTestCaseDesc FindWild() negative test. This test for function returning KErrNotFound if file cannot be found after FindWildByDir() call.
682 //! Uses API elements: FindWildByDir(), FindWild()
683 //! @SYMTestActions 1. Create RFs object.
684 //! 2. Create RFile object
685 //! 3. Call Connect().
686 //! 4. Call RFile::Create() and pass name "temp.txt" as parameter.
687 //! 5. Create TFindFile object passing a reference to the connected file session as a parameter.
688 //! 6. Call FindWildByDir() passing file name "temp.*" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
689 //! 7. Call FindWild()
690 //! 8. Call RFs::Delete() and pass name "temp.txt" as parameter.
692 //! @SYMTestStatus Implemented
693 //! @SYMTestPriority Critical
694 //! @SYMTestExpectedResults Both FindWild() returns KErrNotFound.
696 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
697 CREATE_OBJECT RFs RFs1
698 CREATE_OBJECT RFile RFile1
699 CREATE_OBJECT TFindFile TFindFile1
700 CREATE_OBJECT TEntry TEntry1
701 CREATE_OBJECT CDir CDir1
705 COMMAND RFile1 Create PBASE-F32-FindFile-PublicApi-0024-command1Create
707 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0024-command4new
708 COMMAND TFindFile1 FindWildByDir PBASE-F32-FindFile-PublicApi-0024-command5FindWildByDir
709 COMMAND !Error=-1 TFindFile1 FindWild common_dir_wrapper
711 COMMAND RFs1 Delete PBASE-F32-FindFile-PublicApi-0024-command6Delete
715 END_TESTCASE PBASE-F32-FindFile-PublicApi-0024
718 START_TESTCASE PBASE-F32-FindFile-PublicApi-0025
719 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0025
720 //! @SYMAPI TFindFile
721 //! @SYMTestCaseDesc FindByPath() test. This tests for function to return correct data.
722 //! Uses API elements: FindByPath(), File()
723 //! @SYMTestActions 1. Create RFs object.
724 //! 2. Call Connect().
725 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
726 //! 4. Call FindByPath() passing file name "Test1.txt" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
727 //! 5. Call File() with checking that value is '\base\t_sfsrv\t_findfile\test1\Test1.txt'
729 //! @SYMTestStatus Implemented
730 //! @SYMTestPriority Critical
731 //! @SYMTestExpectedResults File returns "\base\t_sfsrv\t_findfile\test1\Test1.txt".
733 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
734 CREATE_OBJECT RFs RFs1
735 CREATE_OBJECT TFindFile TFindFile1
736 CREATE_OBJECT TEntry TEntry1
737 CREATE_OBJECT CDir CDir1
740 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0025-command4new
741 COMMAND TFindFile1 FindByPath PBASE-F32-FindFile-PublicApi-0025-command5FindByPath
742 COMMAND TFindFile1 File correct_file_path
746 END_TESTCASE PBASE-F32-FindFile-PublicApi-0025
751 START_TESTCASE PBASE-F32-FindFile-PublicApi-0027
752 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0027
753 //! @SYMAPI TFindFile
754 //! @SYMTestCaseDesc FindWildByDir() test. This tests for successful finding of file without wildcard in name.
755 //! Uses API elements: FindWildByDir()
756 //! @SYMTestActions 1. Create RFs object.
757 //! 2. Call Connect().
758 //! 3. Create TFindFile object passing a reference to a connected file session as a parameter.
759 //! 4. Call FindWildByDir() passing file name "Test1.txt" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
760 //! 5. Call File() with checking that value is '\base\t_sfsrv\t_findfile\test1\Test1.txt'
762 //! @SYMTestStatus Implemented
763 //! @SYMTestPriority Critical
764 //! @SYMTestExpectedResults FindWildByDir() returns KErrNone.
766 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
767 CREATE_OBJECT RFs RFs1
768 CREATE_OBJECT TFindFile TFindFile1
769 CREATE_OBJECT TEntry TEntry1
770 CREATE_OBJECT CDir CDir1
773 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0027-command4new
774 COMMAND TFindFile1 FindWildByDir PBASE-F32-FindFile-PublicApi-0027-command5FindWildByDir
775 COMMAND TFindFile1 File correct_file_path
779 END_TESTCASE PBASE-F32-FindFile-PublicApi-0027
782 START_TESTCASE PBASE-F32-FindFile-PublicApi-0028
783 //! @SYMTestCaseID PBASE-F32-FindFile-PublicApi-0028
784 //! @SYMAPI TFindFile
785 //! @SYMTestCaseDesc FindWildByPath() test. This tests for successful finding of file without wildcard in name.
786 //! Uses API elements: FindWildByPath()
787 //! @SYMTestActions 1. Create RFs object.
788 //! 2. Call Connect().
789 //! 3. Create TFindFile object passing a reference to the connected file session as a parameter.
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.
791 //! 5. Call File() with checking that value is '\base\t_sfsrv\t_findfile\test1\Test1.txt'
793 //! @SYMTestStatus Implemented
794 //! @SYMTestPriority Critical
795 //! @SYMTestExpectedResults FindWildByPath() returns KErrNone.
797 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
798 CREATE_OBJECT RFs RFs1
799 CREATE_OBJECT TFindFile TFindFile1
800 CREATE_OBJECT TEntry TEntry1
801 CREATE_OBJECT CDir CDir1
804 COMMAND TFindFile1 new PBASE-F32-FindFile-PublicApi-0028-command4new
805 COMMAND TFindFile1 FindWildByPath PBASE-F32-FindFile-PublicApi-0028-command5FindWildByPath
806 COMMAND TFindFile1 File correct_file_path
810 END_TESTCASE PBASE-F32-FindFile-PublicApi-0028
813 START_TESTCASE REMOVE_FILES
814 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FindFile-PublicApi.ini
815 CREATE_OBJECT RFs RFs1
816 CREATE_OBJECT CFileMan CFileMan1
819 COMMAND CFileMan1 NewL fileman_fs
820 COMMAND CFileMan1 Delete all_files1
821 COMMAND CFileMan1 Delete all_files2
822 COMMAND RFs1 RmDir test_dir1
823 COMMAND RFs1 RmDir test_dir2
824 COMMAND RFs1 RmDir test_dir
828 END_TESTCASE REMOVE_FILES