os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-RDir-PublicApi-RAM.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-ram
18 //! @SYMScriptTestEnvironment This test script requires a basic ROM.
19 //! @SYMScriptAuthor Jaanus Randveer, Runno Sgirka
20 //! @SYMScriptCreationDate 31/08/2007
21 //! @SYMScriptDescription The test script contains API tests for the following functions of RDir class:
22 //! TInt Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType)
23 //! TInt Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask)
25 //! TInt Read(TEntryArray &anArray)
26 //! void Read(TEntryArray &anArray, TRequestStatus &aStatus)
27 //! TInt Read(TEntry &anEntry)
28 //! void Read(TPckg< TEntry > &anEntry, TRequestStatus &aStatus)
35 START_TESTCASE PBASE-F32-RDir-CopyFiles
36 //! @SYMTestCaseID PBASE-F32-RDir-CopyFiles
38 //! @SYMTestCaseDesc SetupTestCase to test RDir Apis
39 //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
40 //! 2. Use CFileMan to copy the files on to relavent directories.
41 //! @SYMTestStatus Implemented
42 //! @SYMTestPriority Critical
43 //! @SYMTestExpectedResults The CFileMan::Copy() copies the testdata files properly on to specific directories.
45 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
46 CREATE_OBJECT RFs RFs1
47 CREATE_OBJECT CFileMan CFileMan1
50 COMMAND CFileMan1 NewL PBASE-F32-RDir-PublicApi-NewL
51 COMMAND RFs1 MkDirAll PBASE-F32-RDir-PublicApi-001-RamDiskPath
52 COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Any
53 COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Bigline
54 COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_FtEof
55 COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_FtRead
56 COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_MLine
57 COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_NewFile
58 COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Oneliner
59 COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Test1
60 COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Test2
61 COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Test3
62 COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Test
66 END_TESTCASE PBASE-F32-RDir-CopyFiles
72 START_TESTCASE PBASE-F32-RDir-PublicApi-5001
73 //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5001
75 //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) and
76 //! function Close() test, that opens a directory using the NULL UIDs.
77 //! Uses API elements: Open(), Close().
78 //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
79 //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType),
80 //! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ as second parameter,
81 //! and empty TUidType as third parameter.
82 //! 3.Call RDir::Close().
83 //! @SYMTestStatus Implemented
84 //! @SYMTestPriority Critical
85 //! @SYMTestExpectedResults The Open() method call is completed returning KErrNone.
87 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
88 CREATE_OBJECT RFs RFs1
89 CREATE_OBJECT RDir RDir1
93 COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5001-001-Open_command005
98 END_TESTCASE PBASE-F32-RDir-PublicApi-5001
101 START_TESTCASE PBASE-F32-RDir-PublicApi-5002
102 //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5002
104 //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) test, that opens a directory using
105 //! an attribute bitmask to filter the directory entry types.
106 //! Uses API elements: Open(), Close().
107 //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
108 //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
109 //! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ as second parameter,
110 //! and KEntryAttNormal as third parameter.
111 //! 3.Call RDir::Close().
112 //! @SYMTestStatus Implemented
113 //! @SYMTestPriority Critical
114 //! @SYMTestExpectedResults The Open() method call is completed returning KErrNone.
116 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
117 CREATE_OBJECT RFs RFs1
118 CREATE_OBJECT RDir RDir1
122 COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5002-001-Open_command005
127 END_TESTCASE PBASE-F32-RDir-PublicApi-5002
130 START_TESTCASE PBASE-F32-RDir-PublicApi-5003
131 //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5003
133 //! @SYMTestCaseDesc Function Read(TEntryArray &anArray) test, that reads all filtered directory entries into the
134 //! specified array synchronously.
135 //! Uses API elements: Open(), Read(), Close().
136 //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
137 //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
138 //! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb,
139 //! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt,
140 //! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt,
141 //! Test3.txt, USBLOAD.ZIP) as second parameter, and KEntryAttNormal
142 //! as third parameter.
143 //! 3.Call RDir::Read(TEntryArray &anArray) to read all filtered directory entries into the
144 //! specified array synchronously.
145 //! 4.Call RDir::Close().
146 //! @SYMTestStatus Implemented
147 //! @SYMTestPriority Critical
148 //! @SYMTestExpectedResults The Read() method call is completed returning KErrEof.
150 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
151 CREATE_OBJECT RFs RFs1
152 CREATE_OBJECT RDir RDir1
153 CREATE_OBJECT TEntryArray TEntryArray1
154 CREATE_OBJECT TEntry TEntry1
157 COMMAND TEntryArray1 new
159 COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5003-001-Open_command005
160 COMMAND !Error=-25 RDir1 Read PBASE-F32-RDir-PublicApi-5003-001-Read_command006
163 COMMAND TEntryArray1 ~
167 END_TESTCASE PBASE-F32-RDir-PublicApi-5003
170 START_TESTCASE PBASE-F32-RDir-PublicApi-5004
171 //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5004
173 //! @SYMTestCaseDesc Function Read(TEntryArray &anArray, TRequestStatus &aStatus) test, that reads all filtered directory
174 //! entries into the specified array asynchronously.
175 //! Uses API elements: Open(), Read(), Close().
176 //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
177 //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
178 //! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb,
179 //! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt,
180 //! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt,
181 //! Test3.txt, USBLOAD.ZIP) as second parameter, and KEntryAttNormal
182 //! as third parameter.
183 //! 3.Call RDir::Read(TEntryArray &anArray, TRequestStatus &aStatus) to read all filtered directory
184 //! entries into the specified array asynchronously.
185 //! 4.Call RDir::Close().
186 //! @SYMTestStatus Implemented
187 //! @SYMTestPriority Critical
188 //! @SYMTestExpectedResults The Read() method call is completed returning KErrEof.
190 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
191 CREATE_OBJECT RFs RFs1
192 CREATE_OBJECT RDir RDir1
193 CREATE_OBJECT TEntryArray TEntryArray1
194 CREATE_OBJECT TEntry TEntry1
197 COMMAND TEntryArray1 new
199 COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5004-001-Open_command005
200 COMMAND !AsyncError=-25 RDir1 Read PBASE-F32-RDir-PublicApi-5004-001-Read_command006
204 COMMAND TEntryArray1 ~
208 END_TESTCASE PBASE-F32-RDir-PublicApi-5004
212 START_TESTCASE PBASE-F32-RDir-PublicApi-5007
213 //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5007
215 //! @SYMTestCaseDesc Function Read(TEntry &anEntry) test, that calls multiple iterations of Read() and checks the values returned.
216 //! Uses API elements: Open(), Read(), Close().
217 //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
218 //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
219 //! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb,
220 //! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt,
221 //! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt,
222 //! Test3.txt, USBLOAD.ZIP) as second parameter, and KEntryAttNormal
223 //! as third parameter.
224 //! 3.Call multiple RDir::Read(TEntry &anEntry) methods to read the contents of the entire directory.
225 //! 4.Call RDir::Close().
226 //! @SYMTestStatus Implemented
227 //! @SYMTestPriority Critical
228 //! @SYMTestExpectedResults The first six Read() method calls are completed returning KErrNone, the last returns error -25 (KErrEof) as there
229 //! are no more entries. All verifications with expected values pass.
231 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
232 CREATE_OBJECT RFs RFs1
233 CREATE_OBJECT RDir RDir1
234 CREATE_OBJECT TEntry TEntry1
238 COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5007-001-Open_command005
239 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5007-001-Read_command006
240 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
241 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
242 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
243 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
244 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
245 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
246 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
247 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
248 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
249 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
250 COMMAND !Error=-25 RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
256 END_TESTCASE PBASE-F32-RDir-PublicApi-5007
259 START_TESTCASE PBASE-F32-RDir-PublicApi-5008
260 //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5008
262 //! @SYMTestCaseDesc Function Read(TPckg<TEntry> &anEntry, TRequestStatus &aStatus) test, that calls multiple iterations of Read() and
263 //! checks the values returned.
264 //! Uses API elements: Open(), Read(), Close().
265 //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
266 //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
267 //! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb,
268 //! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt,
269 //! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt,
270 //! Test3.txt, USBLOAD.ZIP) as second parameter, and KEntryAttNormal
271 //! as third parameter.
272 //! 3.Call multiple RDir::Read(TPckg<TEntry> &anEntry, TRequestStatus &aStatus) methods to read the contents of the
273 //! entire directory asynchronously.
274 //! 4.Call RDir::Close().
275 //! @SYMTestStatus Implemented
276 //! @SYMTestPriority Critical
277 //! @SYMTestExpectedResults The first six Read() method calls are completed returning KErrNone, the last returns error -25 (KErrEof) as there
278 //! are no more entries. All verifications with expected values pass.
280 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
281 CREATE_OBJECT RFs RFs1
282 CREATE_OBJECT RDir RDir1
283 CREATE_OBJECT TEntry TEntry1
287 COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5008-001-Open_command005
288 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5008-001-Read_command006
290 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
292 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
294 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
296 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
298 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
300 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
302 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
304 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
306 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
308 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
310 COMMAND !AsyncError=-25 RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
317 END_TESTCASE PBASE-F32-RDir-PublicApi-5008
320 START_TESTCASE PBASE-F32-RDir-PublicApi-5009
321 //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5009
323 //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) test, that checks that Open() makes it
324 //! possible to filter entries by attributes.
325 //! Uses API elements: Open(), Read(), Close().
326 //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
327 //! 2.Call RFs::setAtt, to set some attributes of the files in <DRIVE>:\base\t_sfsrv\.
328 //! 3.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
329 //! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb,
330 //! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt,
331 //! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt,
332 //! Test3.txt, USBLOAD.ZIP) as second parameter, and
333 //! KEntryAttReadOnly|KEntryAttMatchExclusive as third parameter.
334 //! 4.Call multiple RDir::Read(TEntry &anEntry) methods to read the contents of the entire directory.
335 //! 5.Set previously set attributes back to normal.
336 //! 6.Call RDir::Close().
337 //! @SYMTestStatus Implemented
338 //! @SYMTestPriority Critical
339 //! @SYMTestExpectedResults The first two Read() method calls are completed returning KErrNone, the last returns error -25 (KErrEof) as there
340 //! are no more entries (only two read-only files - Test2.txt and USBLOAD.ZIP). All verifications with expected values
343 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
344 CREATE_OBJECT RFs RFs1
345 CREATE_OBJECT RDir RDir1
346 CREATE_OBJECT TEntry TEntry1
349 COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command005
350 COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command006
351 COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command008
352 COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command009
353 COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command010
354 COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command011
355 COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command012
356 COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command013
357 COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command014
358 COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command016
359 COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command020
360 COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command021
361 COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command015
363 COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5009-001-Open_command013
364 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5009-001-Read_command014
365 COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_Test1
366 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5009-001-Read_command015
367 COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_Test3
368 COMMAND !Error=-25 RDir1 Read PBASE-F32-RDir-PublicApi-5009-001-Read_command016
369 COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_EOF
370 COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command017
371 COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command019
377 END_TESTCASE PBASE-F32-RDir-PublicApi-5009
380 START_TESTCASE PBASE-F32-RDir-PublicApi-5010
381 //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5010
383 //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) test, that checks that Open() works fine
385 //! Uses API elements: Open(), Read(), Close().
386 //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
387 //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType),
388 //! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb,
389 //! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt,
390 //! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt,
391 //! Test3.txt, USBLOAD.ZIP) as second parameter, and empty TUidType as
393 //! 3.Call RDir::Read(TEntry &anEntry) to read a single directory entry synchronously.
394 //! 4.Call RDir::Close().
395 //! @SYMTestStatus Implemented
396 //! @SYMTestPriority Critical
397 //! @SYMTestExpectedResults The Open() method call is completed returning KErrNone. The last Read() method call returns KErrEof as there are
398 //! only 5 *.txt files (test.txt, Test1.txt, Test2.txt, Test3.txt, test_rom.txt). All other verifications pass.
400 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
401 CREATE_OBJECT RFs RFs1
402 CREATE_OBJECT RDir RDir1
403 CREATE_OBJECT TEntry TEntry1
407 COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5010-001-Open_command005
408 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5010-001-Read_command007
409 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
410 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
411 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
412 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
413 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
414 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
415 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
416 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
417 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
418 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
419 COMMAND !Error=-25 RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
425 END_TESTCASE PBASE-F32-RDir-PublicApi-5010
428 START_TESTCASE PBASE-F32-RDir-PublicApi-5011
429 //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5011
431 //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) test, that checks that Open() works fine
433 //! Uses API elements: Open(), Read(), Close().
434 //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
435 //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
436 //! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb,
437 //! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt,
438 //! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt,
439 //! Test3.txt, USBLOAD.ZIP) as second parameter, and
440 //! KEntryAttNormal as third parameter.
441 //! 3.Call RDir::Read(TEntry &anEntry) to read a single directory entry synchronously.
442 //! 4.Call RDir::Close().
443 //! @SYMTestStatus Implemented
444 //! @SYMTestPriority Critical
445 //! @SYMTestExpectedResults The Open() method call is completed returning KErrNone. The last Read() method call returns KErrEof as there are
446 //! only 3 Test?.txt files (Test1.txt, Test2.txt, Test3.txt). All other verifications pass.
448 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
449 CREATE_OBJECT RFs RFs1
450 CREATE_OBJECT RDir RDir1
451 CREATE_OBJECT TEntry TEntry1
455 COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5011-001-Open_command005
456 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5011-001-Read_command006
457 COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_Test1
458 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5011-001-Read_command006
459 COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_Test2
460 COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5011-001-Read_command008
461 COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_Test3
462 COMMAND !Error=-25 RDir1 Read PBASE-F32-RDir-PublicApi-5011-001-Read_command009
463 COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_EOF
469 END_TESTCASE PBASE-F32-RDir-PublicApi-5011
472 //////////////////////////////////////////////////////////////////////
473 //////////////////////////////////////////////////////////////////////
475 ////// /////////////////////////////////// //////
476 ////// /// /// //////
477 ////// /// NEGATIVE TESTS /// //////
478 ////// /// /// //////
479 ////// /////////////////////////////////// //////
481 //////////////////////////////////////////////////////////////////////
482 //////////////////////////////////////////////////////////////////////
485 ////////////////////////////////////////////////////////////////////
488 //Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType)
490 ////////////////////////////////////////////////////////////////////
492 START_TESTCASE PBASE-F32-RDir-PublicApi-5101
493 //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5101
495 //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) negative test, that tries to open
496 //! a directory which not exist and using the NULL UIDs.
497 //! Uses API elements: Open(), Close().
498 //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
499 //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType),
500 //! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\NotExist\ as second parameter,
501 //! and empty TUidType as third parameter.
502 //! 3.Call RDir::Close().
503 //! @SYMTestStatus Implemented
504 //! @SYMTestPriority Critical
505 //! @SYMTestExpectedResults The Open() method call returns error -12 (KErrPathNotFound).
507 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
508 CREATE_OBJECT RFs RFs1
509 CREATE_OBJECT RDir RDir1
513 COMMAND !Error=-12 RDir1 Open PBASE-F32-RDir-PublicApi-5101-001-Open_command005
518 END_TESTCASE PBASE-F32-RDir-PublicApi-5101
521 START_TESTCASE PBASE-F32-RDir-PublicApi-5102
522 //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5102
524 //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) negative test, that tries to open
525 //! a directory using the NULL UIDs when directory path is not correct.
526 //! Uses API elements: Open(), Close().
527 //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
528 //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType),
529 //! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\\\\as second parameter,
530 //! and empty TUidType as third parameter.
531 //! 3.Call RDir::Close().
532 //! @SYMTestStatus Implemented
533 //! @SYMTestPriority Critical
534 //! @SYMTestExpectedResults The Open() method call returns error -28 (KErrBadName).
536 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
537 CREATE_OBJECT RFs RFs1
538 CREATE_OBJECT RDir RDir1
542 COMMAND !Error=-28 RDir1 Open PBASE-F32-RDir-PublicApi-5102-001-Open_command005
547 END_TESTCASE PBASE-F32-RDir-PublicApi-5102
550 //////////////////////////////////////////////////////////
553 //Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask)
555 //////////////////////////////////////////////////////////
557 START_TESTCASE PBASE-F32-RDir-PublicApi-5103
558 //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5103
560 //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) test, that tries to open a directory
561 //! when directory path is not correct.
562 //! Uses API elements: Open(), Close().
563 //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
564 //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
565 //! and empty RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\\\\ as second parameter,
566 //! and KEntryAttNormal as third parameter.
567 //! 3.Call RDir::Close().
568 //! @SYMTestStatus Implemented
569 //! @SYMTestPriority Critical
570 //! @SYMTestExpectedResults The Open() method call returns error -28 (KErrBadName).
572 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
573 CREATE_OBJECT RFs RFs1
574 CREATE_OBJECT RDir RDir1
578 COMMAND !Error=-28 RDir1 Open PBASE-F32-RDir-PublicApi-5103-001-Open_command005
583 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
584 CREATE_OBJECT RFs RFs1
585 CREATE_OBJECT CFileMan CFileMan1
588 COMMAND CFileMan1 NewL PBASE-F32-RDir-PublicApi-NewL
589 COMMAND CFileMan1 Delete PBASE-F32-RDir-PublicApi-001-Delete
590 COMMAND RFs1 RmDir PBASE-F32-RDir-PublicApi-001-RmDir
595 END_TESTCASE PBASE-F32-RDir-PublicApi-5103