os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-File-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 Alvar Udras
20 //! @SYMScriptDescription The test script contains API tests for the following functions of RFile class:
21 //! TInt Open(RFs &aFs, const TDesC &aName, TUint aFileMode);
23 //! TInt Create(RFs &aFs, const TDesC &aName, TUint aFileMode);
24 //! TInt Replace(RFs &aFs, const TDesC &aName, TUint aFileMode);
25 //! TInt Temp(RFs &aFs, const TDesC &aPath, TFileName &aName, TUint aFileMode);
26 //! TInt Read(TDes8 &aDes) const;
27 //! void Read(TDes8 &aDes, TRequestStatus &aStatus) const;
28 //! TInt Read(TDes8 &aDes, TInt aLength) const;
29 //! void Read(TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) const;
30 //! TInt Read(TInt aPos, TDes8 &aDes) const;
31 //! void Read(TInt aPos, TDes8 &aDes, TRequestStatus &aStatus) const;
32 //! TInt Read(TInt aPos, TDes8 &aDes, TInt aLength) const;
33 //! void Read(TInt aPos, TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) const;
34 //! void ReadCancel(TRequestStatus &aStatus) const;
35 //! void ReadCancel() const;
36 //! TInt Write(const TDesC8 &aDes);
37 //! void Write(const TDesC8 &aDes, TRequestStatus &aStatus);
38 //! TInt Write(const TDesC8 &aDes, TInt aLength);
39 //! void Write(const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus);
40 //! TInt Write(TInt aPos, const TDesC8 &aDes);
41 //! void Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus);
42 //! TInt Write(TInt aPos, const TDesC8 &aDes, TInt aLength);
43 //! void Write(TInt aPos, const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus);
44 //! TInt Lock(TInt aPos, TInt aLength) const;
45 //! TInt UnLock(TInt aPos, TInt aLength) const;
46 //! TInt Seek(TSeek aMode, TInt &aPos) const;
48 //! void Flush(TRequestStatus &aStatus);
49 //! TInt Size(TInt &aSize) const;
50 //! TInt SetSize(TInt aSize);
51 //! TInt Att(TUint &aAttValue) const;
52 //! TInt SetAtt(TUint aSetAttMask, TUint aClearAttMask);
53 //! TInt Modified(TTime &aTime) const;
54 //! TInt SetModified(const TTime &aTime);
55 //! TInt Set(const TTime &aTime, TUint aSetAttMask, TUint aClearAttMask);
56 //! TInt ChangeMode(TFileMode aNewMode);
57 //! TInt Rename(const TDesC &aNewName);
58 //! TInt Drive(TInt &aDriveNumber, TDriveInfo &aDriveInfo) const;
59 //! TInt Name(TDes &aName) const;
60 //! TInt Duplicate(const RFile &aFile, TOwnerType aType=EOwnerProcess);
61 //! TInt FullName(TDes &aName) const;
67 START_TESTCASE PBASE-F32-File-PublicApi-Install
68 //! @SYMTestCaseID PBASE-F32-File-PublicApi-Install
70 //! @SYMTestCaseDesc Setup the Environment to test RFile APIs by creating directories.
71 //! @SYMTestActions 1. Rfs::New() to create Rfs Object.
72 //! 2. Rfs::MkDirAll() to create directories required.
73 //! @SYMTestStatus Implemented
74 //! @SYMTestPriority Critical
75 //! @SYMTestExpectedResults Directories get created.
78 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
79 CREATE_OBJECT RFs RFs1
82 COMMAND RFs1 MkDirAll PBASE-F32-File-PublicApi-Install
85 END_TESTCASE PBASE-F32-File-PublicApi-Install
88 START_TESTCASE PBASE-F32-File-PublicApi-0001
89 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0001
91 //! @SYMTestCaseDesc Function Open() test. Open a file and close it.
92 //! Uses API elements: Open().
93 //! @SYMTestActions 1. Create RFs session
94 //! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc0001.txt", EFileShareAny | EFileWrite
95 //! 3. Write "open test" to file.
97 //! 5. Open file "{Drives, RAMDriveTestPath}file\tc0001.txt", with EFileRead
98 //! 6. Read from file to determine, that the file is opened.
101 //! 9. Close file system.
103 //! @SYMTestStatus Implemented
104 //! @SYMTestPriority Critical
105 //! @SYMTestExpectedResults RFile::Open() returns KErrNone. File is opened after Open call.
108 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
109 CREATE_OBJECT RFs RFs1
110 CREATE_OBJECT RFile file
114 COMMAND file Replace PBASE-F32-File-PublicApi-0001-001-Replace_command005
115 COMMAND file Write PBASE-F32-File-PublicApi-0001-001-Write_command006
117 COMMAND file Open PBASE-F32-File-PublicApi-0001-001-Open_command008
118 COMMAND file Read PBASE-F32-File-PublicApi-0001-001-Read_command009
121 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0001-001-Delete_command013
124 END_TESTCASE PBASE-F32-File-PublicApi-0001
127 //FileModes - EFileRead
130 START_TESTCASE PBASE-F32-File-PublicApi-4001
131 //! @SYMTestCaseID PBASE-F32-File-PublicApi-4001
133 //! @SYMTestCaseDesc Function TFileMode::EFileRead test. open file for reading and try to write to it.
134 //! Uses API elements: Open().
135 //! @SYMTestActions 1. Create RFs session
136 //! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4001.txt", EFileShareAny | EFileWrite
138 //! 4. Open file "{Drives, RAMDriveTestPath}file\tc4001.txt", with EFileRead
139 //! 5. Write "test" to file.
142 //! 8. Close file system.
144 //! @SYMTestStatus Implemented
145 //! @SYMTestPriority Critical
146 //! @SYMTestExpectedResults RFile::Write returns KErrAccessDenied.
149 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
150 CREATE_OBJECT RFs RFs1
151 CREATE_OBJECT RFile file
155 COMMAND file Replace PBASE-F32-File-PublicApi-4001-001-Replace_command005
157 COMMAND file Open PBASE-F32-File-PublicApi-4001-001-Open_command007
158 COMMAND !Error=-21 file Write PBASE-F32-File-PublicApi-4001-001-Write_command008
161 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4001-001-Delete_command012
164 END_TESTCASE PBASE-F32-File-PublicApi-4001
167 //EFileShareExclusive
170 START_TESTCASE PBASE-F32-File-PublicApi-4002
171 //! @SYMTestCaseID PBASE-F32-File-PublicApi-4002
173 //! @SYMTestCaseDesc Function TFileMode::EFileShareExclusive test. Open a file in EFileShareExclusive and try to open the same file through another handle.
174 //! Uses API elements: Open().
175 //! @SYMTestActions 1. Create RFs session
176 //! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4002.txt", EFileShareAny | EFileWrite.
178 //! 4. Open file "{Drives, RAMDriveTestPath}file\tc4002.txt", with EFileShareExclusive
179 //! 5. Open "{Drives, RAMDriveTestPath}file\tc4002.txt" through new handle called file2, with EFileShareExlusive
182 //! 8. Close file system.
184 //! @SYMTestStatus Implemented
185 //! @SYMTestPriority Critical
186 //! @SYMTestExpectedResults RFile::Open returns KErrInUse.
189 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
190 CREATE_OBJECT RFs RFs1
191 CREATE_OBJECT RFile file
192 CREATE_OBJECT RFile file2
196 COMMAND file Replace PBASE-F32-File-PublicApi-4002-001-Replace_command005
198 COMMAND file Open PBASE-F32-File-PublicApi-4002-001-Open_command007
200 COMMAND !Error=-14 file2 Open PBASE-F32-File-PublicApi-4002-001-Open_command010
205 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4002-001-Delete_command017
208 END_TESTCASE PBASE-F32-File-PublicApi-4002
211 //EFileShareReadersOnly
214 START_TESTCASE PBASE-F32-File-PublicApi-4003
215 //! @SYMTestCaseID PBASE-F32-File-PublicApi-4003
217 //! @SYMTestCaseDesc Function TFileMode::EFileShareReadersOnly test. Open a file in EFileShareReadersOnly and try to write to it through another handle.
218 //! Uses API elements: Open().
219 //! @SYMTestActions 1. Create RFs session
220 //! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4003.txt", EFileShareAny | EFileWrite
221 //! 3. Write "open test" to file.
223 //! 5. Open file "{Drives, RAMDriveTestPath}file\tc4003.txt", with EFileShareReadersOnly
224 //! 6. Open "{Drives, RAMDriveTestPath}file\tc4003.txt" through new handle called file2 EFileRead.
225 //! 7. Read from file.
226 //! 8. Try to write "will cause error" to file.
229 //! 11. Close file system.
231 //! @SYMTestStatus Implemented
232 //! @SYMTestPriority Critical
233 //! @SYMTestExpectedResults RFile::Write returns KErrAccessDenied.
236 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
237 CREATE_OBJECT RFs RFs1
238 CREATE_OBJECT RFile file
239 CREATE_OBJECT RFile file2
243 COMMAND file Replace PBASE-F32-File-PublicApi-4003-001-Replace_command005
244 COMMAND file Write PBASE-F32-File-PublicApi-4003-001-Write_command006
246 COMMAND file Open PBASE-F32-File-PublicApi-4003-001-Open_command008
248 COMMAND file2 Open PBASE-F32-File-PublicApi-4003-001-Open_command011
249 COMMAND file2 Read PBASE-F32-File-PublicApi-4003-001-Read_command012
250 COMMAND !Error=-21 file2 Write PBASE-F32-File-PublicApi-4003-001-Write_command013
255 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4003-001-Delete_command020
258 END_TESTCASE PBASE-F32-File-PublicApi-4003
263 START_TESTCASE PBASE-F32-File-PublicApi-4004
264 //! @SYMTestCaseID PBASE-F32-File-PublicApi-4004
266 //! @SYMTestCaseDesc Function TFileMode::EFileShareAny test. Open a file in EFileShareAny and try to write to it through another handle.
267 //! Uses API elements: Open().
268 //! @SYMTestActions 1. Create RFs session
269 //! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4004.txt", EFileShareAny | EFileWrite
270 //! 3. Write "open test" to file.
272 //! 5. Open file "{Drives, RAMDriveTestPath}file\tc4004.txt", with EFileShareAny.
273 //! 6. Open "{Drives, RAMDriveTestPath}file\tc4004.txt" through new handle called file2 EFileShareAny | EFileWrite.
274 //! 7. Read from file.
275 //! 8. Try to write "open test" to file.
278 //! 11. Close file system.
280 //! @SYMTestStatus Implemented
281 //! @SYMTestPriority Critical
282 //! @SYMTestExpectedResults No error is returned or panic raised.
285 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
286 CREATE_OBJECT RFs RFs1
287 CREATE_OBJECT RFile file
288 CREATE_OBJECT RFile file2
292 COMMAND file Replace PBASE-F32-File-PublicApi-4004-001-Replace_command005
293 COMMAND file Write PBASE-F32-File-PublicApi-4004-001-Write_command006
295 COMMAND file Open PBASE-F32-File-PublicApi-4004-001-Open_command008
297 COMMAND file2 Open PBASE-F32-File-PublicApi-4004-001-Open_command011
298 COMMAND file2 Read PBASE-F32-File-PublicApi-4004-001-Read_command012
299 COMMAND file2 Write PBASE-F32-File-PublicApi-4004-001-Write_command013
304 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4004-001-Delete_command020
307 END_TESTCASE PBASE-F32-File-PublicApi-4004
309 //EFileShareReadersOfWriters
311 START_TESTCASE PBASE-F32-File-PublicApi-4005
312 //! @SYMTestCaseID PBASE-F32-File-PublicApi-4005
314 //! @SYMTestCaseDesc Function TFileMode::EFileShareReadersOrWriters test. Open a file in EFileShareReadersOrWriters and try to write to it through another handle.
315 //! Uses API elements: Open().
316 //! @SYMTestActions 1. Create RFs session
317 //! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4005.txt", EFileShareAny | EFileWrite.
318 //! 3. Write "open test" to file.
320 //! 5. Open file "{Drives, RAMDriveTestPath}file\tc4005.txt", with EFileShareReadersOrWriters | EFileRead.
321 //! 6. Open "{Drives, RAMDriveTestPath}file\tc4005.txt" through new handle called file2, EFileShareReadersOrWriters | EFileWrite.
322 //! 7. Read from file.
323 //! 8. Try to write "open test" to file.
326 //! 11. Close file system.
328 //! @SYMTestStatus Implemented
329 //! @SYMTestPriority Critical
330 //! @SYMTestExpectedResults No errors returned or panics raised.
333 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
334 CREATE_OBJECT RFs RFs1
335 CREATE_OBJECT RFile file
336 CREATE_OBJECT RFile file2
340 COMMAND file Replace PBASE-F32-File-PublicApi-4005-001-Replace_command005
341 COMMAND file Write PBASE-F32-File-PublicApi-4005-001-Write_command006
343 COMMAND file Open PBASE-F32-File-PublicApi-4005-001-Open_command008
345 COMMAND file2 Open PBASE-F32-File-PublicApi-4005-001-Open_command011
346 COMMAND file2 Read PBASE-F32-File-PublicApi-4005-001-Read_command012
347 COMMAND file2 Write PBASE-F32-File-PublicApi-4005-001-Write_command013
352 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4005-001-Delete_command020
355 END_TESTCASE PBASE-F32-File-PublicApi-4005
357 START_TESTCASE PBASE-F32-File-PublicApi-0003
358 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0003
360 //! @SYMTestCaseDesc Function Create() test. Create a file.
361 //! Uses API elements: Create().
362 //! @SYMTestActions 1. Create RFs session
363 //! 2. Call RFile::Create passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0003.txt", EFileShareAny
364 //! 3. Open the file.
365 //! 4. Write literal "test created this file" to file.
370 //! @SYMTestStatus Implemented
371 //! @SYMTestPriority Critical
372 //! @SYMTestExpectedResults RFile::Create() returns KErrNone. File is created. No panics raised or errors returned
375 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
376 CREATE_OBJECT RFs RFs1
377 CREATE_OBJECT RFile file
381 COMMAND file Create PBASE-F32-File-PublicApi-0003-001-Create_command005
382 COMMAND file Write PBASE-F32-File-PublicApi-0003-001-Write_command006
385 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0003-001-Delete_command010
388 END_TESTCASE PBASE-F32-File-PublicApi-0003
391 START_TESTCASE PBASE-F32-File-PublicApi-0004
392 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0004
394 //! @SYMTestCaseDesc Function Replace() test. Replace a file.
395 //! Uses API elements: Replace().
396 //! @SYMTestActions 1. Create RFs session
397 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0004.txt", EFileWrite
398 //! 3. Call RFile::Write passing literal "This file is replaced"
399 //! 4. Call Flush on file.
402 //! 7. Read the file.
407 //! @SYMTestStatus Implemented
408 //! @SYMTestPriority Critical
409 //! @SYMTestExpectedResults RFile::Replace returns KErrNone. File contains written literal and nothing else.
412 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
413 CREATE_OBJECT RFs RFs1
414 CREATE_OBJECT RFile file
418 COMMAND file Replace PBASE-F32-File-PublicApi-0004-001-Replace_command005
419 COMMAND file Write PBASE-F32-File-PublicApi-0004-001-Write_command006
422 COMMAND file Open PBASE-F32-File-PublicApi-0004-001-Open_command009
426 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0004-001-Delete_command013
429 END_TESTCASE PBASE-F32-File-PublicApi-0004
432 START_TESTCASE PBASE-F32-File-PublicApi-0005
433 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0005
435 //! @SYMTestCaseDesc Function Temp() test. Create a temporary file.
436 //! Uses API elements: Temp().
437 //! @SYMTestActions 1. Create RFs session
438 //! 2. Call RFile::Temp passing RFs, literal "{Drives, RAMDriveTestPath}file\", TDesc&, EFileWrite
439 //! 3. Call RFile::Write passing literal "This is temporary file"
440 //! 4. Rename the file to "tc0005.txt".
442 //! 6. Delete temporary file.
445 //! @SYMTestStatus Implemented
446 //! @SYMTestPriority Critical
447 //! @SYMTestExpectedResults RFile::Temp() returns KErrNone, temporary file is created.
450 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
451 CREATE_OBJECT RFs RFs1
452 CREATE_OBJECT RFile file
456 COMMAND file Temp PBASE-F32-File-PublicApi-0005-001-Temp_command005
457 COMMAND file Write PBASE-F32-File-PublicApi-0005-001-Write_command006
458 COMMAND file Rename PBASE-F32-File-PublicApi-0005-001-Rename_command007
461 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0005-001-Delete_command011
464 END_TESTCASE PBASE-F32-File-PublicApi-0005
467 START_TESTCASE PBASE-F32-File-PublicApi-0006
468 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0006
470 //! @SYMTestCaseDesc Synchronous Read(TDes8 &aDes) test - will open file and read its contents to a buffer.
471 //! Uses API elements: Read().
472 //! @SYMTestActions 1. Create RFs session
473 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0006.txt", EFileWrite
474 //! 3. Call RFile::Write passing literal "Synchronous read test!".
475 //! 4. Set the file position to 0.
476 //! 5. Call RFile::Read().
481 //! @SYMTestStatus Implemented
482 //! @SYMTestPriority Critical
483 //! @SYMTestExpectedResults RFile::Read() returns KErrNone. Data is read and verified.
486 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
487 CREATE_OBJECT RFs RFs1
488 CREATE_OBJECT RFile file
492 COMMAND file Replace PBASE-F32-File-PublicApi-0006-001-Replace_command005
493 COMMAND file Write PBASE-F32-File-PublicApi-0006-001-Write_command006
494 COMMAND file Seek PBASE-F32-File-PublicApi-0006-001-Seek_command007
495 COMMAND file Read PBASE-F32-File-PublicApi-0006-001-Read_command008
498 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0006-001-Delete_command012
501 END_TESTCASE PBASE-F32-File-PublicApi-0006
504 START_TESTCASE PBASE-F32-File-PublicApi-0007
505 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0007
507 //! @SYMTestCaseDesc Asynchronous Read(TDes8& aDes, TRequestStatus &aStatus) test - will open file and read its contents to a buffer.
508 //! Uses API elements: Read().
509 //! @SYMTestActions 1. Create RFs session.
510 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0007.txt", EFileWrite.
511 //! 3. Call RFile::Write passing literal "asynchronous read test"
512 //! 4. Reset file position
513 //! 5. Call RFile::Read() passing TRequestStatus.
514 //! 6. Wait until asynchronous call completes
519 //! @SYMTestStatus Implemented
520 //! @SYMTestPriority Critical
521 //! @SYMTestExpectedResults The asynchronous read call finishes with KErrNone. Data is read and verified.
524 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
525 CREATE_OBJECT RFs RFs1
526 CREATE_OBJECT RFile file
530 COMMAND file Replace PBASE-F32-File-PublicApi-0007-001-Replace_command005
531 COMMAND file Write PBASE-F32-File-PublicApi-0007-001-Write_command006
532 COMMAND file Seek PBASE-F32-File-PublicApi-0007-001-Seek_command007
533 COMMAND file Read PBASE-F32-File-PublicApi-0007-001-Read_command008
537 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0007-001-Delete_command012
540 END_TESTCASE PBASE-F32-File-PublicApi-0007
543 START_TESTCASE PBASE-F32-File-PublicApi-0008
544 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0008
546 //! @SYMTestCaseDesc Synchronous Read(TDes8 &aDes, TInt aLength) test - will open file and read fixed length from its contents to a buffer.
547 //! Uses API elements: Read().
548 //! @SYMTestActions 1. Create RFs session
549 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0008.txt", EFileWrite
550 //! 3. Write "synchronous read with length test" to file
551 //! 4. Reset file position.
552 //! 5. Call RFile::Read() passing TDesC, 5 for the length
557 //! @SYMTestStatus Implemented
558 //! @SYMTestPriority Critical
559 //! @SYMTestExpectedResults RFile::Read() returns KErrNone. Data is read and verified.
562 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
563 CREATE_OBJECT RFs RFs1
564 CREATE_OBJECT RFile file
568 COMMAND file Replace PBASE-F32-File-PublicApi-0008-001-Replace_command005
569 COMMAND file Write PBASE-F32-File-PublicApi-0008-001-Write_command006
570 COMMAND file Seek PBASE-F32-File-PublicApi-0008-001-Seek_command007
571 COMMAND file Read PBASE-F32-File-PublicApi-0008-001-Read_command008
574 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0008-001-Delete_command012
577 END_TESTCASE PBASE-F32-File-PublicApi-0008
580 START_TESTCASE PBASE-F32-File-PublicApi-0009
581 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0009
583 //! @SYMTestCaseDesc Asynchronous Read(TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) test - will open file and read fixed length from its contents to a buffer.
584 //! Uses API elements: Read().
585 //! @SYMTestActions 1. Create RFs session.
586 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0009.txt", EFileWrite.
587 //! 3. Call RFile::Write passing literal "Asynchronous read with length test"
588 //! 4. Reset file position
589 //! 4. Create TRequestStatus variable.
590 //! 5. Call RFile::Read() passing TRequestStatus and 5 for length.
591 //! 6. Wait until asynchronous call completes
596 //! @SYMTestStatus Implemented
597 //! @SYMTestPriority Critical
598 //! @SYMTestExpectedResults The asynchronous read call finishes with KErrNone. Data is read and verified.
601 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
602 CREATE_OBJECT RFs RFs1
603 CREATE_OBJECT RFile file
607 COMMAND file Replace PBASE-F32-File-PublicApi-0009-001-Replace_command005
608 COMMAND file Write PBASE-F32-File-PublicApi-0009-001-Write_command006
609 COMMAND file Seek PBASE-F32-File-PublicApi-0009-001-Seek_command007
610 COMMAND file Read PBASE-F32-File-PublicApi-0009-001-Read_command008
614 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0009-001-Delete_command012
617 END_TESTCASE PBASE-F32-File-PublicApi-0009
620 START_TESTCASE PBASE-F32-File-PublicApi-0010
621 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0010
623 //! @SYMTestCaseDesc Synchronous Read(TInt aPos, TDes8 &aDes) test - will open file and read from given position its contents to a buffer.
624 //! Uses API elements: Read().
625 //! @SYMTestActions 1. Create RFs session
626 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0010.txt", EFileWrite
627 //! 3. Write "synchronous read with position test" to file
628 //! 4. Reset file position.
629 //! 5. Call RFile::Read() passing 5 for position.
634 //! @SYMTestStatus Implemented
635 //! @SYMTestPriority Critical
636 //! @SYMTestExpectedResults RFile::Read() returns KErrNone. Data is read and verified.
639 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
640 CREATE_OBJECT RFs RFs1
641 CREATE_OBJECT RFile file
645 COMMAND file Replace PBASE-F32-File-PublicApi-0010-001-Replace_command005
646 COMMAND file Write PBASE-F32-File-PublicApi-0010-001-Write_command006
647 COMMAND file Seek PBASE-F32-File-PublicApi-0010-001-Seek_command007
648 COMMAND file Read PBASE-F32-File-PublicApi-0010-001-Read_command008
651 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0010-001-Delete_command012
654 END_TESTCASE PBASE-F32-File-PublicApi-0010
657 START_TESTCASE PBASE-F32-File-PublicApi-0011
658 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0011
660 //! @SYMTestCaseDesc Asynchronous Read(TInt aPos, TDes8 &aDes, TRequestStatus &aStatus) test - will open file and read from given position its contents to a buffer.
661 //! Uses API elements: Read().
662 //! @SYMTestActions 1. Create RFs session.
663 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0011.txt", EFileWrite.
664 //! 3. Call RFile::Write passing literal "asynchronous read with position test"
665 //! 4. Reset file position
666 //! 5. Call RFile::Read() passing TRequestStatus and 5 for position.
667 //! 6. Wait until asynchronous call completes
672 //! @SYMTestStatus Implemented
673 //! @SYMTestPriority Critical
674 //! @SYMTestExpectedResults The asynchronous read call finishes with KErrNone. Data is read and verified.
677 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
678 CREATE_OBJECT RFs RFs1
679 CREATE_OBJECT RFile file
683 COMMAND file Replace PBASE-F32-File-PublicApi-0011-001-Replace_command005
684 COMMAND file Write PBASE-F32-File-PublicApi-0011-001-Write_command006
685 COMMAND file Seek PBASE-F32-File-PublicApi-0011-001-Seek_command007
686 COMMAND file Read PBASE-F32-File-PublicApi-0011-001-Read_command008
690 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0011-001-Delete_command012
693 END_TESTCASE PBASE-F32-File-PublicApi-0011
696 START_TESTCASE PBASE-F32-File-PublicApi-0012
697 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0012
699 //! @SYMTestCaseDesc Synchronous Read(TInt aPos, TDes8 &aDes, TInt aLength) test - will open file and read from given position fixed length of contents into a buffer.
700 //! Uses API elements: Read().
701 //! @SYMTestActions 1. Create RFs session
702 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0012.txt", EFileWrite
703 //! 3. Write "synchronous read with length and position test" to file
704 //! 4. Reset file position.
705 //! 5. Call RFile::Read() passing 5 for length and 5 for position.
710 //! @SYMTestStatus Implemented
711 //! @SYMTestPriority Critical
712 //! @SYMTestExpectedResults RFile::Read() returns KErrNone. Data is read and verified.
715 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
716 CREATE_OBJECT RFs RFs1
717 CREATE_OBJECT RFile file
721 COMMAND file Replace PBASE-F32-File-PublicApi-0012-001-Replace_command005
722 COMMAND file Write PBASE-F32-File-PublicApi-0012-001-Write_command006
723 COMMAND file Seek PBASE-F32-File-PublicApi-0012-001-Seek_command007
724 COMMAND file Read PBASE-F32-File-PublicApi-0012-001-Read_command008
727 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0012-001-Delete_command012
730 END_TESTCASE PBASE-F32-File-PublicApi-0012
733 START_TESTCASE PBASE-F32-File-PublicApi-0013
734 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0013
736 //! @SYMTestCaseDesc Asynchronous Read(TInt aPos, TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) test - will open file and read from given position fixed length of contents into a buffer.
737 //! Uses API elements: Read().
738 //! @SYMTestActions 1. Create RFs session.
739 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0013.txt", EFileWrite.
740 //! 3. Call RFile::Write passing literal "asynchronous read with length and position test"
741 //! 4. Reset file position
742 //! 5. Call RFile::Read() passing TRequestStatus, 5 for length and 5 for position.
743 //! 6. Wait until asynchronous call completes
748 //! @SYMTestStatus Implemented
749 //! @SYMTestPriority Critical
750 //! @SYMTestExpectedResults The asynchronous read call finishes with KErrNone. Data is read and verified.
753 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
754 CREATE_OBJECT RFs RFs1
755 CREATE_OBJECT RFile file
759 COMMAND file Replace PBASE-F32-File-PublicApi-0013-001-Replace_command005
760 COMMAND file Write PBASE-F32-File-PublicApi-0013-001-Write_command006
761 COMMAND file Seek PBASE-F32-File-PublicApi-0013-001-Seek_command007
762 COMMAND file Read PBASE-F32-File-PublicApi-0013-001-Read_command008
766 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0013-001-Delete_command011
769 END_TESTCASE PBASE-F32-File-PublicApi-0013
772 START_TESTCASE PBASE-F32-File-PublicApi-0014
773 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0014
775 //! @SYMTestCaseDesc Function ReadCancel(TRequestStatus aStatus) and EFileReadAsyncAll test.
776 //! Uses API elements: ReadCancel().
777 //! @SYMTestActions 1. Create RFs session.
778 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0014.txt", EFileWrite.
779 //! 3. Write message "short data" to file.
781 //! 5. Open fail again with EFileShareAny | EFileReadAsyncAll.
782 //! 6. Call RFile::Read() passing TRequestStatus.
783 //! 7. Call ReadCancel passing TRequestStatus.
788 //! @SYMTestStatus Implemented
789 //! @SYMTestPriority Critical
790 //! @SYMTestExpectedResults TRequestStatus returns KErrCancel after ReadCancel.
793 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
794 CREATE_OBJECT RFs RFs1
795 CREATE_OBJECT RFile file
799 COMMAND file Replace PBASE-F32-File-PublicApi-0014-001-Replace_command005
800 COMMAND file Write PBASE-F32-File-PublicApi-0014-001-Write_command006
802 COMMAND file Open PBASE-F32-File-PublicApi-0014-001-Open_command008
803 COMMAND file Seek PBASE-F32-File-PublicApi-0014-001-Seek_command009
804 COMMAND !AsyncError=-3 file Read PBASE-F32-File-PublicApi-0014-001-Read_command010
806 COMMAND file ReadCancel
807 COMMAND file ReadCancel
811 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0014-001-Delete_command015
814 END_TESTCASE PBASE-F32-File-PublicApi-0014
817 START_TESTCASE PBASE-F32-File-PublicApi-0015
818 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0015
820 //! @SYMTestCaseDesc Function ReadCancel() test, call two asynchronous reads consequently on the same file.
821 //! Uses API elements: ReadCancel().
822 //! @SYMTestActions 1. Create RFs session.
823 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0015.txt", EFileWrite.
824 //! 3. Write message "short data" to file.
826 //! 5. Open fail again with EFileShareAny | EFileReadAsyncAll.
827 //! 6. Call RFile::Read() passing TRequestStatus.
828 //! 7. Call RFile::Read() passing TRequestStatus.
829 //! 8. Call ReadCancel.
834 //! @SYMTestStatus Implemented
835 //! @SYMTestPriority Critical
836 //! @SYMTestExpectedResults Both TRequestStatuses return KErrCancel after ReadCancel.
839 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
840 CREATE_OBJECT RFs RFs1
841 CREATE_OBJECT RFile file
845 COMMAND file Replace PBASE-F32-File-PublicApi-0015-001-Replace_command005
846 COMMAND file Write PBASE-F32-File-PublicApi-0015-001-Write_command006
848 COMMAND file Open PBASE-F32-File-PublicApi-0015-001-Open_command008
849 COMMAND file Seek PBASE-F32-File-PublicApi-0015-001-Seek_command009
850 COMMAND !AsyncError=-3 file Read PBASE-F32-File-PublicApi-0015-001-Read_command010
851 COMMAND !AsyncError=-3 file Read PBASE-F32-File-PublicApi-0015-001-Read_command011
853 COMMAND file ReadCancel PBASE-F32-File-PublicApi-0015-001-ReadCancel_command012
857 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0015-001-Delete_command016
860 END_TESTCASE PBASE-F32-File-PublicApi-0015
863 START_TESTCASE PBASE-F32-File-PublicApi-0016
864 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0016
866 //! @SYMTestCaseDesc Synchronous Write(const TDesC8 &aDes) test - will open file and Write to it from given buffer.
867 //! Uses API elements: Write(const TDesC8 &aDes).
868 //! @SYMTestActions 1. Create RFs session
869 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0016.txt", EFileWrite
870 //! 3. Call RFile::Write() passing "Write test".
871 //! 4. Reset file position
872 //! 5. Read from file to verify it's content.
877 //! @SYMTestStatus Implemented
878 //! @SYMTestPriority Critical
879 //! @SYMTestExpectedResults RFile::Write() returns KErrNone. File contains written data.
882 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
883 CREATE_OBJECT RFs RFs1
884 CREATE_OBJECT RFile file
888 COMMAND file Replace PBASE-F32-File-PublicApi-0016-001-Replace_command005
889 COMMAND file Write PBASE-F32-File-PublicApi-0016-001-Write_command006
892 COMMAND file Open PBASE-F32-File-PublicApi-0016-001-Open_command009
893 COMMAND file Read PBASE-F32-File-PublicApi-0016-001-Read_command010
896 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0016-001-Delete_command014
899 END_TESTCASE PBASE-F32-File-PublicApi-0016
902 START_TESTCASE PBASE-F32-File-PublicApi-0017
903 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0017
905 //! @SYMTestCaseDesc Asynchronous Write(const TDesC8 &aDes, TRequestStatus &aStat) test - will open file and Write to it from given buffer.
906 //! Uses API elements: Write(const TDesC8 &aDes, TRequestStatus &aStat).
907 //! @SYMTestActions 1. Create RFs session.
908 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0017.txt", EFileWrite.
909 //! 3. Call RFile::Write() passing "Asynchronous write test" and TRequestStatus.
910 //! 4. Wait for request to complete.
911 //! 5. Reset file position
912 //! 6. Read from file to verify it's content.
917 //! @SYMTestStatus Implemented
918 //! @SYMTestPriority Critical
919 //! @SYMTestExpectedResults Write completes with KErrNone. File contains written data.
922 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
923 CREATE_OBJECT RFs RFs1
924 CREATE_OBJECT RFile file
928 COMMAND file Replace PBASE-F32-File-PublicApi-0017-001-Replace_command005
929 COMMAND file Write PBASE-F32-File-PublicApi-0017-001-Write_command006
933 COMMAND file Open PBASE-F32-File-PublicApi-0017-001-Open_command009
934 COMMAND file Read PBASE-F32-File-PublicApi-0017-001-Read_command010
937 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0017-001-Delete_command014
940 END_TESTCASE PBASE-F32-File-PublicApi-0017
943 START_TESTCASE PBASE-F32-File-PublicApi-0018
944 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0018
946 //! @SYMTestCaseDesc Synchronous Write(const TDesC8 &aDes, TInt aLength) test - will open file and Write to it fixed length bytes from given buffer.
947 //! Uses API elements: Write(const TDesC8 &aDes, TInt aLength).
948 //! @SYMTestActions 1. Create RFs session
949 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0018.txt", EFileWrite
950 //! 3. Call RFile::Write() passing "Synchronous write test with length", and 5 for length to write.
951 //! 4. Reset file position
952 //! 5. Read from file to verify it's content.
957 //! @SYMTestStatus Implemented
958 //! @SYMTestPriority Critical
959 //! @SYMTestExpectedResults RFile::Write() returns KErrNone. File contains written data.
962 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
963 CREATE_OBJECT RFs RFs1
964 CREATE_OBJECT RFile file
968 COMMAND file Replace PBASE-F32-File-PublicApi-0018-001-Replace_command005
969 COMMAND file Write PBASE-F32-File-PublicApi-0018-001-Write_command006
972 COMMAND file Open PBASE-F32-File-PublicApi-0018-001-Open_command009
973 COMMAND file Read PBASE-F32-File-PublicApi-0018-001-Read_command010
976 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0018-001-Delete_command014
979 END_TESTCASE PBASE-F32-File-PublicApi-0018
982 START_TESTCASE PBASE-F32-File-PublicApi-0019
983 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0019
985 //! @SYMTestCaseDesc Asynchronous Write(const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus) test - will open file and Write to it fixed length bytes from given buffer.
986 //! Uses API elements: Write(const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus).
987 //! @SYMTestActions 1. Create RFs session.
988 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0019.txt", EFileWrite.
989 //! 3. Call RFile::Write() passing "Asynchronous write test with length", 5 for length and TRequestStatus.
990 //! 4. Wait for request to complete.
991 //! 5. Reset file position
992 //! 6. Read from file to verify it's content.
997 //! @SYMTestStatus Implemented
998 //! @SYMTestPriority Critical
999 //! @SYMTestExpectedResults Write completes with KErrNone. File contains written data.
1001 //! @SYMTestType CIT
1002 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1003 CREATE_OBJECT RFs RFs1
1004 CREATE_OBJECT RFile file
1006 COMMAND RFs1 Connect
1008 COMMAND file Replace PBASE-F32-File-PublicApi-0019-001-Replace_command005
1009 COMMAND file Write PBASE-F32-File-PublicApi-0019-001-Write_command006
1013 COMMAND file Open PBASE-F32-File-PublicApi-0019-001-Open_command009
1014 COMMAND file Read PBASE-F32-File-PublicApi-0019-001-Read_command010
1017 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0019-001-Delete_command014
1020 END_TESTCASE PBASE-F32-File-PublicApi-0019
1023 START_TESTCASE PBASE-F32-File-PublicApi-0020
1024 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0020
1026 //! @SYMTestCaseDesc Synchronous Write(TInt aPos, const TDesC8 &aDes) test - will open file and Write to it from given position.
1027 //! Uses API elements: Write(TInt aPos, const TDesC8 &aDes).
1028 //! @SYMTestActions 1. Create RFs session
1029 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0020.txt", EFileWrite
1030 //! 4. Call RFile::Write() passing "Synchronous write test with position", and 2 for position to write from.
1031 //! 5. Reset file position
1032 //! 6. Read from file to verify it's content.
1037 //! @SYMTestStatus Implemented
1038 //! @SYMTestPriority Critical
1039 //! @SYMTestExpectedResults RFile::Write() returns KErrNone. File contains written data.
1041 //! @SYMTestType CIT
1042 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1043 CREATE_OBJECT RFs RFs1
1044 CREATE_OBJECT RFile file
1046 COMMAND RFs1 Connect
1048 COMMAND file Replace PBASE-F32-File-PublicApi-0020-001-Replace_command005
1049 COMMAND file Write PBASE-F32-File-PublicApi-0020-001-Write_command006
1051 COMMAND file Write PBASE-F32-File-PublicApi-0020-001-Write_command008
1054 COMMAND file Open PBASE-F32-File-PublicApi-0020-001-Open_command011
1055 COMMAND file Read PBASE-F32-File-PublicApi-0020-001-Read_command012
1058 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0020-001-Delete_command016
1061 END_TESTCASE PBASE-F32-File-PublicApi-0020
1064 START_TESTCASE PBASE-F32-File-PublicApi-0021
1065 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0021
1067 //! @SYMTestCaseDesc Asynchronous Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus) test - will open file and Write to it from given position.
1068 //! Uses API elements: Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus).
1069 //! @SYMTestActions 1. Create RFs session.
1070 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0021.txt", EFileWrite.
1071 //! 3. Call RFile::Write() passing "Asynchronous write test with position", 2 for position and TRequestStatus.
1072 //! 4. Wait for request to complete.
1073 //! 5. Reset file position
1074 //! 6. Read from file to verify it's content.
1079 //! @SYMTestStatus Implemented
1080 //! @SYMTestPriority Critical
1081 //! @SYMTestExpectedResults TRequestStatus equals KErrNone after writing. File contains written data.
1083 //! @SYMTestType CIT
1084 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1085 CREATE_OBJECT RFs RFs1
1086 CREATE_OBJECT RFile file
1088 COMMAND RFs1 Connect
1090 COMMAND file Replace PBASE-F32-File-PublicApi-0021-001-Replace_command005
1091 COMMAND file Write PBASE-F32-File-PublicApi-0021-001-Write_command006
1093 COMMAND file Write PBASE-F32-File-PublicApi-0021-001-Write_command008
1097 COMMAND file Open PBASE-F32-File-PublicApi-0021-001-Open_command011
1098 COMMAND file Read PBASE-F32-File-PublicApi-0021-001-Read_command012
1101 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0021-001-Delete_command016
1104 END_TESTCASE PBASE-F32-File-PublicApi-0021
1107 START_TESTCASE PBASE-F32-File-PublicApi-0022
1108 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0022
1110 //! @SYMTestCaseDesc Synchronous Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test - will open file and Write to it from given position and fixed length of bytes.
1111 //! Uses API elements: Write(TInt aPos, const TDesC8 &aDes, TInt aLength).
1112 //! @SYMTestActions 1. Create RFs session
1113 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0022.txt", EFileWrite
1114 //! 3. Call RFile::Write() passing "Synchronous write test with position, length", 2 for position and 4 for length to write from.
1115 //! 4. Reset file position
1116 //! 5. Read from file to verify it's content.
1121 //! @SYMTestStatus Implemented
1122 //! @SYMTestPriority Critical
1123 //! @SYMTestExpectedResults RFile::Write() returns KErrNone. File contains written data.
1125 //! @SYMTestType CIT
1126 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1127 CREATE_OBJECT RFs RFs1
1128 CREATE_OBJECT RFile file
1130 COMMAND RFs1 Connect
1132 COMMAND file Replace PBASE-F32-File-PublicApi-0022-001-Replace_command005
1133 COMMAND file Write PBASE-F32-File-PublicApi-0022-001-Write_command006
1135 COMMAND file Write PBASE-F32-File-PublicApi-0022-001-Write_command008
1138 COMMAND file Open PBASE-F32-File-PublicApi-0022-001-Open_command011
1139 COMMAND file Read PBASE-F32-File-PublicApi-0022-001-Read_command012
1142 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0022-001-Delete_command016
1145 END_TESTCASE PBASE-F32-File-PublicApi-0022
1148 START_TESTCASE PBASE-F32-File-PublicApi-0023
1149 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0023
1151 //! @SYMTestCaseDesc Asynchronous Write(TInt aPos, const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus) test - will open file and Write to it from given position and fixed length of bytes.
1152 //! Uses API elements: Write(TInt aPos, const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus).
1153 //! @SYMTestActions 1. Create RFs session.
1154 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0023.txt", EFileWrite.
1155 //! 3. Call RFile::Write() passing "Asynchronous write test with position, length",2 for position, 4 for length and TRequestStatus.
1156 //! 4. Wait for request to complete.
1157 //! 5. Reset file position
1158 //! 6. Read from file to verify it's content.
1163 //! @SYMTestStatus Implemented
1164 //! @SYMTestPriority Critical
1165 //! @SYMTestExpectedResults TRequestStatus equals KErrNone after writing. File contains written data.
1167 //! @SYMTestType CIT
1168 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1169 CREATE_OBJECT RFs RFs1
1170 CREATE_OBJECT RFile file
1172 COMMAND RFs1 Connect
1174 COMMAND file Replace PBASE-F32-File-PublicApi-0023-001-Replace_command005
1175 COMMAND file Write PBASE-F32-File-PublicApi-0023-001-Write_command006
1177 COMMAND file Write PBASE-F32-File-PublicApi-0023-001-Write_command008
1181 COMMAND file Open PBASE-F32-File-PublicApi-0023-001-Open_command011
1182 COMMAND file Read PBASE-F32-File-PublicApi-0023-001-Read_command012
1185 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0023-001-Delete_command016
1188 END_TESTCASE PBASE-F32-File-PublicApi-0023
1191 START_TESTCASE PBASE-F32-File-PublicApi-0024
1192 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0024
1194 //! @SYMTestCaseDesc Function Lock(), UnLock test - open a file and lock it, then try to read from it from another RFs.
1195 //! Uses API elements: Lock(), Unlock(), Read().
1196 //! @SYMTestActions 1. Create RFs session
1197 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0024.txt", EFileWrite, open file as fileOne.
1198 //! 3. Write "Lock test" to file.
1199 //! 4. Lock the file by Calling Lock() with pos=0 and length=3.
1200 //! 5. open "{Drives, RAMDriveTestPath}file\tc0024.txt" as fileTwo.
1201 //! 6. read from the fileTwo.
1202 //! 7. read from fileOne.
1203 //! 8. unlock fileOne by RFile::Unlock(), with pos=0 and length=3.
1204 //! 9. read from fileTwo.
1205 //! 10. Close fileOne.
1206 //! 11. Close fileTwo.
1207 //! 12. Delete file.
1208 //! 13. Close first RFs.
1210 //! @SYMTestStatus Implemented
1211 //! @SYMTestPriority Critical
1212 //! @SYMTestExpectedResults When fileOne is locked reading of fileTwo returns KErrLocked, Lock() returns KErrNone, UnLock returns KErrNone.
1213 //! After fileOne is unlocked Reading of fileTwo returns KErrNone.
1215 //! @SYMTestType CIT
1216 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1217 CREATE_OBJECT RFs RFs1
1218 CREATE_OBJECT RFile file
1219 CREATE_OBJECT RFile file2
1221 COMMAND RFs1 Connect
1223 COMMAND file Replace PBASE-F32-File-PublicApi-0024-001-Replace_command005
1225 COMMAND file2 Open PBASE-F32-File-PublicApi-0024-001-Open_command008
1226 COMMAND file Write PBASE-F32-File-PublicApi-0024-001-Write_command010
1227 COMMAND file Lock PBASE-F32-File-PublicApi-0024-001-Lock_command011
1228 COMMAND !Error=-22 file2 Read
1230 COMMAND file UnLock PBASE-F32-File-PublicApi-0024-001-UnLock_command016
1236 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0024-001-Delete_command025
1239 END_TESTCASE PBASE-F32-File-PublicApi-0024
1242 START_TESTCASE PBASE-F32-File-PublicApi-0025
1243 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0025
1245 //! @SYMTestCaseDesc Function Seek() test - open a file and and get it's current position.
1246 //! Uses API elements: Seek(), Read().
1247 //! @SYMTestActions 1. Create RFs session
1248 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0025.txt", EFileWrite.
1249 //! 3. Write "Should seek to pos here" to file.
1250 //! 3. Call RFile::Seek passing ESeekStart, 19
1251 //! 4. Call RFile::Read;
1256 //! @SYMTestStatus Implemented
1257 //! @SYMTestPriority Critical
1258 //! @SYMTestExpectedResults Seek() returns KErrNone, buffer contents equals string literal "here".
1260 //! @SYMTestType CIT
1261 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1262 CREATE_OBJECT RFs RFs1
1263 CREATE_OBJECT RFile file
1265 COMMAND RFs1 Connect
1267 COMMAND file Replace PBASE-F32-File-PublicApi-0025-001-Replace_command005
1268 COMMAND file Write PBASE-F32-File-PublicApi-0025-001-Write_command006
1269 COMMAND file Seek PBASE-F32-File-PublicApi-0025-001-Seek_command007
1270 COMMAND file Read PBASE-F32-File-PublicApi-0025-001-Read_command008
1273 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0025-001-Delete_command012
1276 END_TESTCASE PBASE-F32-File-PublicApi-0025
1279 START_TESTCASE PBASE-F32-File-PublicApi-0125
1280 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0125
1282 //! @SYMTestCaseDesc Function Seek() test - test TSeek::ESeekCurrent.
1283 //! Uses API elements: Seek(), Read().
1284 //! @SYMTestActions 1. Create RFs session
1285 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0125.txt", EFileWrite.
1286 //! 3. Write "Should seek to pos here" to file.
1287 //! 3. Call RFile::Seek passing ESeekStart, 0
1288 //! 4. Call RFile::Read passing 7 for length.
1289 //! 5. Call RFile::Seek passing ESeekCurrent, 5.
1290 //! 6. Call RFile::Read().
1295 //! @SYMTestStatus Implemented
1296 //! @SYMTestPriority Critical
1297 //! @SYMTestExpectedResults Seek() returns KErrNone, step 6 returns "to pos here".
1299 //! @SYMTestType CIT
1300 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1301 CREATE_OBJECT RFs RFs1
1302 CREATE_OBJECT RFile file
1304 COMMAND RFs1 Connect
1306 COMMAND file Replace PBASE-F32-File-PublicApi-0125-001-Replace_command005
1307 COMMAND file Write PBASE-F32-File-PublicApi-0125-001-Write_command006
1308 COMMAND file Seek PBASE-F32-File-PublicApi-0125-001-Seek_command007
1309 COMMAND file Read PBASE-F32-File-PublicApi-0125-001-Read_command008
1310 COMMAND file Seek PBASE-F32-File-PublicApi-0125-001-Seek_command009
1311 COMMAND file Read PBASE-F32-File-PublicApi-0125-001-Read_command010
1314 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0125-001-Delete_command014
1317 END_TESTCASE PBASE-F32-File-PublicApi-0125
1319 START_TESTCASE PBASE-F32-File-PublicApi-0026
1320 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0026
1322 //! @SYMTestCaseDesc Function Flush() test - open file, write to it and then flush.
1323 //! Uses API elements: Open(), Flush(), Write().
1324 //! @SYMTestActions 1. Create RFs session
1325 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0026.txt", EFileWrite.
1326 //! 5. Call RFile::Write() passing "This data should be flushed".
1327 //! 4. Call RFile::Flush();
1331 //! @SYMTestStatus Implemented
1332 //! @SYMTestPriority Critical
1333 //! @SYMTestExpectedResults RFile::Flush() returns KErrNone. File contains written data.
1335 //! @SYMTestType CIT
1336 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1337 CREATE_OBJECT RFs RFs1
1338 CREATE_OBJECT RFile file
1340 COMMAND RFs1 Connect
1342 COMMAND file Replace PBASE-F32-File-PublicApi-0026-001-Replace_command005
1343 COMMAND file Write PBASE-F32-File-PublicApi-0026-001-Write_command006
1345 COMMAND file Seek PBASE-F32-File-PublicApi-0026-001-Seek_command008
1346 COMMAND file Read PBASE-F32-File-PublicApi-0026-001-Read_command009
1349 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0026-001-Delete_command011
1352 END_TESTCASE PBASE-F32-File-PublicApi-0026
1355 START_TESTCASE PBASE-F32-File-PublicApi-0027
1356 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0027
1358 //! @SYMTestCaseDesc Asynchronous Flush() test - open file, write to it and then flush.
1359 //! Uses API elements: Open(), Flush(), Write().
1360 //! @SYMTestActions 1. Create RFs session.
1361 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0027.txt", EFileWrite.
1362 //! 3. Call RFile::Write() passing literal "This data should be flushed".
1363 //! 4. Call RFile::Flush() passing TRequestStatus.
1364 //! 5. Wait for request to complete.
1369 //! @SYMTestStatus Implemented
1370 //! @SYMTestPriority Critical
1371 //! @SYMTestExpectedResults TRequestStatus returns KErrNone. File contains written data.
1373 //! @SYMTestType CIT
1374 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1375 CREATE_OBJECT RFs RFs1
1376 CREATE_OBJECT RFile file
1378 COMMAND RFs1 Connect
1380 COMMAND file Replace PBASE-F32-File-PublicApi-0027-001-Replace_command005
1381 COMMAND file Write PBASE-F32-File-PublicApi-0027-001-Write_command006
1382 COMMAND file Flush PBASE-F32-File-PublicApi-0027-001-Flush_command007
1384 COMMAND file Seek PBASE-F32-File-PublicApi-0027-001-Seek_command008
1385 COMMAND file Read PBASE-F32-File-PublicApi-0027-001-Read_command009
1388 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0027-001-Delete_command011
1391 END_TESTCASE PBASE-F32-File-PublicApi-0027
1394 START_TESTCASE PBASE-F32-File-PublicApi-0028
1395 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0028
1397 //! @SYMTestCaseDesc Function SetSize, Size() test - open file and set it's size, then get it.
1398 //! Uses API elements: Open(), Flush(), Write().
1399 //! @SYMTestActions 1. Create RFs session.
1400 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0028.txt", EFileWrite.
1401 //! 3. Write literal "Size test this text should be truncated" to file.
1402 //! 4. Call RFile::SetSize() passing it 10 for size.
1403 //! 5. Call RFile::Size.
1408 //! @SYMTestStatus Implemented
1409 //! @SYMTestPriority Critical
1410 //! @SYMTestExpectedResults RFile::Size, RFile::SetSize returns KErrNone(). aSize equals with the size of file.
1412 //! @SYMTestType CIT
1413 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1414 CREATE_OBJECT RFs RFs1
1415 CREATE_OBJECT RFile file
1417 COMMAND RFs1 Connect
1419 COMMAND file Replace PBASE-F32-File-PublicApi-0028-001-Replace_command005
1420 COMMAND file Write PBASE-F32-File-PublicApi-0028-001-Write_command006
1421 COMMAND file SetSize PBASE-F32-File-PublicApi-0028-001-SetSize_command007
1422 COMMAND file Size PBASE-F32-File-PublicApi-0028-001-Size_command008
1425 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0028-001-Delete_command012
1428 END_TESTCASE PBASE-F32-File-PublicApi-0028
1431 START_TESTCASE PBASE-F32-File-PublicApi-0029
1432 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0029
1434 //! @SYMTestCaseDesc Function Att(), SetAtt test - open file and get it's attributes.
1435 //! Uses API elements: Open(), Att().
1436 //! @SYMTestActions 1. Create RFs session.
1437 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0029.txt", EFileWrite.
1438 //! 3. Write "SetAtt test" to file.
1439 //! 4. Call RFile::SetAtt, passing KEntryAttNormal, KEntryAttReadOnly
1440 //! 5. Flush data to file.
1443 //! 8. Call RFile::Att().
1445 //! 10. Delete file.
1448 //! @SYMTestStatus Implemented
1449 //! @SYMTestPriority Critical
1450 //! @SYMTestExpectedResults RFile::Att(), RFile::SetAtt returns KErrNone, aAttValue & KEntryAttNormal equals KEntryAttNormal.
1452 //! @SYMTestType CIT
1453 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1454 CREATE_OBJECT RFs RFs1
1455 CREATE_OBJECT RFile file
1457 COMMAND RFs1 Connect
1459 COMMAND file Replace PBASE-F32-File-PublicApi-0029-001-Replace_command005
1460 COMMAND file Write PBASE-F32-File-PublicApi-0029-001-Write_command006
1461 COMMAND file SetAtt PBASE-F32-File-PublicApi-0029-001-SetAtt_command007
1464 COMMAND file Open PBASE-F32-File-PublicApi-0029-001-Open_command010
1465 COMMAND file Att PBASE-F32-File-PublicApi-0029-001-Att_command011
1468 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0029-001-Delete_command015
1471 END_TESTCASE PBASE-F32-File-PublicApi-0029
1474 START_TESTCASE PBASE-F32-File-PublicApi-0030
1475 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0030
1477 //! @SYMTestCaseDesc Function Modified(), SetModified test - open file and get/set it's modification time.
1478 //! Uses API elements: Open(), Modified(), SetModified().
1479 //! @SYMTestActions 1. Create RFs session.
1480 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0030.txt", EFileWrite.
1481 //! 3. Call RFile::SetModified, passing 20070118:
1482 //! 4. Close the file.
1483 //! 5. Open the file.
1484 //! 6. Call RFile::Modified().
1489 //! @SYMTestStatus Implemented
1490 //! @SYMTestPriority Critical
1491 //! @SYMTestExpectedResults RFile::Modified(), RFile::SetModified returns KErrNone. Modified returns same date as was set with SetModified.
1493 //! @SYMTestType CIT
1494 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1495 CREATE_OBJECT RFs RFs1
1496 CREATE_OBJECT RFile file
1498 COMMAND RFs1 Connect
1500 COMMAND file Replace PBASE-F32-File-PublicApi-0030-001-Replace_command005
1501 COMMAND file SetModified PBASE-F32-File-PublicApi-0030-001-SetModified_command006
1503 COMMAND file Open PBASE-F32-File-PublicApi-0030-001-Open_command008
1504 COMMAND file Modified PBASE-F32-File-PublicApi-0030-001-Modified_command009
1507 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0030-001-Delete_command012
1510 END_TESTCASE PBASE-F32-File-PublicApi-0030
1513 START_TESTCASE PBASE-F32-File-PublicApi-0031
1514 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0031
1516 //! @SYMTestCaseDesc Function Set() test - open file and set it's modification time and attributes.
1517 //! Uses API elements: Open(), Set(), Modified(), Att().
1518 //! @SYMTestActions 1. Create RFs session.
1519 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0031.txt", EFileShareAny.
1520 //! 3. Call RFile::Set() passing it 20070118:, KEntryAttArchive, KEntryAttReadOnly.
1521 //! 4. Call RFile::Modified() to validate modification date.
1522 //! 5. Call RFile::Att() to validate attributes.
1527 //! @SYMTestStatus Implemented
1528 //! @SYMTestPriority Critical
1529 //! @SYMTestExpectedResults RFile::Set() returns KErrNone. Data and attributes are validated.
1531 //! @SYMTestType CIT
1532 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1533 CREATE_OBJECT RFs RFs1
1534 CREATE_OBJECT RFile file
1536 COMMAND RFs1 Connect
1538 COMMAND file Replace PBASE-F32-File-PublicApi-0031-001-Replace_command005
1539 COMMAND file Set PBASE-F32-File-PublicApi-0031-001-Set_command006
1540 COMMAND file Att PBASE-F32-File-PublicApi-0031-001-Att_command007
1541 COMMAND file Modified PBASE-F32-File-PublicApi-0031-001-Modified_command008
1544 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0031-001-Delete_command012
1547 END_TESTCASE PBASE-F32-File-PublicApi-0031
1550 START_TESTCASE PBASE-F32-File-PublicApi-0032
1551 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0032
1553 //! @SYMTestCaseDesc Function ChangeMode() test - open file and change it's access mode.
1554 //! Uses API elements: Open(), SetModified().
1555 //! @SYMTestActions 1. Create RFs session.
1556 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0032.txt".
1558 //! 4. open the file in EFileShareExclusive mode.
1559 //! 5. Call RFile::ChangeMode() passing it EFileShareReadersOnly.
1564 //! @SYMTestStatus Implemented
1565 //! @SYMTestPriority Critical
1566 //! @SYMTestExpectedResults RFile::ChangeMode() returns KErrNone. Filemode is EFileSareReadersOnly.
1568 //! @SYMTestType CIT
1569 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1570 CREATE_OBJECT RFs RFs1
1571 CREATE_OBJECT RFile file
1573 COMMAND RFs1 Connect
1575 COMMAND file Replace PBASE-F32-File-PublicApi-0032-001-Replace_command005
1577 COMMAND file Open PBASE-F32-File-PublicApi-0032-001-Open_command007
1578 COMMAND file ChangeMode PBASE-F32-File-PublicApi-0032-001-ChangeMode_command008
1581 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0032-001-Delete_command012
1584 END_TESTCASE PBASE-F32-File-PublicApi-0032
1587 START_TESTCASE PBASE-F32-File-PublicApi-0033
1588 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0033
1590 //! @SYMTestCaseDesc Function Rename() test - open file and rename it.
1591 //! Uses API elements: Open(), RFile::Rename().
1592 //! @SYMTestActions 1. Create RFs session.
1593 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0033.txt", EFileShareExclusive | EFileWrite.
1594 //! 3. Call RFile::Rename() passing it string literal "test_renamed.txt".
1595 //! 4. Call RFile::Name.
1596 //! 5. rename the file back to tc0033.txt
1598 //! 7. Close resources.
1600 //! @SYMTestStatus Implemented
1601 //! @SYMTestPriority Critical
1602 //! @SYMTestExpectedResults RFile::Rename() returns KErrNone. File is renamed.
1604 //! @SYMTestType CIT
1605 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1606 CREATE_OBJECT RFs RFs1
1607 CREATE_OBJECT RFile file
1609 COMMAND RFs1 Connect
1611 COMMAND file Replace PBASE-F32-File-PublicApi-0033-001-Replace_command005
1612 COMMAND file Rename PBASE-F32-File-PublicApi-0033-001-Rename_command006
1614 COMMAND file Rename PBASE-F32-File-PublicApi-0033-001-Rename_command008
1617 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0033-001-Delete_command012
1620 END_TESTCASE PBASE-F32-File-PublicApi-0033
1623 START_TESTCASE PBASE-F32-File-PublicApi-0034
1624 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0034
1626 //! @SYMTestCaseDesc Function Drive() test - open file and get it's drive info.
1627 //! Uses API elements: RFile::Drive().
1628 //! @SYMTestActions 1. Create RFs session.
1629 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0034.txt", EFileShareAny.
1630 //! 3. Call RFile::Drive().
1635 //! @SYMTestStatus Implemented
1636 //! @SYMTestPriority Critical
1637 //! @SYMTestExpectedResults RFile::Drive() returns KErrNone.
1639 //! @SYMTestType CIT
1640 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1641 CREATE_OBJECT RFs RFs1
1642 CREATE_OBJECT RFile file
1644 COMMAND RFs1 Connect
1646 COMMAND file Replace PBASE-F32-File-PublicApi-0034-001-Replace_command005
1647 COMMAND file Drive PBASE-F32-File-PublicApi-0034-001-Drive_command006
1650 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0034-001-Delete_command010
1653 END_TESTCASE PBASE-F32-File-PublicApi-0034
1656 START_TESTCASE PBASE-F32-File-PublicApi-0039
1657 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0039
1659 //! @SYMTestCaseDesc Function Name() test. Open a file and get it's name.
1660 //! Uses API elements: Name().
1661 //! @SYMTestActions 1. Create RFs session
1662 //! 2. Open file "{Drives, RAMDriveTestPath}file\tc0039.txt" as file1
1663 //! 3. Call RFile::Name().
1664 //! 4. Close file system.
1668 //! @SYMTestStatus Implemented
1669 //! @SYMTestPriority Critical
1670 //! @SYMTestExpectedResults RFile::Name() returns KErrNone. File name is verified.
1672 //! @SYMTestType CIT
1673 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1674 CREATE_OBJECT RFs RFs1
1675 CREATE_OBJECT RFile file
1677 COMMAND RFs1 Connect
1679 COMMAND file Replace PBASE-F32-File-PublicApi-0039-001-Replace_command005
1680 COMMAND file Name PBASE-F32-File-PublicApi-0039-001-Name_command006
1683 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0039-001-Delete_command010
1686 END_TESTCASE PBASE-F32-File-PublicApi-0039
1689 START_TESTCASE PBASE-F32-File-PublicApi-0040
1690 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0040
1692 //! @SYMTestCaseDesc Function Duplicate() test. Duplicate a file and compare it size to original.
1693 //! Uses API elements: Duplicate().
1694 //! @SYMTestActions 1. Create RFs session
1695 //! 2. Replace file "{Drives, RAMDriveTestPath}file\tc0040.txt" as file1, with EFileWrite permission
1696 //! 3. Write "Duplicate Test" to file
1697 //! 4. Create file2 by calling RFile::Duplicate(), passing reference to file1.
1698 //! 5. Read from file2 to verify that file1 has been duplicated.
1702 //! 9. Close fs session.
1704 //! @SYMTestStatus Implemented
1705 //! @SYMTestPriority Critical
1706 //! @SYMTestExpectedResults RFile::Duplicate() returns KErrNone. The content of file1 and file2 is equal.
1708 //! @SYMTestType CIT
1709 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1710 CREATE_OBJECT RFs RFs1
1711 CREATE_OBJECT RFile file
1712 CREATE_OBJECT RFile file2
1714 COMMAND RFs1 Connect
1716 COMMAND file Replace PBASE-F32-File-PublicApi-0040-001-Replace_command005
1717 COMMAND file Write PBASE-F32-File-PublicApi-0040-001-Write_command006
1718 COMMAND file Seek PBASE-F32-File-PublicApi-0040-001-Seek_command007
1720 COMMAND file2 Duplicate PBASE-F32-File-PublicApi-0040-001-Duplicate_command010
1721 COMMAND file2 Read PBASE-F32-File-PublicApi-0040-001-Read_command011
1726 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0040-001-Delete_command017
1729 END_TESTCASE PBASE-F32-File-PublicApi-0040
1732 START_TESTCASE PBASE-F32-File-PublicApi-1040
1733 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1040
1735 //! @SYMTestCaseDesc Function Duplicate() with aType = EOwnerThread test. Duplicate file and compare it size to original.
1736 //! Uses API elements: Duplicate().
1737 //! @SYMTestActions 1. Create RFs session
1738 //! 2. Replace file "{Drives, RAMDriveTestPath}file\tc1040.txt" as file1, with EFileWrite permission
1739 //! 3. Write "Duplicate Test" to file
1740 //! 4. Create file2 by calling RFile::Duplicate(), passing reference to file1.
1741 //! 5. Read from file2 to verify that file1 has been duplicated.
1744 //! 8. Delete file1.
1745 //! 9. Close fs session.
1747 //! @SYMTestStatus Implemented
1748 //! @SYMTestPriority Critical
1749 //! @SYMTestExpectedResults RFile::Duplicate() returns KErrNone. The content of file1 and file2 is equal.
1751 //! @SYMTestType CIT
1752 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1753 CREATE_OBJECT RFs RFs1
1754 CREATE_OBJECT RFile file
1755 CREATE_OBJECT RFile file2
1757 COMMAND RFs1 Connect
1759 COMMAND file Replace PBASE-F32-File-PublicApi-1040-001-Replace_command005
1760 COMMAND file Write PBASE-F32-File-PublicApi-1040-001-Write_command006
1761 COMMAND file Seek PBASE-F32-File-PublicApi-1040-001-Seek_command007
1763 COMMAND file2 Duplicate PBASE-F32-File-PublicApi-1040-001-Duplicate_command010
1764 COMMAND file2 Read PBASE-F32-File-PublicApi-1040-001-Read_command011
1769 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1040-001-Delete_command017
1772 END_TESTCASE PBASE-F32-File-PublicApi-1040
1775 START_TESTCASE PBASE-F32-File-PublicApi-0041
1776 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0041
1778 //! @SYMTestCaseDesc Function FullName() test. Open a file and get it's full name.
1779 //! Uses API elements: FullName().
1780 //! @SYMTestActions 1. Create RFs session
1781 //! 2. Replace file "{Drives, RAMDriveTestPath}file\tc0041.txt"
1782 //! 3. Call FullName.
1785 //! 6. Close fs session.
1788 //! @SYMTestStatus Implemented
1789 //! @SYMTestPriority Critical
1790 //! @SYMTestExpectedResults RFile::FullName returns KErrNone. Descriptor retrieved from FullName is equal to the path and name of the file.
1792 //! @SYMTestType CIT
1793 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1794 CREATE_OBJECT RFs RFs1
1795 CREATE_OBJECT RFile file
1797 COMMAND RFs1 Connect
1799 COMMAND file Replace PBASE-F32-File-PublicApi-0041-001-Replace_command005
1800 COMMAND file FullName PBASE-F32-File-PublicApi-0041-001-FullName_command006
1803 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0041-001-Delete_command010
1806 END_TESTCASE PBASE-F32-File-PublicApi-0041
1809 //////////////////////////////////////////////////////////////////////
1810 //////////////////////////////////////////////////////////////////////
1812 ////// /////////////////////////////////// //////
1813 ////// /// /// //////
1814 ////// /// NEGATIVE TESTS /// //////
1815 ////// /// /// //////
1816 ////// /////////////////////////////////// //////
1818 //////////////////////////////////////////////////////////////////////
1819 //////////////////////////////////////////////////////////////////////
1822 START_TESTCASE PBASE-F32-File-PublicApi-0101
1823 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0101
1825 //! @SYMTestCaseDesc Function Open() neg. test. Call open with invalid path.
1826 //! Uses API elements: Open().
1827 //! @SYMTestActions 1. Create RFs session
1828 //! 2. Open file "{Drives, RAMDriveTestPath}file\base\chickenfarm\chicken.txt"
1831 //! @SYMTestStatus Implemented
1832 //! @SYMTestPriority Critical
1833 //! @SYMTestExpectedResults open returns KErrPathNotFound! on step 2.
1835 //! @SYMTestType CIT
1836 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1837 CREATE_OBJECT RFs RFs1
1838 CREATE_OBJECT RFile file
1840 COMMAND RFs1 Connect
1842 COMMAND !Error=-12 file Open PBASE-F32-File-PublicApi-0101-001-Open_command005
1846 END_TESTCASE PBASE-F32-File-PublicApi-0101
1851 START_TESTCASE PBASE-F32-File-PublicApi-0103
1852 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0103
1854 //! @SYMTestCaseDesc Function Open() neg. test. Call open with invalid filemodes.
1855 //! Uses API elements: Open().
1856 //! @SYMTestActions 1. Create RFs session.
1857 //! 2. Create file "{Drives, RAMDriveTestPath}file\tc0103.txt".
1859 //! 4. Open file "{Drives, RAMDriveTestPath}file\tc0103.txt" with EFileShareReadersOnly | EFileWrite.
1863 //! @SYMTestStatus Implemented
1864 //! @SYMTestPriority Critical
1865 //! @SYMTestExpectedResults Open returns KErrArgument on step 2.
1867 //! @SYMTestType CIT
1868 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1869 CREATE_OBJECT RFs RFs1
1870 CREATE_OBJECT RFile file
1872 COMMAND RFs1 Connect
1874 COMMAND file Replace PBASE-F32-File-PublicApi-0103-001-Replace_command005
1876 COMMAND !Error=-6 file Open PBASE-F32-File-PublicApi-0103-001-Open_command007
1878 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0103-001-Delete_command010
1881 END_TESTCASE PBASE-F32-File-PublicApi-0103
1889 START_TESTCASE PBASE-F32-File-PublicApi-0201
1890 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0201
1892 //! @SYMTestCaseDesc Function Create() neg. test. Try to Create a file in nonexistant folder.
1893 //! Uses API elements: Create().
1894 //! @SYMTestActions 1. Create RFs session
1895 //! 2. Call RFile::Create passing RFs, literal "{Drives, RAMDriveTestPath}file\base\chickenfarm\chicken.txt", EFileShareAny
1898 //! @SYMTestStatus Implemented
1899 //! @SYMTestPriority Critical
1900 //! @SYMTestExpectedResults RFile::Create() returns KErrPathNotFound on step 2.
1902 //! @SYMTestType CIT
1903 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1904 CREATE_OBJECT RFs RFs1
1905 CREATE_OBJECT RFile file
1907 COMMAND RFs1 Connect
1909 COMMAND !Error=-12 file Create PBASE-F32-File-PublicApi-0201-001-Create_command005
1913 END_TESTCASE PBASE-F32-File-PublicApi-0201
1916 START_TESTCASE PBASE-F32-File-PublicApi-0202
1917 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0202
1919 //! @SYMTestCaseDesc Function Create() neg. test. Try to Create a file which already exists.
1920 //! Uses API elements: Create().
1921 //! @SYMTestActions 1. Create RFs handle.
1922 //! 2. Create a File, by calling RFile::Replace with "{Drives, RAMDriveTestPath}file\tc0202.txt", EFileWrite.
1924 //! 4. Call RFile::Create passing "{Drives, RAMDriveTestPath}file\tc0202.txt", EFileWrite.
1928 //! @SYMTestStatus Implemented
1929 //! @SYMTestPriority Critical
1930 //! @SYMTestExpectedResults KErrAlreadyExists on step 3
1932 //! @SYMTestType CIT
1933 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1934 CREATE_OBJECT RFs RFs1
1935 CREATE_OBJECT RFile file
1937 COMMAND RFs1 Connect
1939 COMMAND file Replace PBASE-F32-File-PublicApi-0202-001-Replace_command005
1941 COMMAND !Error=-11 file Create PBASE-F32-File-PublicApi-0202-001-Create_command007
1943 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0202-001-Delete_command010
1946 END_TESTCASE PBASE-F32-File-PublicApi-0202
1949 START_TESTCASE PBASE-F32-File-PublicApi-0203
1950 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0203
1952 //! @SYMTestCaseDesc Function Create() neg. test. Try to Create a file with bizarre filemodes.
1953 //! Uses API elements: Create().
1954 //! @SYMTestActions 1. Create RFs session
1955 //! 2. Replace file "{Drives, RAMDriveTestPath}file\tc0203.txt"
1956 //! 3. Delete file "{Drives, RAMDriveTestPath}file\tc0203.txt"
1957 //! 2. Create file "{Drives, RAMDriveTestPath}file\tc0203.txt" with EFileShareReadersOnly | EFileWrite
1958 //! 3. Close session.
1960 //! @SYMTestStatus Implemented
1961 //! @SYMTestPriority Critical
1962 //! @SYMTestExpectedResults Create returns KErrArgument on step 2.
1964 //! @SYMTestType CIT
1965 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1966 CREATE_OBJECT RFs RFs1
1967 CREATE_OBJECT RFile file
1969 COMMAND RFs1 Connect
1971 COMMAND file Replace PBASE-F32-File-PublicApi-0203-001-Replace_command001
1973 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0203-001-Delete_command002
1974 COMMAND !Error=-6 file Create PBASE-F32-File-PublicApi-0203-001-Create_command005
1978 END_TESTCASE PBASE-F32-File-PublicApi-0203
1986 START_TESTCASE PBASE-F32-File-PublicApi-0301
1987 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0301
1989 //! @SYMTestCaseDesc Function Replace() neg. test. Replace a file with nonexistant path.
1990 //! Uses API elements: Replace().
1991 //! @SYMTestActions 1. Create RFs session
1992 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\base\chickenfarm\chicken.txt", EFileWrite
1995 //! @SYMTestStatus Implemented
1996 //! @SYMTestPriority Critical
1997 //! @SYMTestExpectedResults RFile::Replace() returns KErrPathNotFound on step 2.
1999 //! @SYMTestType CIT
2000 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2001 CREATE_OBJECT RFs RFs1
2002 CREATE_OBJECT RFile file
2004 COMMAND RFs1 Connect
2006 COMMAND !Error=-12 file Replace PBASE-F32-File-PublicApi-0301-001-Replace_command005
2010 END_TESTCASE PBASE-F32-File-PublicApi-0301
2013 START_TESTCASE PBASE-F32-File-PublicApi-0303
2014 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0303
2016 //! @SYMTestCaseDesc Function Replace() neg. test. Call Replace with bizarre filemodes.
2017 //! Uses API elements: Replace().
2018 //! @SYMTestActions 1. Create RFs session
2019 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0303.txt", EFileShareReadersOnly | EFileWrite
2022 //! @SYMTestStatus Implemented
2023 //! @SYMTestPriority Critical
2024 //! @SYMTestExpectedResults returns KErrArgument on step 2.
2026 //! @SYMTestType CIT
2027 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2028 CREATE_OBJECT RFs RFs1
2029 CREATE_OBJECT RFile file
2031 COMMAND RFs1 Connect
2033 COMMAND !Error=-6 file Replace PBASE-F32-File-PublicApi-0303-001-Replace_command005
2037 END_TESTCASE PBASE-F32-File-PublicApi-0303
2043 START_TESTCASE PBASE-F32-File-PublicApi-0401
2044 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0401
2046 //! @SYMTestCaseDesc Function Temp() neg. test. Try to create temporary file in nonexistant directory.
2047 //! Uses API elements: Temp().
2048 //! @SYMTestActions 1. Create RFs session
2049 //! 2. Call RFile::Temp passing RFs, literal "{Drives, RAMDriveChar}:\base\chickenfarm\", TDesc&, EFileWrite
2052 //! @SYMTestStatus Implemented
2053 //! @SYMTestPriority Critical
2054 //! @SYMTestExpectedResults RFile::Temp() KErrPathNotFound on step 2.
2056 //! @SYMTestType CIT
2057 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2058 CREATE_OBJECT RFs RFs1
2059 CREATE_OBJECT RFile file
2061 COMMAND RFs1 Connect
2063 COMMAND !Error=-12 file Temp PBASE-F32-File-PublicApi-0401-001-Temp_command005
2067 END_TESTCASE PBASE-F32-File-PublicApi-0401
2070 START_TESTCASE PBASE-F32-File-PublicApi-0403
2071 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0403
2073 //! @SYMTestCaseDesc Function Temp() neg. test. Try to create a temporary file with obscure filemodes.
2074 //! Uses API elements: Temp().
2075 //! @SYMTestActions 1. Create RFs session
2076 //! 2. Call RFile::Temp passing RFs, literal "{Drives, RAMDriveTestPath}file\", TDesc&, EFileShareReadersOnly | EFileWrite
2079 //! @SYMTestStatus Implemented
2080 //! @SYMTestPriority Critical
2081 //! @SYMTestExpectedResults RFile::Temp() returns KErrArgument on step 2.
2083 //! @SYMTestType CIT
2084 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2085 CREATE_OBJECT RFs RFs1
2086 CREATE_OBJECT RFile file
2088 COMMAND RFs1 Connect
2090 COMMAND !Error=-6 file Temp PBASE-F32-File-PublicApi-0403-001-Temp_command005
2094 END_TESTCASE PBASE-F32-File-PublicApi-0403
2102 START_TESTCASE PBASE-F32-File-PublicApi-0701
2103 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0701
2105 //! @SYMTestCaseDesc Synchronous Read() neg. test - try to read negative length.
2106 //! Uses API elements: Read().
2107 //! @SYMTestActions 1. Create RFs session
2108 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\0701.txt", EFileWrite
2109 //! 3. Write "test" to file
2110 //! 4. Reset file position.
2111 //! 5. Call RFile::Read() passing TDesC, -1 for the length
2116 //! @SYMTestStatus Implemented
2117 //! @SYMTestPriority Critical
2118 //! @SYMTestExpectedResults RFile::Read() returns KErrArgument.
2120 //! @SYMTestType CIT
2121 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2122 CREATE_OBJECT RFs RFs1
2123 CREATE_OBJECT RFile file
2125 COMMAND RFs1 Connect
2127 COMMAND file Replace PBASE-F32-File-PublicApi-0701-001-Replace_command005
2128 COMMAND file Write PBASE-F32-File-PublicApi-0701-001-Write_command006
2129 COMMAND !Error=-6 file Read PBASE-F32-File-PublicApi-0701-001-Read_command007
2132 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0701-001-Delete_command011
2135 END_TESTCASE PBASE-F32-File-PublicApi-0701
2138 START_TESTCASE PBASE-F32-File-PublicApi-0702
2139 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0702
2141 //! @SYMTestCaseDesc Synchronous Read() neg. test - Will open file and try to read more data from it, than the buffer length.
2142 //! Uses API elements: Read().
2143 //! @SYMTestActions 1. Create RFs session
2144 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0702.txt", EFileWrite
2145 //! 3. Write "readtest" to file
2146 //! 4. Reset file position.
2147 //! 5. Create buffer descriptor with length 4.
2148 //! 5. Call RFile::Read() passing buffer, 1000 for the length.
2153 //! @SYMTestStatus Implemented
2154 //! @SYMTestPriority Critical
2155 //! @SYMTestExpectedResults RFile::Read() returns an KErrOverlow.
2157 //! @SYMTestType CIT
2158 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2159 CREATE_OBJECT RFs RFs1
2160 CREATE_OBJECT RFile file
2162 COMMAND RFs1 Connect
2164 COMMAND file Replace PBASE-F32-File-PublicApi-0702-001-Replace_command005
2165 COMMAND file Write PBASE-F32-File-PublicApi-0702-001-Write_command006
2166 COMMAND !Error=-9 file Read PBASE-F32-File-PublicApi-0702-001-Read_command007
2169 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0702-001-Delete_command011
2172 END_TESTCASE PBASE-F32-File-PublicApi-0702
2175 START_TESTCASE PBASE-F32-File-PublicApi-0703
2176 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0703
2178 //! @SYMTestCaseDesc Synchronous Read(TDesC8& aData, TInt length) test. Pass 0 for length
2179 //! Uses API elements: Read().
2180 //! @SYMTestActions 1. Create RFs session
2181 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0703.txt", EFileWrite
2182 //! 3. Write "readtest" to file
2183 //! 4. Reset file position.
2184 //! 5. Create buffer descriptor with length 4.
2185 //! 5. Call RFile::Read() passing buffer, 0 for the length.
2189 //! @SYMTestStatus Implemented
2190 //! @SYMTestPriority Critical
2191 //! @SYMTestExpectedResults RFile::Read() returns empty descriptor
2193 //! @SYMTestType CIT
2194 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2195 CREATE_OBJECT RFs RFs1
2196 CREATE_OBJECT RFile file
2198 COMMAND RFs1 Connect
2200 COMMAND file Replace PBASE-F32-File-PublicApi-0703-001-Replace_command005
2201 COMMAND file Write PBASE-F32-File-PublicApi-0703-001-Write_command006
2202 COMMAND file Read PBASE-F32-File-PublicApi-0703-001-Read_command007
2205 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0703-001-Delete_command011
2208 END_TESTCASE PBASE-F32-File-PublicApi-0703
2216 START_TESTCASE PBASE-F32-File-PublicApi-0801
2217 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0801
2219 //! @SYMTestCaseDesc Asynchronous Read() neg. test - try to read negative length.
2220 //! Uses API elements: Read().
2221 //! @SYMTestActions 1. Create RFs session
2222 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0801.txt", EFileWrite
2223 //! 3. Write "test" to file
2224 //! 4. Reset file position.
2225 //! 5. Call RFile::Read() passing TDesC, -1 for the length, TRequestStatus
2226 //! 6. wait for request.
2231 //! @SYMTestStatus Implemented
2232 //! @SYMTestPriority Critical
2233 //! @SYMTestExpectedResults RFile::Read() returns KErrArgument with TRequestStatus.
2235 //! @SYMTestType CIT
2236 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2237 CREATE_OBJECT RFs RFs1
2238 CREATE_OBJECT RFile file
2240 COMMAND RFs1 Connect
2242 COMMAND file Replace PBASE-F32-File-PublicApi-0801-001-Replace_command005
2243 COMMAND file Write PBASE-F32-File-PublicApi-0801-001-Write_command006
2244 COMMAND !AsyncError=-6 file Read PBASE-F32-File-PublicApi-0801-001-Read_command007
2248 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0801-001-Delete_command011
2251 END_TESTCASE PBASE-F32-File-PublicApi-0801
2254 START_TESTCASE PBASE-F32-File-PublicApi-0802
2255 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0802
2257 //! @SYMTestCaseDesc Asynchronous Read() neg. test - Will open file and try to read more data from it, than the buffer length.
2258 //! Uses API elements: Read().
2259 //! @SYMTestActions 1. Create RFs session
2260 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0802.txt", EFileWrite
2261 //! 3. Write "readtest" to file
2262 //! 4. Reset file position.
2263 //! 5. Create buffer descriptor with length 4.
2264 //! 6. Call RFile::Read() passing buffer, 1000 for the length, TRequestStatus
2265 //! 7. Wait for status.
2270 //! @SYMTestStatus Implemented
2271 //! @SYMTestPriority Critical
2272 //! @SYMTestExpectedResults RFile::Read() returns an KErrOverlow, with TRequestStatus.
2274 //! @SYMTestType CIT
2275 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2276 CREATE_OBJECT RFs RFs1
2277 CREATE_OBJECT RFile file
2279 COMMAND RFs1 Connect
2281 COMMAND file Replace PBASE-F32-File-PublicApi-0802-001-Replace_command005
2282 COMMAND file Write PBASE-F32-File-PublicApi-0802-001-Write_command006
2283 COMMAND !AsyncError=-9 file Read PBASE-F32-File-PublicApi-0802-001-Read_command007
2287 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0802-001-Delete_command011
2290 END_TESTCASE PBASE-F32-File-PublicApi-0802
2298 START_TESTCASE PBASE-F32-File-PublicApi-0901
2299 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0901
2301 //! @SYMTestCaseDesc Synchronous Read() neg. test - try to read from negative position.
2302 //! Uses API elements: Read().
2303 //! @SYMTestActions 1. Create RFs session
2304 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0901.txt", EFileWrite
2305 //! 3. Write "test" to file
2306 //! 4. Reset file position.
2307 //! 5. Call RFile::Read() passing -1 for position.
2310 //! 8. Close file server session.
2312 //! @SYMTestStatus Implemented
2313 //! @SYMTestPriority Critical
2314 //! @SYMTestExpectedResults Panic FSCLIENT:19 at step 5.
2316 //! @SYMTestType CIT
2317 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2318 CREATE_OBJECT RFs RFs1
2319 CREATE_OBJECT RFile file
2321 COMMAND RFs1 Connect
2323 COMMAND file Replace PBASE-F32-File-PublicApi-0901-001-Replace_command005
2324 COMMAND file Write PBASE-F32-File-PublicApi-0901-001-Write_command006
2325 COMMAND file Read PBASE-F32-File-PublicApi-0901-001-Read_command007
2328 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0901-001-Delete_command011
2330 END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
2331 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2332 CREATE_OBJECT RFs RFs1
2334 COMMAND RFs1 Connect
2335 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0901-001-Delete_command011
2338 END_TESTCASE PBASE-F32-File-PublicApi-0901
2341 START_TESTCASE PBASE-F32-File-PublicApi-0902
2342 //! @SYMTestCaseID PBASE-F32-File-PublicApi-0902
2344 //! @SYMTestCaseDesc Synchronous Read() neg. test - try to read beyond file's length.
2345 //! Uses API elements: Read().
2346 //! @SYMTestActions 1. Create RFs session
2347 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0902.txt", EFileWrite
2348 //! 3. Write "test" to file
2349 //! 4. Reset file position.
2350 //! 5. Call RFile::Read() passing 100 for position.
2353 //! 8. Close file server session.
2355 //! @SYMTestStatus Implemented
2356 //! @SYMTestPriority Critical
2357 //! @SYMTestExpectedResults RFile::Read(data, position) returns zero length descriptor.
2359 //! @SYMTestType CIT
2360 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2361 CREATE_OBJECT RFs RFs1
2362 CREATE_OBJECT RFile file
2364 COMMAND RFs1 Connect
2366 COMMAND file Replace PBASE-F32-File-PublicApi-0902-001-Replace_command005
2367 COMMAND file Write PBASE-F32-File-PublicApi-0902-001-Write_command006
2368 COMMAND file Read PBASE-F32-File-PublicApi-0902-001-Read_command007
2371 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0902-001-Delete_command011
2374 END_TESTCASE PBASE-F32-File-PublicApi-0902
2382 START_TESTCASE PBASE-F32-File-PublicApi-1001
2383 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1001
2385 //! @SYMTestCaseDesc Asynchronous Read() neg. test - try to read from negative position.
2386 //! Uses API elements: Read().
2387 //! @SYMTestActions 1. Create RFs session
2388 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1001.txt", EFileWrite
2389 //! 3. Write "synchronous read with position test" to file
2390 //! 4. Call RFile::Read() passing -1 for position, TRequestStatus.
2392 //! 6. Delete tc1001.txt
2393 //! 7. Close file server session.
2395 //! @SYMTestStatus Implemented
2396 //! @SYMTestPriority Critical
2397 //! @SYMTestExpectedResults Panic FSCLIENT:19 at step 5.
2399 //! @SYMTestType CIT
2400 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2401 CREATE_OBJECT RFs RFs1
2402 CREATE_OBJECT RFile file
2404 COMMAND RFs1 Connect
2406 COMMAND file Replace PBASE-F32-File-PublicApi-1001-001-Replace_command005
2407 COMMAND file Write PBASE-F32-File-PublicApi-1001-001-Write_command006
2408 COMMAND file Read PBASE-F32-File-PublicApi-1001-001-Read_command007
2412 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1001-001-Delete_command011
2414 END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
2415 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2416 CREATE_OBJECT RFs RFs1
2418 COMMAND RFs1 Connect
2419 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1001-001-Delete_command011
2422 END_TESTCASE PBASE-F32-File-PublicApi-1001
2425 START_TESTCASE PBASE-F32-File-PublicApi-1002
2426 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1002
2428 //! @SYMTestCaseDesc Asynchronous Read() neg. test - try to read beyond files length.
2429 //! Uses API elements: Read().
2430 //! @SYMTestActions 1. Create RFs session
2431 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1002.txt", EFileWrite
2432 //! 3. Write "test" to file
2433 //! 4. Reset file position.
2434 //! 5. Call RFile::Read() passing 100 for position, TRequestStatus.
2436 //! 7. Delete tc1002.txt
2437 //! 8. Close file server session.
2439 //! @SYMTestStatus Implemented
2440 //! @SYMTestPriority Critical
2441 //! @SYMTestExpectedResults RFile::Read(data, position, status) returns zero length descriptor.
2443 //! @SYMTestType CIT
2444 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2445 CREATE_OBJECT RFs RFs1
2446 CREATE_OBJECT RFile file
2448 COMMAND RFs1 Connect
2450 COMMAND file Replace PBASE-F32-File-PublicApi-1002-001-Replace_command005
2451 COMMAND file Write PBASE-F32-File-PublicApi-1002-001-Write_command006
2452 COMMAND file Read PBASE-F32-File-PublicApi-1002-001-Read_command007
2456 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1002-001-Delete_command011
2459 END_TESTCASE PBASE-F32-File-PublicApi-1002
2466 START_TESTCASE PBASE-F32-File-PublicApi-1101
2467 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1101
2469 //! @SYMTestCaseDesc Synchronous Read() neg. test - Will try to read from negative position.
2470 //! Uses API elements: Read().
2471 //! @SYMTestActions 1. Create RFs session
2472 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1101.txt", EFileWrite
2473 //! 3. Write "test" to file
2474 //! 4. Reset file position.
2475 //! 5. Call RFile::Read() passing 4 for length and -1 for position.
2477 //! @SYMTestStatus Implemented
2478 //! @SYMTestPriority Critical
2479 //! @SYMTestExpectedResults Panic FSCLIENT:19 at step 5.
2481 //! @SYMTestType CIT
2482 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2483 CREATE_OBJECT RFs RFs1
2484 CREATE_OBJECT RFile file
2486 COMMAND RFs1 Connect
2488 COMMAND file Replace PBASE-F32-File-PublicApi-1101-001-Replace_command005
2489 COMMAND file Write PBASE-F32-File-PublicApi-1101-001-Write_command006
2490 COMMAND file Read PBASE-F32-File-PublicApi-1101-001-Read_command007
2493 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1101-001-Delete_command011
2495 END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
2496 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2497 CREATE_OBJECT RFs RFs1
2499 COMMAND RFs1 Connect
2500 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1101-001-Delete_command011
2503 END_TESTCASE PBASE-F32-File-PublicApi-1101
2506 START_TESTCASE PBASE-F32-File-PublicApi-1102
2507 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1102
2509 //! @SYMTestCaseDesc Synchronous Read() neg. test - will try to read negative length.
2510 //! Uses API elements: Read().
2511 //! @SYMTestActions 1. Create RFs session
2512 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1102.txt", EFileWrite
2513 //! 3. Write "test" to file
2514 //! 4. Reset file position.
2515 //! 5. Call RFile::Read() passing -4 for length and 10 for position.
2520 //! @SYMTestStatus Implemented
2521 //! @SYMTestPriority Critical
2522 //! @SYMTestExpectedResults RFile::Read() returns KErrArgument.
2524 //! @SYMTestType CIT
2525 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2526 CREATE_OBJECT RFs RFs1
2527 CREATE_OBJECT RFile file
2529 COMMAND RFs1 Connect
2531 COMMAND file Replace PBASE-F32-File-PublicApi-1102-001-Replace_command005
2532 COMMAND file Write PBASE-F32-File-PublicApi-1102-001-Write_command006
2533 COMMAND !Error=-6 file Read PBASE-F32-File-PublicApi-1102-001-Read_command007
2536 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1102-001-Delete_command011
2539 END_TESTCASE PBASE-F32-File-PublicApi-1102
2542 START_TESTCASE PBASE-F32-File-PublicApi-1103
2543 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1103
2545 //! @SYMTestCaseDesc Synchronous Read() neg. test - Will try to read from position beyond file length.
2546 //! Uses API elements: Read().
2547 //! @SYMTestActions 1. Create RFs session
2548 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1103.txt", EFileWrite
2549 //! 3. Write "test" to file
2550 //! 4. Reset file position.
2551 //! 5. Call RFile::Read() passing 4 for length and 10 for position (larger than file's content).
2556 //! @SYMTestStatus Implemented
2557 //! @SYMTestPriority Critical
2558 //! @SYMTestExpectedResults RFile::Read() returns KErrNone. Length of data read is 0.
2560 //! @SYMTestType CIT
2561 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2562 CREATE_OBJECT RFs RFs1
2563 CREATE_OBJECT RFile file
2565 COMMAND RFs1 Connect
2567 COMMAND file Replace PBASE-F32-File-PublicApi-1103-001-Replace_command005
2568 COMMAND file Write PBASE-F32-File-PublicApi-1103-001-Write_command006
2569 COMMAND file Read PBASE-F32-File-PublicApi-1103-001-Read_command007
2572 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1103-001-Delete_command011
2575 END_TESTCASE PBASE-F32-File-PublicApi-1103
2578 START_TESTCASE PBASE-F32-File-PublicApi-1104
2579 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1104
2581 //! @SYMTestCaseDesc Synchronous Read() neg. test - Read more from file than buffer's length.
2582 //! Uses API elements: Read().
2583 //! @SYMTestActions 1. Create RFs session
2584 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1104.txt", EFileRead
2585 //! 3. Write "readtest" to file
2586 //! 4. Reset file position.
2587 //! 5. Call RFile::Read() passing buffer (with size 4) 1000 for length and 10 for position.
2592 //! @SYMTestStatus Implemented
2593 //! @SYMTestPriority Critical
2594 //! @SYMTestExpectedResults RFile::Read() returns an KErrOverlow.
2596 //! @SYMTestType CIT
2597 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2598 CREATE_OBJECT RFs RFs1
2599 CREATE_OBJECT RFile file
2601 COMMAND RFs1 Connect
2603 COMMAND file Replace PBASE-F32-File-PublicApi-1104-001-Replace_command005
2604 COMMAND file Write PBASE-F32-File-PublicApi-1104-001-Write_command006
2605 COMMAND !Error=-9 file Read PBASE-F32-File-PublicApi-1104-001-Read_command007
2608 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1104-001-Delete_command011
2611 END_TESTCASE PBASE-F32-File-PublicApi-1104
2619 START_TESTCASE PBASE-F32-File-PublicApi-1201
2620 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1201
2622 //! @SYMTestCaseDesc Asynchronous Read() neg. test - Will try to read from negative position.
2623 //! Uses API elements: Read().
2624 //! @SYMTestActions 1. Create RFs session
2625 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1201.txt", EFileWrite
2626 //! 3. Write "test" to file
2627 //! 4. Reset file position.
2628 //! 5. Call RFile::Read() passing 4 for length and -1 for position and TRequestStatus.
2630 //! @SYMTestStatus Implemented
2631 //! @SYMTestPriority Critical
2632 //! @SYMTestExpectedResults Panic FSCLIENT:19 at step 5.
2634 //! @SYMTestType CIT
2635 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2636 CREATE_OBJECT RFs RFs1
2637 CREATE_OBJECT RFile file
2639 COMMAND RFs1 Connect
2641 COMMAND file Replace PBASE-F32-File-PublicApi-1201-001-Replace_command005
2642 COMMAND file Write PBASE-F32-File-PublicApi-1201-001-Write_command006
2643 COMMAND file Read PBASE-F32-File-PublicApi-1201-001-Read_command007
2647 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1201-001-Delete_command011
2649 END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
2650 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2651 CREATE_OBJECT RFs RFs1
2653 COMMAND RFs1 Connect
2654 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1201-001-Delete_command011
2657 END_TESTCASE PBASE-F32-File-PublicApi-1201
2660 START_TESTCASE PBASE-F32-File-PublicApi-1202
2661 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1202
2663 //! @SYMTestCaseDesc Asynchronous Read() neg. test - will try to read negative length.
2664 //! Uses API elements: Read().
2665 //! @SYMTestActions 1. Create RFs session
2666 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1202.txt", EFileWrite
2667 //! 3. Write "test" to file
2668 //! 4. Reset file position.
2669 //! 5. Call RFile::Read() passing -4 for length and 10 for position and TRequestStatus.
2670 //! 6. wait for request to complete
2675 //! @SYMTestStatus Implemented
2676 //! @SYMTestPriority Critical
2677 //! @SYMTestExpectedResults RFile::Read() returns KErrArgument.
2679 //! @SYMTestType CIT
2680 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2681 CREATE_OBJECT RFs RFs1
2682 CREATE_OBJECT RFile file
2684 COMMAND RFs1 Connect
2686 COMMAND file Replace PBASE-F32-File-PublicApi-1202-001-Replace_command005
2687 COMMAND file Write PBASE-F32-File-PublicApi-1202-001-Write_command006
2688 COMMAND !AsyncError=-6 file Read PBASE-F32-File-PublicApi-1202-001-Read_command007
2692 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1202-001-Delete_command011
2695 END_TESTCASE PBASE-F32-File-PublicApi-1202
2698 START_TESTCASE PBASE-F32-File-PublicApi-1203
2699 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1203
2701 //! @SYMTestCaseDesc Asynchronous Read() neg. test - Will try to read from position beyond file length.
2702 //! Uses API elements: Read().
2703 //! @SYMTestActions 1. Create RFs session
2704 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1203.txt", EFileWrite
2705 //! 3. Write "test" to file
2706 //! 4. Reset file position.
2707 //! 5. Call RFile::Read(), 4 for length, 10 for position.
2708 //! 6. Wait for request to complete.
2713 //! @SYMTestStatus Implemented
2714 //! @SYMTestPriority Critical
2715 //! @SYMTestExpectedResults RFile::Read() returns KErrNone. Length of data read is 0.
2717 //! @SYMTestType CIT
2718 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2719 CREATE_OBJECT RFs RFs1
2720 CREATE_OBJECT RFile file
2722 COMMAND RFs1 Connect
2724 COMMAND file Replace PBASE-F32-File-PublicApi-1203-001-Replace_command005
2725 COMMAND file Write PBASE-F32-File-PublicApi-1203-001-Write_command006
2726 COMMAND file Read PBASE-F32-File-PublicApi-1203-001-Read_command007
2730 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1203-001-Delete_command011
2733 END_TESTCASE PBASE-F32-File-PublicApi-1203
2736 START_TESTCASE PBASE-F32-File-PublicApi-1204
2737 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1204
2739 //! @SYMTestCaseDesc Synchronous Read() neg. test - Read more from file than buffer's length.
2740 //! Uses API elements: Read().
2741 //! @SYMTestActions 1. Create RFs session
2742 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1204.txt", EFileWrite
2743 //! 3. Write "synchronous read with length and position test" to file
2744 //! 4. Reset file position.
2745 //! 5. Call RFile::Read() passing buffer (buffer size 4) 1000 for length and for position 10, TRequestStatus.
2746 //! 6. Wait for request.
2751 //! @SYMTestStatus Implemented
2752 //! @SYMTestPriority Critical
2753 //! @SYMTestExpectedResults RFile::Read() returns an KErrOverlow.
2755 //! @SYMTestType CIT
2756 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2757 CREATE_OBJECT RFs RFs1
2758 CREATE_OBJECT RFile file
2760 COMMAND RFs1 Connect
2762 COMMAND file Replace PBASE-F32-File-PublicApi-1204-001-Replace_command005
2763 COMMAND file Write PBASE-F32-File-PublicApi-1204-001-Write_command006
2764 COMMAND !AsyncError=-9 file Read PBASE-F32-File-PublicApi-1204-001-Read_command007
2768 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1204-001-Delete_command011
2771 END_TESTCASE PBASE-F32-File-PublicApi-1204
2777 START_TESTCASE PBASE-F32-File-PublicApi-1301
2778 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1301
2780 //! @SYMTestCaseDesc Function Write(const TDesC8 &aDes) test - write an emptry buffer to file.
2782 //! @SYMTestActions 1. Create RFs session.
2783 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1301.txt", EFileWrite.
2784 //! 3. Call Write, passing "" and descriptor with length 0.
2790 //! @SYMTestStatus Implemented
2791 //! @SYMTestPriority Critical
2792 //! @SYMTestExpectedResults No panic is raised, or error returned.
2794 //! @SYMTestType CIT
2795 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2796 CREATE_OBJECT RFs RFs1
2797 CREATE_OBJECT RFile file
2799 COMMAND RFs1 Connect
2801 COMMAND file Replace PBASE-F32-File-PublicApi-1301-001-Replace_command005
2802 COMMAND file Write PBASE-F32-File-PublicApi-1301-001-Write_command006
2805 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1301-001-Delete_command010
2808 END_TESTCASE PBASE-F32-File-PublicApi-1301
2814 START_TESTCASE PBASE-F32-File-PublicApi-1401
2815 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1401
2817 //! @SYMTestCaseDesc Function WWrite(const TDesC8 &aDes, TRequestStatus &aStatus) test - write an emptry buffer to file.
2819 //! @SYMTestActions 1. Create RFs session.
2820 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc.txt", EFileWrite.
2821 //! 3. Call Write, passing "" and descriptor with length 0.
2827 //! @SYMTestStatus Implemented
2828 //! @SYMTestPriority Critical
2829 //! @SYMTestExpectedResults No panic is raised, or error returned.
2831 //! @SYMTestType CIT
2832 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2833 CREATE_OBJECT RFs RFs1
2834 CREATE_OBJECT RFile file
2836 COMMAND RFs1 Connect
2838 COMMAND file Replace PBASE-F32-File-PublicApi-1401-001-Replace_command005
2839 COMMAND file Write PBASE-F32-File-PublicApi-1401-001-Write_command006
2843 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1401-001-Delete_command010
2846 END_TESTCASE PBASE-F32-File-PublicApi-1401
2854 START_TESTCASE PBASE-F32-File-PublicApi-1602
2855 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1602
2857 //! @SYMTestCaseDesc Function write neg. test - pass negative number for length.
2859 //! @SYMTestActions 1. Create RFs session.
2860 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1602.txt", EFileWrite.
2861 //! 3. Call Write, pass message "short data" and -1 length.
2867 //! @SYMTestStatus Implemented
2868 //! @SYMTestPriority Critical
2869 //! @SYMTestExpectedResults Write() returns KErrArgument.
2871 //! @SYMTestType CIT
2872 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2873 CREATE_OBJECT RFs RFs1
2874 CREATE_OBJECT RFile file
2876 COMMAND RFs1 Connect
2878 COMMAND file Replace PBASE-F32-File-PublicApi-1602-001-Replace_command005
2879 COMMAND !Error=-6 file Write PBASE-F32-File-PublicApi-1602-001-Write_command006
2882 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1602-001-Delete_command010
2885 END_TESTCASE PBASE-F32-File-PublicApi-1602
2888 START_TESTCASE PBASE-F32-File-PublicApi-1603
2889 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1603
2891 //! @SYMTestCaseDesc Function write neg. test - pass 0 number for length.
2893 //! @SYMTestActions 1. Create RFs session.
2894 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1603.txt", EFileWrite.
2895 //! 3. Call Write, pass message "short data" and 0.
2901 //! @SYMTestStatus Implemented
2902 //! @SYMTestPriority Critical
2903 //! @SYMTestExpectedResults Write() returns KErrNone.
2905 //! @SYMTestType CIT
2906 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2907 CREATE_OBJECT RFs RFs1
2908 CREATE_OBJECT RFile file
2910 COMMAND RFs1 Connect
2912 COMMAND file Replace PBASE-F32-File-PublicApi-1603-001-Replace_command005
2913 COMMAND file Write PBASE-F32-File-PublicApi-1603-001-Write_command006
2916 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1603-001-Delete_command010
2919 END_TESTCASE PBASE-F32-File-PublicApi-1603
2926 START_TESTCASE PBASE-F32-File-PublicApi-1701
2927 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1701
2929 //! @SYMTestCaseDesc Asynchronous function write neg. test - pass negative number for length.
2931 //! @SYMTestActions 1. Create RFs session.
2932 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1701.txt", EFileWrite.
2933 //! 3. Call Write passing literal "test", -1 for length and TRequestStatus.
2938 //! @SYMTestStatus Implemented
2939 //! @SYMTestPriority Critical
2940 //! @SYMTestExpectedResults Write() returns KErrArgument.
2942 //! @SYMTestType CIT
2943 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2944 CREATE_OBJECT RFs RFs1
2945 CREATE_OBJECT RFile file
2947 COMMAND RFs1 Connect
2949 COMMAND file Replace PBASE-F32-File-PublicApi-1701-001-Replace_command005
2950 COMMAND !AsyncError=-6 file Write PBASE-F32-File-PublicApi-1701-001-Write_command006
2954 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1701-001-Delete_command010
2957 END_TESTCASE PBASE-F32-File-PublicApi-1701
2959 START_TESTCASE PBASE-F32-File-PublicApi-1702
2960 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1702
2962 //! @SYMTestCaseDesc Asynchronous function write test - pass 0 for length.
2964 //! @SYMTestActions 1. Create RFs session.
2965 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1702.txt", EFileWrite.
2966 //! 3. Call Write passing literal "test", 0 for length and TRequestStatus.
2971 //! @SYMTestStatus Implemented
2972 //! @SYMTestPriority Critical
2973 //! @SYMTestExpectedResults No panics raised or errors returned.
2975 //! @SYMTestType CIT
2976 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
2977 CREATE_OBJECT RFs RFs1
2978 CREATE_OBJECT RFile file
2980 COMMAND RFs1 Connect
2982 COMMAND file Replace PBASE-F32-File-PublicApi-1702-001-Replace_command005
2983 COMMAND file Write PBASE-F32-File-PublicApi-1702-001-Write_command006
2987 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1702-001-Delete_command010
2990 END_TESTCASE PBASE-F32-File-PublicApi-1702
2998 START_TESTCASE PBASE-F32-File-PublicApi-1801
2999 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1801
3001 //! @SYMTestCaseDesc Function write neg. test. Write to negative position.
3002 //! Uses API elements:.
3003 //! @SYMTestActions 1. Create RFs session.
3004 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1801.txt", EFileWrite.
3005 //! 3. Call Write passing "test" and -1 for position.
3008 //! @SYMTestStatus Implemented
3009 //! @SYMTestPriority Critical
3010 //! @SYMTestExpectedResults Panic FSCLIENT:19.
3012 //! @SYMTestType CIT
3013 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3014 CREATE_OBJECT RFs RFs1
3015 CREATE_OBJECT RFile file
3017 COMMAND RFs1 Connect
3019 COMMAND file Replace PBASE-F32-File-PublicApi-1801-001-Replace_command005
3020 COMMAND file Write PBASE-F32-File-PublicApi-1801-001-Write_command006
3023 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1801-001-Delete_command010
3025 END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
3026 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3027 CREATE_OBJECT RFs RFs1
3029 COMMAND RFs1 Connect
3030 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1801-001-Delete_command010
3033 END_TESTCASE PBASE-F32-File-PublicApi-1801
3036 START_TESTCASE PBASE-F32-File-PublicApi-1802
3037 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1802
3039 //! @SYMTestCaseDesc Synchronous function write test. Pass a 0 length descriptor to RFile::Write().
3040 //! Uses API elements: void Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus).
3041 //! @SYMTestActions 1. Create RFs session.
3042 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1802.txt", EFileWrite.
3043 //! 3. Call Write passing "" and 1 for position.
3046 //! @SYMTestStatus Implemented
3047 //! @SYMTestPriority Critical
3048 //! @SYMTestExpectedResults No error is returned or panic raised.
3050 //! @SYMTestType CIT
3051 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3052 CREATE_OBJECT RFs RFs1
3053 CREATE_OBJECT RFile file
3055 COMMAND RFs1 Connect
3057 COMMAND file Replace PBASE-F32-File-PublicApi-1802-001-Replace_command005
3058 COMMAND file Write PBASE-F32-File-PublicApi-1802-001-Write_command006
3061 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1802-001-Delete_command010
3064 END_TESTCASE PBASE-F32-File-PublicApi-1802
3072 START_TESTCASE PBASE-F32-File-PublicApi-1901
3073 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1901
3075 //! @SYMTestCaseDesc Asynchronous function write neg. test. Pass a negative number for position to RFile::Write().
3076 //! Uses API elements: void Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus).
3077 //! @SYMTestActions 1. Create RFs session.
3078 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1901.txt", EFileWrite.
3079 //! 3. Call Write passing "test" and -1 for position.
3082 //! @SYMTestStatus Implemented
3083 //! @SYMTestPriority Critical
3084 //! @SYMTestExpectedResults Panic FSCLIENT:19.
3086 //! @SYMTestType CIT
3087 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3088 CREATE_OBJECT RFs RFs1
3089 CREATE_OBJECT RFile file
3091 COMMAND RFs1 Connect
3093 COMMAND file Replace PBASE-F32-File-PublicApi-1901-001-Replace_command005
3094 COMMAND file Write PBASE-F32-File-PublicApi-1901-001-Write_command006
3098 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1901-001-Delete_command010
3100 END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
3101 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3102 CREATE_OBJECT RFs RFs1
3104 COMMAND RFs1 Connect
3105 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1901-001-Delete_command010
3108 END_TESTCASE PBASE-F32-File-PublicApi-1901
3111 START_TESTCASE PBASE-F32-File-PublicApi-1902
3112 //! @SYMTestCaseID PBASE-F32-File-PublicApi-1902
3114 //! @SYMTestCaseDesc Asynchronous function write test. Pass a 0 length descriptor to RFile::Write().
3115 //! Uses API elements: void Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus).
3116 //! @SYMTestActions 1. Create RFs session.
3117 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1902.txt", EFileWrite.
3118 //! 3. Call Write passing descriptor with length 0 and 1 for position.
3121 //! @SYMTestStatus Implemented
3122 //! @SYMTestPriority Critical
3123 //! @SYMTestExpectedResults No error is returned or panic raised.
3125 //! @SYMTestType CIT
3126 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3127 CREATE_OBJECT RFs RFs1
3128 CREATE_OBJECT RFile file
3130 COMMAND RFs1 Connect
3132 COMMAND file Replace PBASE-F32-File-PublicApi-1902-001-Replace_command005
3133 COMMAND file Write PBASE-F32-File-PublicApi-1902-001-Write_command006
3137 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1902-001-Delete_command010
3140 END_TESTCASE PBASE-F32-File-PublicApi-1902
3148 START_TESTCASE PBASE-F32-File-PublicApi-2001
3149 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2001
3151 //! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) neg. test. Pass a negative position and negative length.
3152 //! Uses API elements: Write().
3153 //! @SYMTestActions 1. Create RFs session.
3154 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2001.txt", EFileWrite.
3155 //! 3. call write, pass "test", -1 for length, -1 for position.
3158 //! @SYMTestStatus Implemented
3159 //! @SYMTestPriority Critical
3160 //! @SYMTestExpectedResults Panic, FSCLIENT:19
3162 //! @SYMTestType CIT
3163 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3164 CREATE_OBJECT RFs RFs1
3165 CREATE_OBJECT RFile file
3167 COMMAND RFs1 Connect
3169 COMMAND file Replace PBASE-F32-File-PublicApi-2001-001-Replace_command005
3170 COMMAND file Write PBASE-F32-File-PublicApi-2001-001-Write_command006
3173 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2001-001-Delete_command010
3175 END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
3176 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3177 CREATE_OBJECT RFs RFs1
3179 COMMAND RFs1 Connect
3180 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2001-001-Delete_command010
3183 END_TESTCASE PBASE-F32-File-PublicApi-2001
3186 START_TESTCASE PBASE-F32-File-PublicApi-2002
3187 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2002
3189 //! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test. Pass 0 for length.
3190 //! Uses API elements: Write().
3191 //! @SYMTestActions 1. Create RFs session.
3192 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2002.txt", EFileWrite.
3193 //! 3. call write, pass "test", 0 for length, 0 for position.
3196 //! @SYMTestStatus Implemented
3197 //! @SYMTestPriority Critical
3198 //! @SYMTestExpectedResults No panic is raised and no error is returned
3200 //! @SYMTestType CIT
3201 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3202 CREATE_OBJECT RFs RFs1
3203 CREATE_OBJECT RFile file
3205 COMMAND RFs1 Connect
3207 COMMAND file Replace PBASE-F32-File-PublicApi-2002-001-Replace_command005
3208 COMMAND file Write PBASE-F32-File-PublicApi-2002-001-Write_command006
3211 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2002-001-Delete_command010
3214 END_TESTCASE PBASE-F32-File-PublicApi-2002
3217 START_TESTCASE PBASE-F32-File-PublicApi-2003
3218 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2003
3220 //! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test. Pass -1 for length.
3221 //! Uses API elements: Write().
3222 //! @SYMTestActions 1. Create RFs session.
3223 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2003.txt", EFileWrite.
3224 //! 3. call write, pass "test", -1 for length, 0 for position.
3227 //! @SYMTestStatus Implemented
3228 //! @SYMTestPriority Critical
3229 //! @SYMTestExpectedResults RFile::Write returns KerrArgument
3231 //! @SYMTestType CIT
3232 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3233 CREATE_OBJECT RFs RFs1
3234 CREATE_OBJECT RFile file
3236 COMMAND RFs1 Connect
3238 COMMAND file Replace PBASE-F32-File-PublicApi-2003-001-Replace_command005
3239 COMMAND !Error=-6 file Write PBASE-F32-File-PublicApi-2003-001-Write_command006
3242 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2003-001-Delete_command010
3245 END_TESTCASE PBASE-F32-File-PublicApi-2003
3253 START_TESTCASE PBASE-F32-File-PublicApi-2101
3254 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2101
3256 //! @SYMTestCaseDesc Asynchronous function write test. Pass a negative position and negative length.
3257 //! Uses API elements: Write().
3258 //! @SYMTestActions 1. Create RFs session.
3259 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2101.txt", EFileWrite.
3260 //! 3. call write, pass literal "negative write test", -1 for length, -1 for negative, TRequestStatus.
3263 //! @SYMTestStatus Implemented
3264 //! @SYMTestPriority Critical
3265 //! @SYMTestExpectedResults Panic, FSCLIENT:19
3267 //! @SYMTestType CIT
3268 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3269 CREATE_OBJECT RFs RFs1
3270 CREATE_OBJECT RFile file
3272 COMMAND RFs1 Connect
3274 COMMAND file Replace PBASE-F32-File-PublicApi-2101-001-Replace_command005
3275 COMMAND file Write PBASE-F32-File-PublicApi-2101-001-Write_command006
3279 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2101-001-Delete_command010
3281 END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
3282 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3283 CREATE_OBJECT RFs RFs1
3285 COMMAND RFs1 Connect
3286 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2101-001-Delete_command010
3289 END_TESTCASE PBASE-F32-File-PublicApi-2101
3292 START_TESTCASE PBASE-F32-File-PublicApi-2102
3293 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2102
3295 //! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test. Pass 0 for length.
3296 //! Uses API elements: Write().
3297 //! @SYMTestActions 1. Create RFs session.
3298 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2102.txt", EFileWrite.
3299 //! 3. call write, pass "test", 0 for length, 0 for position.
3302 //! @SYMTestStatus Implemented
3303 //! @SYMTestPriority Critical
3304 //! @SYMTestExpectedResults No panic is raised and no error is returned
3306 //! @SYMTestType CIT
3307 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3308 CREATE_OBJECT RFs RFs1
3309 CREATE_OBJECT RFile file
3311 COMMAND RFs1 Connect
3313 COMMAND file Replace PBASE-F32-File-PublicApi-2102-001-Replace_command005
3314 COMMAND file Write PBASE-F32-File-PublicApi-2102-001-Write_command006
3318 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2102-001-Delete_command010
3321 END_TESTCASE PBASE-F32-File-PublicApi-2102
3324 START_TESTCASE PBASE-F32-File-PublicApi-2103
3325 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2103
3327 //! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test. Pass a negative length.
3328 //! Uses API elements: Write().
3329 //! @SYMTestActions 1. Create RFs session.
3330 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2103.txt", EFileWrite.
3331 //! 3. call write, pass "test", -1 for length, 0 for position.
3334 //! @SYMTestStatus Implemented
3335 //! @SYMTestPriority Critical
3336 //! @SYMTestExpectedResults RFile::Write returns KerrArgument
3338 //! @SYMTestType CIT
3339 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3340 CREATE_OBJECT RFs RFs1
3341 CREATE_OBJECT RFile file
3343 COMMAND RFs1 Connect
3345 COMMAND file Replace PBASE-F32-File-PublicApi-2103-001-Replace_command005
3346 COMMAND !AsyncError=-6 file Write PBASE-F32-File-PublicApi-2103-001-Write_command006
3350 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2103-001-Delete_command010
3353 END_TESTCASE PBASE-F32-File-PublicApi-2103
3361 START_TESTCASE PBASE-F32-File-PublicApi-2201
3362 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2201
3364 //! @SYMTestCaseDesc Function Lock() neg. test - open a file and try to lock zero bytes.
3365 //! Uses API elements: Lock(), Unlock(), Read().
3366 //! @SYMTestActions 1. Create RFs session
3367 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2201.txt", EFileRead.
3368 //! 3. Write "test" to file.
3369 //! 4. Lock the file by Calling Lock(), passing pos 0, len 0.
3371 //! 6. Close fs session.
3374 //! @SYMTestStatus Implemented
3375 //! @SYMTestPriority Critical
3376 //! @SYMTestExpectedResults Panic - FSCLIENT:17
3378 //! @SYMTestType CIT
3379 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3380 CREATE_OBJECT RFs RFs1
3381 CREATE_OBJECT RFile file
3383 COMMAND RFs1 Connect
3385 COMMAND file Replace PBASE-F32-File-PublicApi-2201-001-Replace_command005
3386 COMMAND file Write PBASE-F32-File-PublicApi-2201-001-Write_command006
3387 COMMAND file Lock PBASE-F32-File-PublicApi-2201-001-Lock_command007
3390 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2201-001-Delete_command011
3392 END_TEST_BLOCK !PanicCode=17 !PanicString="FSCLIENT"
3393 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3394 CREATE_OBJECT RFs RFs1
3396 COMMAND RFs1 Connect
3397 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2201-001-Delete_command011
3400 END_TESTCASE PBASE-F32-File-PublicApi-2201
3403 START_TESTCASE PBASE-F32-File-PublicApi-2202
3404 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2202
3406 //! @SYMTestCaseDesc Function Lock() neg. test - open same file with two handles, try to lock the same region twice.
3407 //! Uses API elements: Lock(), Unlock(), Read().
3408 //! @SYMTestActions 1. Create RFs session
3409 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2202.txt", EFileWrite, open file as fileOne.
3410 //! 3. Lock the file by Calling Lock().
3411 //! 4. Open "{Drives, RAMDriveTestPath}file\tc2202.txt" as fileTwo.
3412 //! 5. lock the file 2 at the same position and length as fileOne.
3413 //! 6. Close fileOne.
3414 //! 7. Close fileTwo
3416 //! 9. Close first RFs.
3418 //! @SYMTestStatus Implemented
3419 //! @SYMTestPriority Critical
3420 //! @SYMTestExpectedResults Lock() returns KErrLocked at step 5.
3422 //! @SYMTestType CIT
3423 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3424 CREATE_OBJECT RFs RFs1
3425 CREATE_OBJECT RFile file
3426 CREATE_OBJECT RFile file2
3428 COMMAND RFs1 Connect
3430 COMMAND file Replace PBASE-F32-File-PublicApi-2202-001-Replace_command005
3431 COMMAND file Write PBASE-F32-File-PublicApi-2202-001-Write_command006
3432 COMMAND file Lock PBASE-F32-File-PublicApi-2202-001-Lock_command007
3434 COMMAND file2 Open PBASE-F32-File-PublicApi-2202-001-Open_command010
3435 COMMAND !Error=-22 file2 Lock PBASE-F32-File-PublicApi-2202-001-Lock_command011
3440 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2202-001-Delete_command017
3443 END_TESTCASE PBASE-F32-File-PublicApi-2202
3446 START_TESTCASE PBASE-F32-File-PublicApi-2203
3447 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2203
3449 //! @SYMTestCaseDesc Function Lock() neg. test - try to lock negative length.
3450 //! Uses API elements: Lock(), Unlock(), Read().
3451 //! @SYMTestActions 1. Create RFs session
3452 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2203.txt", EFileWrite, open file as fileOne.
3453 //! 3. Lock the file by Calling Lock() with 0 for pos and -1 for length.
3455 //! @SYMTestStatus Implemented
3456 //! @SYMTestPriority Critical
3457 //! @SYMTestExpectedResults Lock() returns panic.
3459 //! @SYMTestType CIT
3460 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3461 CREATE_OBJECT RFs RFs1
3462 CREATE_OBJECT RFile file
3464 COMMAND RFs1 Connect
3466 COMMAND file Replace PBASE-F32-File-PublicApi-2203-001-Replace_command005
3467 COMMAND file Write PBASE-F32-File-PublicApi-2203-001-Write_command006
3468 COMMAND file Lock PBASE-F32-File-PublicApi-2203-001-Lock_command007
3469 END_TEST_BLOCK !PanicCode=17 !PanicString="FSCLIENT"
3470 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3471 CREATE_OBJECT RFs RFs1
3473 COMMAND RFs1 Connect
3474 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2203-001-Delete_command011
3477 END_TESTCASE PBASE-F32-File-PublicApi-2203
3480 START_TESTCASE PBASE-F32-File-PublicApi-2204
3481 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2204
3483 //! @SYMTestCaseDesc Function Lock() neg. test - try to lock negative position.
3484 //! Uses API elements: Lock(), Unlock(), Read().
3485 //! @SYMTestActions 1. Create RFs session
3486 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2204.txt", EFileWrite, open file as fileOne.
3487 //! 3. Lock the file by Calling Lock() with -1 for pos and 1 for length.
3492 //! @SYMTestStatus Implemented
3493 //! @SYMTestPriority Critical
3494 //! @SYMTestExpectedResults No error returned or panic raised.
3496 //! @SYMTestType CIT
3497 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3498 CREATE_OBJECT RFs RFs1
3499 CREATE_OBJECT RFile file
3501 COMMAND RFs1 Connect
3503 COMMAND file Replace PBASE-F32-File-PublicApi-2204-001-Replace_command005
3504 COMMAND file Write PBASE-F32-File-PublicApi-2204-001-Write_command006
3505 COMMAND file Lock PBASE-F32-File-PublicApi-2204-001-Lock_command007
3506 END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
3507 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3508 CREATE_OBJECT RFs RFs1
3510 COMMAND RFs1 Connect
3511 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2204-001-Delete_command010
3514 END_TESTCASE PBASE-F32-File-PublicApi-2204
3516 START_TESTCASE PBASE-F32-File-PublicApi-2205
3517 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2205
3519 //! @SYMTestCaseDesc Function Lock() neg. test - try to write to locked file.
3520 //! Uses API elements: Lock(), Unlock(), Read().
3521 //! @SYMTestActions 1. Create RFs session
3522 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2205.txt", EFileWrite, open file as file1.
3523 //! 3. Call RFile::Open passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2205.txt", EFileWrite | EFileShareAny, open file as file2.
3524 //! 4. Write "test" to file through file1.
3525 //! 5. Lock the file by Calling Lock() with 6 for pos and 4 for length, through file1
3526 //! 6. Write "Trying to write to locked region" through new handle
3528 //! 8. Close second handle
3532 //! @SYMTestStatus Implemented
3533 //! @SYMTestPriority Critical
3534 //! @SYMTestExpectedResults trying to write to locked file returns KErrLocked
3536 //! @SYMTestType CIT
3537 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3538 CREATE_OBJECT RFs RFs1
3539 CREATE_OBJECT RFile file
3540 CREATE_OBJECT RFile file2
3542 COMMAND RFs1 Connect
3544 COMMAND file Replace PBASE-F32-File-PublicApi-2205-001-Replace_command005
3546 COMMAND file2 Open PBASE-F32-File-PublicApi-2205-001-Open_command008
3547 COMMAND file Write PBASE-F32-File-PublicApi-2205-001-Write_command010
3548 COMMAND file Lock PBASE-F32-File-PublicApi-2205-001-Lock_command011
3549 COMMAND !Error=-22 file2 Write PBASE-F32-File-PublicApi-2205-001-Write_command013
3554 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2205-001-Delete_command020
3557 END_TESTCASE PBASE-F32-File-PublicApi-2205
3564 START_TESTCASE PBASE-F32-File-PublicApi-2301
3565 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2301
3567 //! @SYMTestCaseDesc Function UnLock() neg. test - open a file try to unlock a region that has not been locked.
3569 //! @SYMTestActions 1. Create RFs session
3570 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2301.txt", EFileWrite.
3571 //! 3. write "test data" to file.
3572 //! 4. call UnLock with position 2 and with length 4
3577 //! @SYMTestStatus Implemented
3578 //! @SYMTestPriority Critical
3579 //! @SYMTestExpectedResults UnLock() returns KErrNotFound.
3581 //! @SYMTestType CIT
3582 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3583 CREATE_OBJECT RFs RFs1
3584 CREATE_OBJECT RFile file
3586 COMMAND RFs1 Connect
3588 COMMAND file Replace PBASE-F32-File-PublicApi-2301-001-Replace_command005
3589 COMMAND file Write PBASE-F32-File-PublicApi-2301-001-Write_command006
3590 COMMAND !Error=-1 file UnLock PBASE-F32-File-PublicApi-2301-001-UnLock_command007
3593 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2301-001-Delete_command011
3596 END_TESTCASE PBASE-F32-File-PublicApi-2301
3599 START_TESTCASE PBASE-F32-File-PublicApi-2302
3600 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2302
3602 //! @SYMTestCaseDesc Function UnLock() neg. test - open a file lock some part, try to unlock a portion of the locked region.
3604 //! @SYMTestActions 1. Create RFs session
3605 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2302.txt", EFileWrite.
3606 //! 3. Write some data to file.
3607 //! 4. Lock the file by Calling Lock() with pos 0 and length 2.
3608 //! 5. UnLock a portion of that file with posi 0 and length 1.
3609 //! 6. Close that file.
3611 //! 8. close fs session.
3613 //! @SYMTestStatus Implemented
3614 //! @SYMTestPriority Critical
3615 //! @SYMTestExpectedResults UnLock() returns KErrNotFound.
3617 //! @SYMTestType CIT
3618 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3619 CREATE_OBJECT RFs RFs1
3620 CREATE_OBJECT RFile file
3622 COMMAND RFs1 Connect
3624 COMMAND file Replace PBASE-F32-File-PublicApi-2302-001-Replace_command005
3625 COMMAND file Write PBASE-F32-File-PublicApi-2302-001-Write_command006
3626 COMMAND file Lock PBASE-F32-File-PublicApi-2302-001-Lock_command007
3627 COMMAND !Error=-1 file UnLock PBASE-F32-File-PublicApi-2302-001-Close_command008
3630 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2302-001-Delete_command014
3633 END_TESTCASE PBASE-F32-File-PublicApi-2302
3636 START_TESTCASE PBASE-F32-File-PublicApi-2303
3637 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2303
3639 //! @SYMTestCaseDesc Function UnLock() neg. test - UnLock a region with negative length
3641 //! @SYMTestActions 1. Create RFs session
3642 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2303.txt", EFileWrite.
3643 //! 3. Write some data to file.
3644 //! 4. Call Lock with pos 2, length 2.
3645 //! 5. UnLock by calling 2 for position -2 for length.
3647 //! @SYMTestStatus Implemented
3648 //! @SYMTestPriority Critical
3649 //! @SYMTestExpectedResults UnLock() causes FSCLIENT:18.
3651 //! @SYMTestType CIT
3652 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3653 CREATE_OBJECT RFs RFs1
3654 CREATE_OBJECT RFile file
3656 COMMAND RFs1 Connect
3658 COMMAND file Replace PBASE-F32-File-PublicApi-2303-001-Replace_command005
3659 COMMAND file Write PBASE-F32-File-PublicApi-2303-001-Write_command006
3660 COMMAND file Lock PBASE-F32-File-PublicApi-2303-001-Lock_command007
3661 COMMAND file UnLock PBASE-F32-File-PublicApi-2303-001-UnLock_command008
3662 END_TEST_BLOCK !PanicCode=18 !PanicString="FSCLIENT"
3663 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3664 CREATE_OBJECT RFs RFs1
3666 COMMAND RFs1 Connect
3667 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2303-001-Delete_command011
3670 END_TESTCASE PBASE-F32-File-PublicApi-2303
3673 START_TESTCASE PBASE-F32-File-PublicApi-2304
3674 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2304
3676 //! @SYMTestCaseDesc Function UnLock() neg. test - UnLock a region with negative position
3678 //! @SYMTestActions 1. Create RFs session
3679 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2304.txt", EFileWrite.
3680 //! 3. Write some data to file.
3681 //! 4. Call Lock with pos 2, length 2.
3682 //! 5. UnLock by calling -2 for position 2 for length.
3683 //! 6. Close that file.
3685 //! 8. close fs session.
3687 //! @SYMTestStatus Implemented
3688 //! @SYMTestPriority Critical
3689 //! @SYMTestExpectedResults RFile::UnLock() causes FSCLIENT:19.
3691 //! @SYMTestType CIT
3692 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3693 CREATE_OBJECT RFs RFs1
3694 CREATE_OBJECT RFile file
3696 COMMAND RFs1 Connect
3698 COMMAND file Replace PBASE-F32-File-PublicApi-2304-001-Replace_command005
3699 COMMAND file Write PBASE-F32-File-PublicApi-2304-001-Write_command006
3700 COMMAND file Lock PBASE-F32-File-PublicApi-2304-001-Lock_command007
3701 COMMAND file UnLock PBASE-F32-File-PublicApi-2304-001-UnLock_command008
3702 END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
3703 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3704 CREATE_OBJECT RFs RFs1
3706 COMMAND RFs1 Connect
3707 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2304-001-Delete_command012
3710 END_TESTCASE PBASE-F32-File-PublicApi-2304
3718 START_TESTCASE PBASE-F32-File-PublicApi-2401
3719 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2401
3721 //! @SYMTestCaseDesc Function Seek() neg. test - try to seek to negative position.
3723 //! @SYMTestActions 1. Create RFs session
3724 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2401.txt", EFileWrite.
3725 //! 3. Write "Seek test" to file.
3726 //! 4. Call RFile::Seek() passing ESeekStart, -10.
3729 //! 7. Close fs session.
3731 //! @SYMTestStatus Implemented
3732 //! @SYMTestPriority Critical
3733 //! @SYMTestExpectedResults Seek returns KErrArgument.
3735 //! @SYMTestType CIT
3736 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3737 CREATE_OBJECT RFs RFs1
3738 CREATE_OBJECT RFile file
3740 COMMAND RFs1 Connect
3742 COMMAND file Replace PBASE-F32-File-PublicApi-2401-001-Replace_command005
3743 COMMAND file Write PBASE-F32-File-PublicApi-2401-001-Write_command006
3744 COMMAND !Error=-6 file Seek PBASE-F32-File-PublicApi-2401-001-Seek_command007
3747 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2401-001-Delete_command011
3750 END_TESTCASE PBASE-F32-File-PublicApi-2401
3772 START_TESTCASE PBASE-F32-File-PublicApi-2701
3773 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2701
3775 //! @SYMTestCaseDesc Function SetSize() neg test - try to pass a negative size.
3777 //! @SYMTestActions 1. Create RFs session.
3778 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2701.txt", EFileWrite.
3779 //! 3. Write "test" to file.
3780 //! 3. Call SetSize with -2.
3782 //! @SYMTestStatus Implemented
3783 //! @SYMTestPriority Critical
3784 //! @SYMTestExpectedResults Panic - FSCLIENT:20
3786 //! @SYMTestType CIT
3787 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3788 CREATE_OBJECT RFs RFs1
3789 CREATE_OBJECT RFile file
3791 COMMAND RFs1 Connect
3793 COMMAND file Replace PBASE-F32-File-PublicApi-2701-001-Replace_command005
3794 COMMAND file Write PBASE-F32-File-PublicApi-2701-001-Write_command006
3795 COMMAND file SetSize PBASE-F32-File-PublicApi-2701-001-SetSize_command007
3798 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2701-001-Delete_command011
3800 END_TEST_BLOCK !PanicCode=20 !PanicString="FSCLIENT"
3801 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3802 CREATE_OBJECT RFs RFs1
3804 COMMAND RFs1 Connect
3805 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2701-001-Delete_command011
3808 END_TESTCASE PBASE-F32-File-PublicApi-2701
3822 START_TESTCASE PBASE-F32-File-PublicApi-2901
3823 //! @SYMTestCaseID PBASE-F32-File-PublicApi-2901
3825 //! @SYMTestCaseDesc Function SetAtt neg. test - set same attribute on both bitmasks.
3826 //! Uses API elements: Att().
3827 //! @SYMTestActions 1. Create RFs session.
3828 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2901.txt", EFileWrite.
3829 //! 3. Write "test" to file.
3830 //! 4. Call RFile::SetAtt, passing KEntryAttNormal, KEntryAttNormal
3833 //! @SYMTestStatus Implemented
3834 //! @SYMTestPriority Critical
3835 //! @SYMTestExpectedResults Panic FSCLIENT:21 at step 3.
3837 //! @SYMTestType CIT
3838 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3839 CREATE_OBJECT RFs RFs1
3840 CREATE_OBJECT RFile file
3842 COMMAND RFs1 Connect
3844 COMMAND file Replace PBASE-F32-File-PublicApi-2901-001-Replace_command005
3845 COMMAND file Write PBASE-F32-File-PublicApi-2901-001-Write_command006
3846 COMMAND file SetAtt PBASE-F32-File-PublicApi-2901-001-SetAtt_command007
3849 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2901-001-Delete_command011
3851 END_TEST_BLOCK !PanicCode=21 !PanicString="FSCLIENT panic"
3852 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3853 CREATE_OBJECT RFs RFs1
3855 COMMAND RFs1 Connect
3856 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2901-001-Delete_command011
3859 END_TESTCASE PBASE-F32-File-PublicApi-2901
3873 START_TESTCASE PBASE-F32-File-PublicApi-3101
3874 //! @SYMTestCaseID PBASE-F32-File-PublicApi-3101
3876 //! @SYMTestCaseDesc Function SetModified neg. test - open file for reading and set it's date.
3877 //! Uses API elements: Modified(), SetModified().
3878 //! @SYMTestActions 1. Create RFs session.
3879 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3101.txt", EFileWrite.
3880 //! 3. Write "test" to file
3881 //! 4. Call RFile::SetModified.
3886 //! @SYMTestStatus Implemented
3887 //! @SYMTestPriority Critical
3888 //! @SYMTestExpectedResults RFile::SetModified returns KErrAccessDenied.
3890 //! @SYMTestType CIT
3891 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3892 CREATE_OBJECT RFs RFs1
3893 CREATE_OBJECT RFile file
3895 COMMAND RFs1 Connect
3897 COMMAND file Replace PBASE-F32-File-PublicApi-3101-001-Replace_command005
3898 COMMAND file Write PBASE-F32-File-PublicApi-3101-001-Write_command006
3900 COMMAND file Open PBASE-F32-File-PublicApi-3101-001-Open_command008
3901 COMMAND !Error=-21 file SetModified PBASE-F32-File-PublicApi-3101-001-SetModified_command009
3904 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3101-001-Delete_command013
3907 END_TESTCASE PBASE-F32-File-PublicApi-3101
3915 START_TESTCASE PBASE-F32-File-PublicApi-5501
3916 //! @SYMTestCaseID PBASE-F32-File-PublicApi-5501
3918 //! @SYMTestCaseDesc Function ChangeMode() neg. test - call ChangeMode with value outside of set (EFileShareExclusive, EFileShareReadersOnly).
3919 //! Uses API elements: SetModified().
3920 //! @SYMTestActions 1. Create RFs session.
3921 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc5501.txt", EFileShareExclusive.
3922 //! 3. Write "test" to file.
3923 //! 4. Call RFile::ChangeMode() passing it EFileWrite.
3928 //! @SYMTestStatus Implemented
3929 //! @SYMTestPriority Critical
3930 //! @SYMTestExpectedResults RFile::ChangeMode() returns KErrArgument.
3932 //! @SYMTestType CIT
3933 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3934 CREATE_OBJECT RFs RFs1
3935 CREATE_OBJECT RFile file
3937 COMMAND RFs1 Connect
3939 COMMAND file Replace PBASE-F32-File-PublicApi-5501-001-Replace_command005
3940 COMMAND file Write PBASE-F32-File-PublicApi-5501-001-Write_command006
3941 COMMAND !Error=-6 file ChangeMode PBASE-F32-File-PublicApi-5501-001-ChangeMode_command007
3944 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-5501-001-Delete_command011
3947 END_TESTCASE PBASE-F32-File-PublicApi-5501
3954 START_TESTCASE PBASE-F32-File-PublicApi-3201
3955 //! @SYMTestCaseID PBASE-F32-File-PublicApi-3201
3957 //! @SYMTestCaseDesc Function Set() neg. test - try to clear and set the same attribute.
3958 //! Uses API elements: Set(), Modified(), Att().
3959 //! @SYMTestActions 1. Create RFs session.
3960 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3201.txt", EFileShareAny.
3961 //! 3. Call RFile::Set() passing it 20070118:, KEntryAttReadOnly, KEntryAttReadOnly.
3964 //! 6. Close Fs session
3966 //! @SYMTestStatus Implemented
3967 //! @SYMTestPriority Critical
3968 //! @SYMTestExpectedResults Panic - FSCLIENT:21.
3970 //! @SYMTestType CIT
3971 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3972 CREATE_OBJECT RFs RFs1
3973 CREATE_OBJECT RFile file
3975 COMMAND RFs1 Connect
3977 COMMAND file Replace PBASE-F32-File-PublicApi-3201-001-Replace_command005
3978 COMMAND file Write PBASE-F32-File-PublicApi-3201-001-Write_command006
3979 COMMAND file Set PBASE-F32-File-PublicApi-3201-001-Set_command007
3983 END_TEST_BLOCK !PanicCode=21 !PanicString="FSCLIENT panic"
3984 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
3985 CREATE_OBJECT RFs RFs1
3987 COMMAND RFs1 Connect
3988 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3201-001-Delete_command011
3991 END_TESTCASE PBASE-F32-File-PublicApi-3201
4000 START_TESTCASE PBASE-F32-File-PublicApi-3401
4001 //! @SYMTestCaseID PBASE-F32-File-PublicApi-3401
4003 //! @SYMTestCaseDesc Function Rename() neg. test - open file in read mode and try to rename it.
4004 //! Uses API elements: RFile::Rename().
4005 //! @SYMTestActions 1. Create RFs session.
4006 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3401.txt", EFileRead.
4007 //! 3. Write "test" to file.
4008 //! 4. Call RFile::Rename() passing it string literal "test_renamed.txt".
4013 //! @SYMTestStatus Implemented
4014 //! @SYMTestPriority Critical
4015 //! @SYMTestExpectedResults RFile::Rename() returns KErrAccessDenied.
4017 //! @SYMTestType CIT
4018 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
4019 CREATE_OBJECT RFs RFs1
4020 CREATE_OBJECT RFile file
4022 COMMAND RFs1 Connect
4024 COMMAND file Replace PBASE-F32-File-PublicApi-3401-001-Replace_command005
4025 COMMAND file Write PBASE-F32-File-PublicApi-3401-001-Write_command006
4027 COMMAND file Open PBASE-F32-File-PublicApi-3401-001-Open_command008
4028 COMMAND !Error=-21 file Rename PBASE-F32-File-PublicApi-3401-001-Rename_command009
4031 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3401-001-Delete_command12
4035 END_TESTCASE PBASE-F32-File-PublicApi-3401
4039 START_TESTCASE PBASE-F32-File-PublicApi-3402
4040 //! @SYMTestCaseID PBASE-F32-File-PublicApi-3402
4042 //! @SYMTestCaseDesc Function BlockMap() negative test, replace a file and then call BlockMap on it.
4043 //! Uses API elements: Open(), BlockMap().
4044 //! @SYMTestActions 1. Create RFs session.
4045 //! 2. Call RFile::Replace() passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3402.txt", EFileRead.
4046 //! 4. Call RFile::BlockMap().
4051 //! @SYMTestStatus Implemented
4052 //! @SYMTestPriority Critical
4053 //! @SYMTestExpectedResults BlockMap returns KErrNotSupported.
4055 //! @SYMTestType CIT
4056 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
4057 CREATE_OBJECT RFs RFs1
4058 CREATE_OBJECT RFile file
4060 COMMAND RFs1 Connect
4062 COMMAND file Replace PBASE-F32-File-PublicApi-3402-001-Replace_command003
4063 COMMAND !Error=-5 file BlockMap
4066 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3402-001-Delete_command007
4069 END_TESTCASE PBASE-F32-File-PublicApi-3402
4072 START_TESTCASE PBASE-F32-File-PublicApi-3403
4073 //! @SYMTestCaseID PBASE-F32-File-PublicApi-3403
4075 //! @SYMTestCaseDesc Function BlockMap() negative test. Call BlockMap with Usage ETestDebug
4076 //! Uses API elements: Open(), BlockMap().
4077 //! @SYMTestActions 1. Create RFs session.
4078 //! 2. Call RFile::Replace() to create file tc3403 with EFileWrite
4079 //! 4. Call RFile::BlockMap() passing ETestDebug for usage, 0 for startPos.
4084 //! @SYMTestStatus Implemented
4085 //! @SYMTestPriority Critical
4086 //! @SYMTestExpectedResults BlockMap returns KErrNotSupported.
4088 //! @SYMTestType CIT
4089 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
4090 CREATE_OBJECT RFs RFs1
4091 CREATE_OBJECT RFile file
4093 COMMAND RFs1 Connect
4095 COMMAND file Replace PBASE-F32-File-PublicApi-3403-001-Replace_command003
4096 COMMAND !Error=-5 file BlockMap PBASE-F32-File-PublicApi-3403-001-BlockMap_command004
4099 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3403-001-Delete_command007
4102 END_TESTCASE PBASE-F32-File-PublicApi-3403
4105 START_TESTCASE PBASE-F32-File-PublicApi-3501
4106 //! @SYMTestCaseID PBASE-F32-File-PublicApi-3501
4108 //! @SYMTestCaseDesc Asynchronous Read(TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) test. Pass 0 for length.
4109 //! Uses API elements: Read().
4110 //! @SYMTestActions 1. Create RFs session.
4111 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3501.txt", EFileWrite.
4112 //! 3. Call RFile::Write passing literal "Asynchronous read with length test"
4113 //! 4. Reset file position
4114 //! 4. Create TRequestStatus variable.
4115 //! 5. Call RFile::Read() passing TRequestStatus and 0 for length.
4116 //! 6. Wait until asynchronous call completes
4121 //! @SYMTestStatus Implemented
4122 //! @SYMTestPriority Critical
4123 //! @SYMTestExpectedResults RFile::Read() returns empty descriptor
4125 //! @SYMTestType CIT
4126 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
4127 CREATE_OBJECT RFs RFs1
4128 CREATE_OBJECT RFile file
4130 COMMAND RFs1 Connect
4132 COMMAND file Replace PBASE-F32-File-PublicApi-3501-001-Replace_command005
4133 COMMAND file Write PBASE-F32-File-PublicApi-3501-001-Write_command006
4134 COMMAND file Seek PBASE-F32-File-PublicApi-3501-001-Seek_command007
4135 COMMAND file Read PBASE-F32-File-PublicApi-3501-001-Read_command008
4139 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3501-001-Delete_command012
4142 END_TESTCASE PBASE-F32-File-PublicApi-3501
4145 START_TESTCASE PBASE-F32-File-PublicApi-3502
4146 //! @SYMTestCaseID PBASE-F32-File-PublicApi-3502
4148 //! @SYMTestCaseDesc Synchronous Read(TInt aPos, TDes8 &aDes, TInt aLength) test. Pass 0 for length.
4149 //! Uses API elements: Read().
4150 //! @SYMTestActions 1. Create RFs session
4151 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3502.txt", EFileWrite
4152 //! 3. Write "synchronous read with length and position test" to file
4153 //! 4. Reset file position.
4154 //! 5. Call RFile::Read() passing 0 for length and 5 for position.
4159 //! @SYMTestStatus Implemented
4160 //! @SYMTestPriority Critical
4161 //! @SYMTestExpectedResults RFile::Read() returns empty descriptor
4163 //! @SYMTestType CIT
4164 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
4165 CREATE_OBJECT RFs RFs1
4166 CREATE_OBJECT RFile file
4168 COMMAND RFs1 Connect
4170 COMMAND file Replace PBASE-F32-File-PublicApi-3502-001-Replace_command005
4171 COMMAND file Write PBASE-F32-File-PublicApi-3502-001-Write_command006
4172 COMMAND file Seek PBASE-F32-File-PublicApi-3502-001-Seek_command007
4173 COMMAND file Read PBASE-F32-File-PublicApi-3502-001-Read_command008
4176 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3502-001-Delete_command012
4179 END_TESTCASE PBASE-F32-File-PublicApi-3502
4182 START_TESTCASE PBASE-F32-File-PublicApi-3503
4183 //! @SYMTestCaseID PBASE-F32-File-PublicApi-3503
4185 //! @SYMTestCaseDesc Asynchronous Read(TInt aPos, TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) test. Pass 0 for length.
4186 //! Uses API elements: Read().
4187 //! @SYMTestActions 1. Create RFs session.
4188 //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3503.txt", EFileWrite.
4189 //! 3. Call RFile::Write passing literal "asynchronous read with length and position test"
4190 //! 4. Reset file position
4191 //! 5. Call RFile::Read() passing TRequestStatus, 0 for length and 5 for position.
4192 //! 6. Wait until asynchronous call completes
4197 //! @SYMTestStatus Implemented
4198 //! @SYMTestPriority Critical
4199 //! @SYMTestExpectedResults RFile::Read() returns empty descriptor
4201 //! @SYMTestType CIT
4202 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
4203 CREATE_OBJECT RFs RFs1
4204 CREATE_OBJECT RFile file
4206 COMMAND RFs1 Connect
4208 COMMAND file Replace PBASE-F32-File-PublicApi-3503-001-Replace_command005
4209 COMMAND file Write PBASE-F32-File-PublicApi-3503-001-Write_command006
4210 COMMAND file Seek PBASE-F32-File-PublicApi-3503-001-Seek_command007
4211 COMMAND file Read PBASE-F32-File-PublicApi-3503-001-Read_command008
4215 COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3503-001-Delete_command011
4218 END_TESTCASE PBASE-F32-File-PublicApi-3503
4220 START_TESTCASE PBASE-F32-File-Uninstall
4221 //! @SYMTestCaseID PBASE-F32-File-Uninstall
4223 //! @SYMTestCaseDesc Cleanup the directories created to test RFile
4224 //! @SYMTestActions 1. Create RFs Session.
4225 //! 2. Remove the directories created using Rfs::RmDir().
4226 //! @SYMTestStatus Implemented
4227 //! @SYMTestPriority Critical
4228 //! @SYMTestExpectedResults Removes the directory created and keeps the environment clean.
4230 //! @SYMTestType CIT
4231 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
4232 CREATE_OBJECT RFs RFs1
4234 COMMAND RFs1 Connect
4235 COMMAND RFs1 RmDir PBASE-F32-File-PublicApi-Unistall
4238 END_TESTCASE PBASE-F32-File-Uninstall