sl@0: // sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: //! @file sl@0: //! @SYMTestSuiteName pbase-f32-sfsrv-publicapi-ram sl@0: //! @SYMScriptTestEnvironment This test script requires a basic ROM. sl@0: //! @SYMScriptAuthor Alvar Udras sl@0: //! @SYMScriptDescription The test script contains API tests for the following functions of RFile class: sl@0: //! TInt Open(RFs &aFs, const TDesC &aName, TUint aFileMode); sl@0: //! void Close(); sl@0: //! TInt Create(RFs &aFs, const TDesC &aName, TUint aFileMode); sl@0: //! TInt Replace(RFs &aFs, const TDesC &aName, TUint aFileMode); sl@0: //! TInt Temp(RFs &aFs, const TDesC &aPath, TFileName &aName, TUint aFileMode); sl@0: //! TInt Read(TDes8 &aDes) const; sl@0: //! void Read(TDes8 &aDes, TRequestStatus &aStatus) const; sl@0: //! TInt Read(TDes8 &aDes, TInt aLength) const; sl@0: //! void Read(TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) const; sl@0: //! TInt Read(TInt aPos, TDes8 &aDes) const; sl@0: //! void Read(TInt aPos, TDes8 &aDes, TRequestStatus &aStatus) const; sl@0: //! TInt Read(TInt aPos, TDes8 &aDes, TInt aLength) const; sl@0: //! void Read(TInt aPos, TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) const; sl@0: //! void ReadCancel(TRequestStatus &aStatus) const; sl@0: //! void ReadCancel() const; sl@0: //! TInt Write(const TDesC8 &aDes); sl@0: //! void Write(const TDesC8 &aDes, TRequestStatus &aStatus); sl@0: //! TInt Write(const TDesC8 &aDes, TInt aLength); sl@0: //! void Write(const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus); sl@0: //! TInt Write(TInt aPos, const TDesC8 &aDes); sl@0: //! void Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus); sl@0: //! TInt Write(TInt aPos, const TDesC8 &aDes, TInt aLength); sl@0: //! void Write(TInt aPos, const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus); sl@0: //! TInt Lock(TInt aPos, TInt aLength) const; sl@0: //! TInt UnLock(TInt aPos, TInt aLength) const; sl@0: //! TInt Seek(TSeek aMode, TInt &aPos) const; sl@0: //! TInt Flush(); sl@0: //! void Flush(TRequestStatus &aStatus); sl@0: //! TInt Size(TInt &aSize) const; sl@0: //! TInt SetSize(TInt aSize); sl@0: //! TInt Att(TUint &aAttValue) const; sl@0: //! TInt SetAtt(TUint aSetAttMask, TUint aClearAttMask); sl@0: //! TInt Modified(TTime &aTime) const; sl@0: //! TInt SetModified(const TTime &aTime); sl@0: //! TInt Set(const TTime &aTime, TUint aSetAttMask, TUint aClearAttMask); sl@0: //! TInt ChangeMode(TFileMode aNewMode); sl@0: //! TInt Rename(const TDesC &aNewName); sl@0: //! TInt Drive(TInt &aDriveNumber, TDriveInfo &aDriveInfo) const; sl@0: //! TInt Name(TDes &aName) const; sl@0: //! TInt Duplicate(const RFile &aFile, TOwnerType aType=EOwnerProcess); sl@0: //! TInt FullName(TDes &aName) const; sl@0: sl@0: LOAD_SUITE T_SfSrv sl@0: DELAY 1000 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-Install sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-Install sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Setup the Environment to test RFile APIs by creating directories. sl@0: //! @SYMTestActions 1. Rfs::New() to create Rfs Object. sl@0: //! 2. Rfs::MkDirAll() to create directories required. sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Directories get created. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 MkDirAll PBASE-F32-File-PublicApi-Install sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-Install sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0001 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0001 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Open() test. Open a file and close it. sl@0: //! Uses API elements: Open(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc0001.txt", EFileShareAny | EFileWrite sl@0: //! 3. Write "open test" to file. sl@0: //! 4. Close file. sl@0: //! 5. Open file "{Drives, RAMDriveTestPath}file\tc0001.txt", with EFileRead sl@0: //! 6. Read from file to determine, that the file is opened. sl@0: //! 7. Close file. sl@0: //! 8. Delete file. sl@0: //! 9. Close file system. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Open() returns KErrNone. File is opened after Open call. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0001-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0001-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-0001-001-Open_command008 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0001-001-Read_command009 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0001-001-Delete_command013 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0001 sl@0: sl@0: sl@0: //FileModes - EFileRead sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-4001 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-4001 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function TFileMode::EFileRead test. open file for reading and try to write to it. sl@0: //! Uses API elements: Open(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4001.txt", EFileShareAny | EFileWrite sl@0: //! 3. Close file. sl@0: //! 4. Open file "{Drives, RAMDriveTestPath}file\tc4001.txt", with EFileRead sl@0: //! 5. Write "test" to file. sl@0: //! 6. Close file. sl@0: //! 7. Delete file. sl@0: //! 8. Close file system. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Write returns KErrAccessDenied. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-4001-001-Replace_command005 sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-4001-001-Open_command007 sl@0: COMMAND !Error=-21 file Write PBASE-F32-File-PublicApi-4001-001-Write_command008 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4001-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-4001 sl@0: sl@0: sl@0: //EFileShareExclusive sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-4002 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-4002 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function TFileMode::EFileShareExclusive test. Open a file in EFileShareExclusive and try to open the same file through another handle. sl@0: //! Uses API elements: Open(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4002.txt", EFileShareAny | EFileWrite. sl@0: //! 3. Close file. sl@0: //! 4. Open file "{Drives, RAMDriveTestPath}file\tc4002.txt", with EFileShareExclusive sl@0: //! 5. Open "{Drives, RAMDriveTestPath}file\tc4002.txt" through new handle called file2, with EFileShareExlusive sl@0: //! 6. Close file. sl@0: //! 7. Delete file. sl@0: //! 8. Close file system. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Open returns KErrInUse. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: CREATE_OBJECT RFile file2 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-4002-001-Replace_command005 sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-4002-001-Open_command007 sl@0: COMMAND file2 new sl@0: COMMAND !Error=-14 file2 Open PBASE-F32-File-PublicApi-4002-001-Open_command010 sl@0: COMMAND file2 Close sl@0: COMMAND file2 ~ sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4002-001-Delete_command017 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-4002 sl@0: sl@0: sl@0: //EFileShareReadersOnly sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-4003 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-4003 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function TFileMode::EFileShareReadersOnly test. Open a file in EFileShareReadersOnly and try to write to it through another handle. sl@0: //! Uses API elements: Open(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4003.txt", EFileShareAny | EFileWrite sl@0: //! 3. Write "open test" to file. sl@0: //! 4. Close file. sl@0: //! 5. Open file "{Drives, RAMDriveTestPath}file\tc4003.txt", with EFileShareReadersOnly sl@0: //! 6. Open "{Drives, RAMDriveTestPath}file\tc4003.txt" through new handle called file2 EFileRead. sl@0: //! 7. Read from file. sl@0: //! 8. Try to write "will cause error" to file. sl@0: //! 9. Close file. sl@0: //! 10. Delete file. sl@0: //! 11. Close file system. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Write returns KErrAccessDenied. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: CREATE_OBJECT RFile file2 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-4003-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-4003-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-4003-001-Open_command008 sl@0: COMMAND file2 new sl@0: COMMAND file2 Open PBASE-F32-File-PublicApi-4003-001-Open_command011 sl@0: COMMAND file2 Read PBASE-F32-File-PublicApi-4003-001-Read_command012 sl@0: COMMAND !Error=-21 file2 Write PBASE-F32-File-PublicApi-4003-001-Write_command013 sl@0: COMMAND file2 Close sl@0: COMMAND file2 ~ sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4003-001-Delete_command020 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-4003 sl@0: sl@0: sl@0: //EFileShareAny sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-4004 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-4004 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function TFileMode::EFileShareAny test. Open a file in EFileShareAny and try to write to it through another handle. sl@0: //! Uses API elements: Open(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4004.txt", EFileShareAny | EFileWrite sl@0: //! 3. Write "open test" to file. sl@0: //! 4. Close file. sl@0: //! 5. Open file "{Drives, RAMDriveTestPath}file\tc4004.txt", with EFileShareAny. sl@0: //! 6. Open "{Drives, RAMDriveTestPath}file\tc4004.txt" through new handle called file2 EFileShareAny | EFileWrite. sl@0: //! 7. Read from file. sl@0: //! 8. Try to write "open test" to file. sl@0: //! 9. Close file. sl@0: //! 10. Delete file. sl@0: //! 11. Close file system. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults No error is returned or panic raised. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: CREATE_OBJECT RFile file2 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-4004-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-4004-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-4004-001-Open_command008 sl@0: COMMAND file2 new sl@0: COMMAND file2 Open PBASE-F32-File-PublicApi-4004-001-Open_command011 sl@0: COMMAND file2 Read PBASE-F32-File-PublicApi-4004-001-Read_command012 sl@0: COMMAND file2 Write PBASE-F32-File-PublicApi-4004-001-Write_command013 sl@0: COMMAND file2 Close sl@0: COMMAND file2 ~ sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4004-001-Delete_command020 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-4004 sl@0: sl@0: //EFileShareReadersOfWriters sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-4005 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-4005 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function TFileMode::EFileShareReadersOrWriters test. Open a file in EFileShareReadersOrWriters and try to write to it through another handle. sl@0: //! Uses API elements: Open(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4005.txt", EFileShareAny | EFileWrite. sl@0: //! 3. Write "open test" to file. sl@0: //! 4. Close file. sl@0: //! 5. Open file "{Drives, RAMDriveTestPath}file\tc4005.txt", with EFileShareReadersOrWriters | EFileRead. sl@0: //! 6. Open "{Drives, RAMDriveTestPath}file\tc4005.txt" through new handle called file2, EFileShareReadersOrWriters | EFileWrite. sl@0: //! 7. Read from file. sl@0: //! 8. Try to write "open test" to file. sl@0: //! 9. Close file. sl@0: //! 10. Delete file. sl@0: //! 11. Close file system. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults No errors returned or panics raised. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: CREATE_OBJECT RFile file2 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-4005-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-4005-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-4005-001-Open_command008 sl@0: COMMAND file2 new sl@0: COMMAND file2 Open PBASE-F32-File-PublicApi-4005-001-Open_command011 sl@0: COMMAND file2 Read PBASE-F32-File-PublicApi-4005-001-Read_command012 sl@0: COMMAND file2 Write PBASE-F32-File-PublicApi-4005-001-Write_command013 sl@0: COMMAND file2 Close sl@0: COMMAND file2 ~ sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4005-001-Delete_command020 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-4005 sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0003 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0003 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Create() test. Create a file. sl@0: //! Uses API elements: Create(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Create passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0003.txt", EFileShareAny sl@0: //! 3. Open the file. sl@0: //! 4. Write literal "test created this file" to file. sl@0: //! 5. Close RFile. sl@0: //! 6. Delete file. sl@0: //! 7. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Create() returns KErrNone. File is created. No panics raised or errors returned sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Create PBASE-F32-File-PublicApi-0003-001-Create_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0003-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0003-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0003 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0004 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0004 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Replace() test. Replace a file. sl@0: //! Uses API elements: Replace(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0004.txt", EFileWrite sl@0: //! 3. Call RFile::Write passing literal "This file is replaced" sl@0: //! 4. Call Flush on file. sl@0: //! 5. Close file. sl@0: //! 6. Open file. sl@0: //! 7. Read the file. sl@0: //! 8. Close RFile. sl@0: //! 9. Delete file. sl@0: //! 10. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Replace returns KErrNone. File contains written literal and nothing else. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0004-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0004-001-Write_command006 sl@0: COMMAND file Flush sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-0004-001-Open_command009 sl@0: COMMAND file Read sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0004-001-Delete_command013 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0004 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0005 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0005 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Temp() test. Create a temporary file. sl@0: //! Uses API elements: Temp(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Temp passing RFs, literal "{Drives, RAMDriveTestPath}file\", TDesc&, EFileWrite sl@0: //! 3. Call RFile::Write passing literal "This is temporary file" sl@0: //! 4. Rename the file to "tc0005.txt". sl@0: //! 5. Close RFile. sl@0: //! 6. Delete temporary file. sl@0: //! 7. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Temp() returns KErrNone, temporary file is created. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Temp PBASE-F32-File-PublicApi-0005-001-Temp_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0005-001-Write_command006 sl@0: COMMAND file Rename PBASE-F32-File-PublicApi-0005-001-Rename_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0005-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0005 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0006 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0006 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Read(TDes8 &aDes) test - will open file and read its contents to a buffer. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0006.txt", EFileWrite sl@0: //! 3. Call RFile::Write passing literal "Synchronous read test!". sl@0: //! 4. Set the file position to 0. sl@0: //! 5. Call RFile::Read(). sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns KErrNone. Data is read and verified. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0006-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0006-001-Write_command006 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-0006-001-Seek_command007 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0006-001-Read_command008 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0006-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0006 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0007 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0007 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous Read(TDes8& aDes, TRequestStatus &aStatus) test - will open file and read its contents to a buffer. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0007.txt", EFileWrite. sl@0: //! 3. Call RFile::Write passing literal "asynchronous read test" sl@0: //! 4. Reset file position sl@0: //! 5. Call RFile::Read() passing TRequestStatus. sl@0: //! 6. Wait until asynchronous call completes sl@0: //! 7. Close RFile. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The asynchronous read call finishes with KErrNone. Data is read and verified. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0007-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0007-001-Write_command006 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-0007-001-Seek_command007 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0007-001-Read_command008 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0007-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0007 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0008 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0008 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Read(TDes8 &aDes, TInt aLength) test - will open file and read fixed length from its contents to a buffer. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0008.txt", EFileWrite sl@0: //! 3. Write "synchronous read with length test" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read() passing TDesC, 5 for the length sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns KErrNone. Data is read and verified. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0008-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0008-001-Write_command006 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-0008-001-Seek_command007 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0008-001-Read_command008 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0008-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0008 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0009 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0009 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous Read(TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) test - will open file and read fixed length from its contents to a buffer. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0009.txt", EFileWrite. sl@0: //! 3. Call RFile::Write passing literal "Asynchronous read with length test" sl@0: //! 4. Reset file position sl@0: //! 4. Create TRequestStatus variable. sl@0: //! 5. Call RFile::Read() passing TRequestStatus and 5 for length. sl@0: //! 6. Wait until asynchronous call completes sl@0: //! 7. Close RFile. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The asynchronous read call finishes with KErrNone. Data is read and verified. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0009-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0009-001-Write_command006 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-0009-001-Seek_command007 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0009-001-Read_command008 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0009-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0009 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0010 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0010 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Read(TInt aPos, TDes8 &aDes) test - will open file and read from given position its contents to a buffer. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0010.txt", EFileWrite sl@0: //! 3. Write "synchronous read with position test" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read() passing 5 for position. sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns KErrNone. Data is read and verified. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0010-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0010-001-Write_command006 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-0010-001-Seek_command007 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0010-001-Read_command008 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0010-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0010 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0011 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0011 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous Read(TInt aPos, TDes8 &aDes, TRequestStatus &aStatus) test - will open file and read from given position its contents to a buffer. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0011.txt", EFileWrite. sl@0: //! 3. Call RFile::Write passing literal "asynchronous read with position test" sl@0: //! 4. Reset file position sl@0: //! 5. Call RFile::Read() passing TRequestStatus and 5 for position. sl@0: //! 6. Wait until asynchronous call completes sl@0: //! 7. Close RFile. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The asynchronous read call finishes with KErrNone. Data is read and verified. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0011-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0011-001-Write_command006 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-0011-001-Seek_command007 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0011-001-Read_command008 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0011-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0011 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0012 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0012 sl@0: //! @SYMAPI RFile sl@0: //! @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. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0012.txt", EFileWrite sl@0: //! 3. Write "synchronous read with length and position test" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read() passing 5 for length and 5 for position. sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns KErrNone. Data is read and verified. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0012-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0012-001-Write_command006 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-0012-001-Seek_command007 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0012-001-Read_command008 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0012-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0012 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0013 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0013 sl@0: //! @SYMAPI RFile sl@0: //! @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. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0013.txt", EFileWrite. sl@0: //! 3. Call RFile::Write passing literal "asynchronous read with length and position test" sl@0: //! 4. Reset file position sl@0: //! 5. Call RFile::Read() passing TRequestStatus, 5 for length and 5 for position. sl@0: //! 6. Wait until asynchronous call completes sl@0: //! 7. Close RFile. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The asynchronous read call finishes with KErrNone. Data is read and verified. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0013-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0013-001-Write_command006 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-0013-001-Seek_command007 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0013-001-Read_command008 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0013-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0013 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0014 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0014 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function ReadCancel(TRequestStatus aStatus) and EFileReadAsyncAll test. sl@0: //! Uses API elements: ReadCancel(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0014.txt", EFileWrite. sl@0: //! 3. Write message "short data" to file. sl@0: //! 4. Close file sl@0: //! 5. Open fail again with EFileShareAny | EFileReadAsyncAll. sl@0: //! 6. Call RFile::Read() passing TRequestStatus. sl@0: //! 7. Call ReadCancel passing TRequestStatus. sl@0: //! 8. Close RFile. sl@0: //! 9. Delete file. sl@0: //! 10. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults TRequestStatus returns KErrCancel after ReadCancel. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0014-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0014-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-0014-001-Open_command008 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-0014-001-Seek_command009 sl@0: COMMAND !AsyncError=-3 file Read PBASE-F32-File-PublicApi-0014-001-Read_command010 sl@0: ASYNC_DELAY 5 sl@0: COMMAND file ReadCancel sl@0: COMMAND file ReadCancel sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0014-001-Delete_command015 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0014 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0015 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0015 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function ReadCancel() test, call two asynchronous reads consequently on the same file. sl@0: //! Uses API elements: ReadCancel(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0015.txt", EFileWrite. sl@0: //! 3. Write message "short data" to file. sl@0: //! 4. Close file sl@0: //! 5. Open fail again with EFileShareAny | EFileReadAsyncAll. sl@0: //! 6. Call RFile::Read() passing TRequestStatus. sl@0: //! 7. Call RFile::Read() passing TRequestStatus. sl@0: //! 8. Call ReadCancel. sl@0: //! 9. Close RFile. sl@0: //! 10. Delete file. sl@0: //! 11. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Both TRequestStatuses return KErrCancel after ReadCancel. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0015-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0015-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-0015-001-Open_command008 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-0015-001-Seek_command009 sl@0: COMMAND !AsyncError=-3 file Read PBASE-F32-File-PublicApi-0015-001-Read_command010 sl@0: COMMAND !AsyncError=-3 file Read PBASE-F32-File-PublicApi-0015-001-Read_command011 sl@0: ASYNC_DELAY 5 sl@0: COMMAND file ReadCancel PBASE-F32-File-PublicApi-0015-001-ReadCancel_command012 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0015-001-Delete_command016 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0015 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0016 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0016 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Write(const TDesC8 &aDes) test - will open file and Write to it from given buffer. sl@0: //! Uses API elements: Write(const TDesC8 &aDes). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0016.txt", EFileWrite sl@0: //! 3. Call RFile::Write() passing "Write test". sl@0: //! 4. Reset file position sl@0: //! 5. Read from file to verify it's content. sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Write() returns KErrNone. File contains written data. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0016-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0016-001-Write_command006 sl@0: COMMAND file Flush sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-0016-001-Open_command009 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0016-001-Read_command010 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0016-001-Delete_command014 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0016 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0017 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0017 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous Write(const TDesC8 &aDes, TRequestStatus &aStat) test - will open file and Write to it from given buffer. sl@0: //! Uses API elements: Write(const TDesC8 &aDes, TRequestStatus &aStat). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0017.txt", EFileWrite. sl@0: //! 3. Call RFile::Write() passing "Asynchronous write test" and TRequestStatus. sl@0: //! 4. Wait for request to complete. sl@0: //! 5. Reset file position sl@0: //! 6. Read from file to verify it's content. sl@0: //! 7. Close RFile. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Write completes with KErrNone. File contains written data. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0017-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0017-001-Write_command006 sl@0: OUTSTANDING sl@0: COMMAND file Flush sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-0017-001-Open_command009 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0017-001-Read_command010 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0017-001-Delete_command014 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0017 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0018 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0018 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Write(const TDesC8 &aDes, TInt aLength) test - will open file and Write to it fixed length bytes from given buffer. sl@0: //! Uses API elements: Write(const TDesC8 &aDes, TInt aLength). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0018.txt", EFileWrite sl@0: //! 3. Call RFile::Write() passing "Synchronous write test with length", and 5 for length to write. sl@0: //! 4. Reset file position sl@0: //! 5. Read from file to verify it's content. sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Write() returns KErrNone. File contains written data. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0018-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0018-001-Write_command006 sl@0: COMMAND file Flush sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-0018-001-Open_command009 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0018-001-Read_command010 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0018-001-Delete_command014 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0018 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0019 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0019 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous Write(const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus) test - will open file and Write to it fixed length bytes from given buffer. sl@0: //! Uses API elements: Write(const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0019.txt", EFileWrite. sl@0: //! 3. Call RFile::Write() passing "Asynchronous write test with length", 5 for length and TRequestStatus. sl@0: //! 4. Wait for request to complete. sl@0: //! 5. Reset file position sl@0: //! 6. Read from file to verify it's content. sl@0: //! 7. Close RFile. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Write completes with KErrNone. File contains written data. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0019-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0019-001-Write_command006 sl@0: OUTSTANDING sl@0: COMMAND file Flush sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-0019-001-Open_command009 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0019-001-Read_command010 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0019-001-Delete_command014 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0019 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0020 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0020 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Write(TInt aPos, const TDesC8 &aDes) test - will open file and Write to it from given position. sl@0: //! Uses API elements: Write(TInt aPos, const TDesC8 &aDes). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0020.txt", EFileWrite sl@0: //! 4. Call RFile::Write() passing "Synchronous write test with position", and 2 for position to write from. sl@0: //! 5. Reset file position sl@0: //! 6. Read from file to verify it's content. sl@0: //! 7. Close RFile. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Write() returns KErrNone. File contains written data. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0020-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0020-001-Write_command006 sl@0: COMMAND file Flush sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0020-001-Write_command008 sl@0: COMMAND file Flush sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-0020-001-Open_command011 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0020-001-Read_command012 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0020-001-Delete_command016 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0020 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0021 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0021 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus) test - will open file and Write to it from given position. sl@0: //! Uses API elements: Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0021.txt", EFileWrite. sl@0: //! 3. Call RFile::Write() passing "Asynchronous write test with position", 2 for position and TRequestStatus. sl@0: //! 4. Wait for request to complete. sl@0: //! 5. Reset file position sl@0: //! 6. Read from file to verify it's content. sl@0: //! 7. Close RFile. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults TRequestStatus equals KErrNone after writing. File contains written data. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0021-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0021-001-Write_command006 sl@0: COMMAND file Flush sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0021-001-Write_command008 sl@0: OUTSTANDING sl@0: COMMAND file Flush sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-0021-001-Open_command011 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0021-001-Read_command012 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0021-001-Delete_command016 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0021 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0022 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0022 sl@0: //! @SYMAPI RFile sl@0: //! @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. sl@0: //! Uses API elements: Write(TInt aPos, const TDesC8 &aDes, TInt aLength). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0022.txt", EFileWrite sl@0: //! 3. Call RFile::Write() passing "Synchronous write test with position, length", 2 for position and 4 for length to write from. sl@0: //! 4. Reset file position sl@0: //! 5. Read from file to verify it's content. sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Write() returns KErrNone. File contains written data. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0022-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0022-001-Write_command006 sl@0: COMMAND file Flush sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0022-001-Write_command008 sl@0: COMMAND file Flush sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-0022-001-Open_command011 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0022-001-Read_command012 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0022-001-Delete_command016 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0022 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0023 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0023 sl@0: //! @SYMAPI RFile sl@0: //! @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. sl@0: //! Uses API elements: Write(TInt aPos, const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0023.txt", EFileWrite. sl@0: //! 3. Call RFile::Write() passing "Asynchronous write test with position, length",2 for position, 4 for length and TRequestStatus. sl@0: //! 4. Wait for request to complete. sl@0: //! 5. Reset file position sl@0: //! 6. Read from file to verify it's content. sl@0: //! 7. Close RFile. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults TRequestStatus equals KErrNone after writing. File contains written data. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0023-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0023-001-Write_command006 sl@0: COMMAND file Flush sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0023-001-Write_command008 sl@0: OUTSTANDING sl@0: COMMAND file Flush sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-0023-001-Open_command011 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0023-001-Read_command012 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0023-001-Delete_command016 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0023 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0024 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0024 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Lock(), UnLock test - open a file and lock it, then try to read from it from another RFs. sl@0: //! Uses API elements: Lock(), Unlock(), Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0024.txt", EFileWrite, open file as fileOne. sl@0: //! 3. Write "Lock test" to file. sl@0: //! 4. Lock the file by Calling Lock() with pos=0 and length=3. sl@0: //! 5. open "{Drives, RAMDriveTestPath}file\tc0024.txt" as fileTwo. sl@0: //! 6. read from the fileTwo. sl@0: //! 7. read from fileOne. sl@0: //! 8. unlock fileOne by RFile::Unlock(), with pos=0 and length=3. sl@0: //! 9. read from fileTwo. sl@0: //! 10. Close fileOne. sl@0: //! 11. Close fileTwo. sl@0: //! 12. Delete file. sl@0: //! 13. Close first RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults When fileOne is locked reading of fileTwo returns KErrLocked, Lock() returns KErrNone, UnLock returns KErrNone. sl@0: //! After fileOne is unlocked Reading of fileTwo returns KErrNone. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: CREATE_OBJECT RFile file2 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0024-001-Replace_command005 sl@0: COMMAND file2 new sl@0: COMMAND file2 Open PBASE-F32-File-PublicApi-0024-001-Open_command008 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0024-001-Write_command010 sl@0: COMMAND file Lock PBASE-F32-File-PublicApi-0024-001-Lock_command011 sl@0: COMMAND !Error=-22 file2 Read sl@0: COMMAND file Read sl@0: COMMAND file UnLock PBASE-F32-File-PublicApi-0024-001-UnLock_command016 sl@0: COMMAND file2 Read sl@0: COMMAND file2 Close sl@0: COMMAND file2 ~ sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0024-001-Delete_command025 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0024 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0025 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0025 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Seek() test - open a file and and get it's current position. sl@0: //! Uses API elements: Seek(), Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0025.txt", EFileWrite. sl@0: //! 3. Write "Should seek to pos here" to file. sl@0: //! 3. Call RFile::Seek passing ESeekStart, 19 sl@0: //! 4. Call RFile::Read; sl@0: //! 5. Close file. sl@0: //! 6. Delete file. sl@0: //! 7. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Seek() returns KErrNone, buffer contents equals string literal "here". sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0025-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0025-001-Write_command006 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-0025-001-Seek_command007 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0025-001-Read_command008 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0025-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0025 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0125 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0125 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Seek() test - test TSeek::ESeekCurrent. sl@0: //! Uses API elements: Seek(), Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0125.txt", EFileWrite. sl@0: //! 3. Write "Should seek to pos here" to file. sl@0: //! 3. Call RFile::Seek passing ESeekStart, 0 sl@0: //! 4. Call RFile::Read passing 7 for length. sl@0: //! 5. Call RFile::Seek passing ESeekCurrent, 5. sl@0: //! 6. Call RFile::Read(). sl@0: //! 7. Close file. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Seek() returns KErrNone, step 6 returns "to pos here". sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0125-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0125-001-Write_command006 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-0125-001-Seek_command007 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0125-001-Read_command008 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-0125-001-Seek_command009 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0125-001-Read_command010 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0125-001-Delete_command014 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0125 sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0026 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0026 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Flush() test - open file, write to it and then flush. sl@0: //! Uses API elements: Open(), Flush(), Write(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0026.txt", EFileWrite. sl@0: //! 5. Call RFile::Write() passing "This data should be flushed". sl@0: //! 4. Call RFile::Flush(); sl@0: //! 5. Close file. sl@0: //! 6. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Flush() returns KErrNone. File contains written data. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0026-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0026-001-Write_command006 sl@0: COMMAND file Flush sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-0026-001-Seek_command008 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0026-001-Read_command009 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0026-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0026 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0027 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0027 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous Flush() test - open file, write to it and then flush. sl@0: //! Uses API elements: Open(), Flush(), Write(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0027.txt", EFileWrite. sl@0: //! 3. Call RFile::Write() passing literal "This data should be flushed". sl@0: //! 4. Call RFile::Flush() passing TRequestStatus. sl@0: //! 5. Wait for request to complete. sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults TRequestStatus returns KErrNone. File contains written data. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0027-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0027-001-Write_command006 sl@0: COMMAND file Flush PBASE-F32-File-PublicApi-0027-001-Flush_command007 sl@0: OUTSTANDING sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-0027-001-Seek_command008 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0027-001-Read_command009 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0027-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0027 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0028 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0028 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function SetSize, Size() test - open file and set it's size, then get it. sl@0: //! Uses API elements: Open(), Flush(), Write(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0028.txt", EFileWrite. sl@0: //! 3. Write literal "Size test this text should be truncated" to file. sl@0: //! 4. Call RFile::SetSize() passing it 10 for size. sl@0: //! 5. Call RFile::Size. sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Size, RFile::SetSize returns KErrNone(). aSize equals with the size of file. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0028-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0028-001-Write_command006 sl@0: COMMAND file SetSize PBASE-F32-File-PublicApi-0028-001-SetSize_command007 sl@0: COMMAND file Size PBASE-F32-File-PublicApi-0028-001-Size_command008 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0028-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0028 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0029 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0029 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Att(), SetAtt test - open file and get it's attributes. sl@0: //! Uses API elements: Open(), Att(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0029.txt", EFileWrite. sl@0: //! 3. Write "SetAtt test" to file. sl@0: //! 4. Call RFile::SetAtt, passing KEntryAttNormal, KEntryAttReadOnly sl@0: //! 5. Flush data to file. sl@0: //! 6. Close file. sl@0: //! 7. Open file. sl@0: //! 8. Call RFile::Att(). sl@0: //! 9. Close RFile. sl@0: //! 10. Delete file. sl@0: //! 11. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Att(), RFile::SetAtt returns KErrNone, aAttValue & KEntryAttNormal equals KEntryAttNormal. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0029-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0029-001-Write_command006 sl@0: COMMAND file SetAtt PBASE-F32-File-PublicApi-0029-001-SetAtt_command007 sl@0: COMMAND file Flush sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-0029-001-Open_command010 sl@0: COMMAND file Att PBASE-F32-File-PublicApi-0029-001-Att_command011 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0029-001-Delete_command015 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0029 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0030 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0030 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Modified(), SetModified test - open file and get/set it's modification time. sl@0: //! Uses API elements: Open(), Modified(), SetModified(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0030.txt", EFileWrite. sl@0: //! 3. Call RFile::SetModified, passing 20070118: sl@0: //! 4. Close the file. sl@0: //! 5. Open the file. sl@0: //! 6. Call RFile::Modified(). sl@0: //! 7. Close RFile. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Modified(), RFile::SetModified returns KErrNone. Modified returns same date as was set with SetModified. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0030-001-Replace_command005 sl@0: COMMAND file SetModified PBASE-F32-File-PublicApi-0030-001-SetModified_command006 sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-0030-001-Open_command008 sl@0: COMMAND file Modified PBASE-F32-File-PublicApi-0030-001-Modified_command009 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0030-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0030 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0031 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0031 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Set() test - open file and set it's modification time and attributes. sl@0: //! Uses API elements: Open(), Set(), Modified(), Att(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0031.txt", EFileShareAny. sl@0: //! 3. Call RFile::Set() passing it 20070118:, KEntryAttArchive, KEntryAttReadOnly. sl@0: //! 4. Call RFile::Modified() to validate modification date. sl@0: //! 5. Call RFile::Att() to validate attributes. sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Set() returns KErrNone. Data and attributes are validated. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0031-001-Replace_command005 sl@0: COMMAND file Set PBASE-F32-File-PublicApi-0031-001-Set_command006 sl@0: COMMAND file Att PBASE-F32-File-PublicApi-0031-001-Att_command007 sl@0: COMMAND file Modified PBASE-F32-File-PublicApi-0031-001-Modified_command008 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0031-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0031 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0032 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0032 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function ChangeMode() test - open file and change it's access mode. sl@0: //! Uses API elements: Open(), SetModified(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0032.txt". sl@0: //! 3. Close file. sl@0: //! 4. open the file in EFileShareExclusive mode. sl@0: //! 5. Call RFile::ChangeMode() passing it EFileShareReadersOnly. sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::ChangeMode() returns KErrNone. Filemode is EFileSareReadersOnly. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0032-001-Replace_command005 sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-0032-001-Open_command007 sl@0: COMMAND file ChangeMode PBASE-F32-File-PublicApi-0032-001-ChangeMode_command008 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0032-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0032 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0033 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0033 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Rename() test - open file and rename it. sl@0: //! Uses API elements: Open(), RFile::Rename(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0033.txt", EFileShareExclusive | EFileWrite. sl@0: //! 3. Call RFile::Rename() passing it string literal "test_renamed.txt". sl@0: //! 4. Call RFile::Name. sl@0: //! 5. rename the file back to tc0033.txt sl@0: //! 6. Delete file. sl@0: //! 7. Close resources. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Rename() returns KErrNone. File is renamed. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0033-001-Replace_command005 sl@0: COMMAND file Rename PBASE-F32-File-PublicApi-0033-001-Rename_command006 sl@0: COMMAND file Name sl@0: COMMAND file Rename PBASE-F32-File-PublicApi-0033-001-Rename_command008 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0033-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0033 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0034 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0034 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Drive() test - open file and get it's drive info. sl@0: //! Uses API elements: RFile::Drive(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0034.txt", EFileShareAny. sl@0: //! 3. Call RFile::Drive(). sl@0: //! 4. Close RFile. sl@0: //! 5. Delete file. sl@0: //! 6. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Drive() returns KErrNone. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0034-001-Replace_command005 sl@0: COMMAND file Drive PBASE-F32-File-PublicApi-0034-001-Drive_command006 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0034-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0034 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0039 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0039 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Name() test. Open a file and get it's name. sl@0: //! Uses API elements: Name(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Open file "{Drives, RAMDriveTestPath}file\tc0039.txt" as file1 sl@0: //! 3. Call RFile::Name(). sl@0: //! 4. Close file system. sl@0: //! 5. Delete file. sl@0: //! 6. Close file. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Name() returns KErrNone. File name is verified. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0039-001-Replace_command005 sl@0: COMMAND file Name PBASE-F32-File-PublicApi-0039-001-Name_command006 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0039-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0039 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0040 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0040 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Duplicate() test. Duplicate a file and compare it size to original. sl@0: //! Uses API elements: Duplicate(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Replace file "{Drives, RAMDriveTestPath}file\tc0040.txt" as file1, with EFileWrite permission sl@0: //! 3. Write "Duplicate Test" to file sl@0: //! 4. Create file2 by calling RFile::Duplicate(), passing reference to file1. sl@0: //! 5. Read from file2 to verify that file1 has been duplicated. sl@0: //! 6. Close file1. sl@0: //! 7. Close file2. sl@0: //! 8. Delete file1 sl@0: //! 9. Close fs session. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Duplicate() returns KErrNone. The content of file1 and file2 is equal. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: CREATE_OBJECT RFile file2 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0040-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0040-001-Write_command006 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-0040-001-Seek_command007 sl@0: COMMAND file2 new sl@0: COMMAND file2 Duplicate PBASE-F32-File-PublicApi-0040-001-Duplicate_command010 sl@0: COMMAND file2 Read PBASE-F32-File-PublicApi-0040-001-Read_command011 sl@0: COMMAND file2 Close sl@0: COMMAND file2 ~ sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0040-001-Delete_command017 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0040 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1040 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1040 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Duplicate() with aType = EOwnerThread test. Duplicate file and compare it size to original. sl@0: //! Uses API elements: Duplicate(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Replace file "{Drives, RAMDriveTestPath}file\tc1040.txt" as file1, with EFileWrite permission sl@0: //! 3. Write "Duplicate Test" to file sl@0: //! 4. Create file2 by calling RFile::Duplicate(), passing reference to file1. sl@0: //! 5. Read from file2 to verify that file1 has been duplicated. sl@0: //! 6. Close file1. sl@0: //! 7. Close file2. sl@0: //! 8. Delete file1. sl@0: //! 9. Close fs session. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Duplicate() returns KErrNone. The content of file1 and file2 is equal. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: CREATE_OBJECT RFile file2 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1040-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1040-001-Write_command006 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-1040-001-Seek_command007 sl@0: COMMAND file2 new sl@0: COMMAND file2 Duplicate PBASE-F32-File-PublicApi-1040-001-Duplicate_command010 sl@0: COMMAND file2 Read PBASE-F32-File-PublicApi-1040-001-Read_command011 sl@0: COMMAND file2 Close sl@0: COMMAND file2 ~ sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1040-001-Delete_command017 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1040 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0041 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0041 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function FullName() test. Open a file and get it's full name. sl@0: //! Uses API elements: FullName(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Replace file "{Drives, RAMDriveTestPath}file\tc0041.txt" sl@0: //! 3. Call FullName. sl@0: //! 4. Close file. sl@0: //! 5. Delete file. sl@0: //! 6. Close fs session. sl@0: //! sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::FullName returns KErrNone. Descriptor retrieved from FullName is equal to the path and name of the file. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0041-001-Replace_command005 sl@0: COMMAND file FullName PBASE-F32-File-PublicApi-0041-001-FullName_command006 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0041-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0041 sl@0: sl@0: sl@0: ////////////////////////////////////////////////////////////////////// sl@0: ////////////////////////////////////////////////////////////////////// sl@0: ////// ////// sl@0: ////// /////////////////////////////////// ////// sl@0: ////// /// /// ////// sl@0: ////// /// NEGATIVE TESTS /// ////// sl@0: ////// /// /// ////// sl@0: ////// /////////////////////////////////// ////// sl@0: ////// ////// sl@0: ////////////////////////////////////////////////////////////////////// sl@0: ////////////////////////////////////////////////////////////////////// sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0101 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0101 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Open() neg. test. Call open with invalid path. sl@0: //! Uses API elements: Open(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Open file "{Drives, RAMDriveTestPath}file\base\chickenfarm\chicken.txt" sl@0: //! 3. Close fs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults open returns KErrPathNotFound! on step 2. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND !Error=-12 file Open PBASE-F32-File-PublicApi-0101-001-Open_command005 sl@0: COMMAND file ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0101 sl@0: sl@0: sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0103 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0103 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Open() neg. test. Call open with invalid filemodes. sl@0: //! Uses API elements: Open(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Create file "{Drives, RAMDriveTestPath}file\tc0103.txt". sl@0: //! 3. Close file. sl@0: //! 4. Open file "{Drives, RAMDriveTestPath}file\tc0103.txt" with EFileShareReadersOnly | EFileWrite. sl@0: //! 5. Delete file. sl@0: //! 6. Close fs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Open returns KErrArgument on step 2. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0103-001-Replace_command005 sl@0: COMMAND file Close sl@0: COMMAND !Error=-6 file Open PBASE-F32-File-PublicApi-0103-001-Open_command007 sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0103-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0103 sl@0: sl@0: sl@0: // sl@0: // Create sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0201 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0201 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Create() neg. test. Try to Create a file in nonexistant folder. sl@0: //! Uses API elements: Create(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Create passing RFs, literal "{Drives, RAMDriveTestPath}file\base\chickenfarm\chicken.txt", EFileShareAny sl@0: //! 3. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Create() returns KErrPathNotFound on step 2. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND !Error=-12 file Create PBASE-F32-File-PublicApi-0201-001-Create_command005 sl@0: COMMAND file ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0201 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0202 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0202 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Create() neg. test. Try to Create a file which already exists. sl@0: //! Uses API elements: Create(). sl@0: //! @SYMTestActions 1. Create RFs handle. sl@0: //! 2. Create a File, by calling RFile::Replace with "{Drives, RAMDriveTestPath}file\tc0202.txt", EFileWrite. sl@0: //! 3. Close file. sl@0: //! 4. Call RFile::Create passing "{Drives, RAMDriveTestPath}file\tc0202.txt", EFileWrite. sl@0: //! 5. Delete file. sl@0: //! 6. Close fs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults KErrAlreadyExists on step 3 sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0202-001-Replace_command005 sl@0: COMMAND file Close sl@0: COMMAND !Error=-11 file Create PBASE-F32-File-PublicApi-0202-001-Create_command007 sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0202-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0202 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0203 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0203 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Create() neg. test. Try to Create a file with bizarre filemodes. sl@0: //! Uses API elements: Create(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Replace file "{Drives, RAMDriveTestPath}file\tc0203.txt" sl@0: //! 3. Delete file "{Drives, RAMDriveTestPath}file\tc0203.txt" sl@0: //! 2. Create file "{Drives, RAMDriveTestPath}file\tc0203.txt" with EFileShareReadersOnly | EFileWrite sl@0: //! 3. Close session. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Create returns KErrArgument on step 2. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0203-001-Replace_command001 sl@0: COMMAND file Close sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0203-001-Delete_command002 sl@0: COMMAND !Error=-6 file Create PBASE-F32-File-PublicApi-0203-001-Create_command005 sl@0: COMMAND file ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0203 sl@0: sl@0: sl@0: // sl@0: // Replace sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0301 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0301 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Replace() neg. test. Replace a file with nonexistant path. sl@0: //! Uses API elements: Replace(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\base\chickenfarm\chicken.txt", EFileWrite sl@0: //! 3. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Replace() returns KErrPathNotFound on step 2. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND !Error=-12 file Replace PBASE-F32-File-PublicApi-0301-001-Replace_command005 sl@0: COMMAND file ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0301 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0303 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0303 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Replace() neg. test. Call Replace with bizarre filemodes. sl@0: //! Uses API elements: Replace(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0303.txt", EFileShareReadersOnly | EFileWrite sl@0: //! 3. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults returns KErrArgument on step 2. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND !Error=-6 file Replace PBASE-F32-File-PublicApi-0303-001-Replace_command005 sl@0: COMMAND file ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0303 sl@0: sl@0: // sl@0: // TEMP sl@0: // sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0401 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0401 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Temp() neg. test. Try to create temporary file in nonexistant directory. sl@0: //! Uses API elements: Temp(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Temp passing RFs, literal "{Drives, RAMDriveChar}:\base\chickenfarm\", TDesc&, EFileWrite sl@0: //! 3. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Temp() KErrPathNotFound on step 2. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND !Error=-12 file Temp PBASE-F32-File-PublicApi-0401-001-Temp_command005 sl@0: COMMAND file ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0401 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0403 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0403 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Temp() neg. test. Try to create a temporary file with obscure filemodes. sl@0: //! Uses API elements: Temp(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Temp passing RFs, literal "{Drives, RAMDriveTestPath}file\", TDesc&, EFileShareReadersOnly | EFileWrite sl@0: //! 3. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Temp() returns KErrArgument on step 2. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND !Error=-6 file Temp PBASE-F32-File-PublicApi-0403-001-Temp_command005 sl@0: COMMAND file ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0403 sl@0: sl@0: sl@0: // sl@0: // READ3 sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0701 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0701 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Read() neg. test - try to read negative length. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\0701.txt", EFileWrite sl@0: //! 3. Write "test" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read() passing TDesC, -1 for the length sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns KErrArgument. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0701-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0701-001-Write_command006 sl@0: COMMAND !Error=-6 file Read PBASE-F32-File-PublicApi-0701-001-Read_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0701-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0701 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0702 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0702 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Read() neg. test - Will open file and try to read more data from it, than the buffer length. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0702.txt", EFileWrite sl@0: //! 3. Write "readtest" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Create buffer descriptor with length 4. sl@0: //! 5. Call RFile::Read() passing buffer, 1000 for the length. sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns an KErrOverlow. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0702-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0702-001-Write_command006 sl@0: COMMAND !Error=-9 file Read PBASE-F32-File-PublicApi-0702-001-Read_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0702-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0702 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0703 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0703 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Read(TDesC8& aData, TInt length) test. Pass 0 for length sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0703.txt", EFileWrite sl@0: //! 3. Write "readtest" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Create buffer descriptor with length 4. sl@0: //! 5. Call RFile::Read() passing buffer, 0 for the length. sl@0: //! 6. Close RFile. sl@0: //! 7. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns empty descriptor sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0703-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0703-001-Write_command006 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0703-001-Read_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0703-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0703 sl@0: sl@0: sl@0: // sl@0: // READ4 sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0801 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0801 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous Read() neg. test - try to read negative length. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0801.txt", EFileWrite sl@0: //! 3. Write "test" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read() passing TDesC, -1 for the length, TRequestStatus sl@0: //! 6. wait for request. sl@0: //! 7. Close RFile. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns KErrArgument with TRequestStatus. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0801-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0801-001-Write_command006 sl@0: COMMAND !AsyncError=-6 file Read PBASE-F32-File-PublicApi-0801-001-Read_command007 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0801-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0801 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0802 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0802 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous Read() neg. test - Will open file and try to read more data from it, than the buffer length. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0802.txt", EFileWrite sl@0: //! 3. Write "readtest" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Create buffer descriptor with length 4. sl@0: //! 6. Call RFile::Read() passing buffer, 1000 for the length, TRequestStatus sl@0: //! 7. Wait for status. sl@0: //! 8. Close RFile. sl@0: //! 9. Delete file. sl@0: //! 10. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns an KErrOverlow, with TRequestStatus. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0802-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0802-001-Write_command006 sl@0: COMMAND !AsyncError=-9 file Read PBASE-F32-File-PublicApi-0802-001-Read_command007 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0802-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0802 sl@0: sl@0: sl@0: // sl@0: // READ5 sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0901 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0901 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Read() neg. test - try to read from negative position. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0901.txt", EFileWrite sl@0: //! 3. Write "test" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read() passing -1 for position. sl@0: //! 6. Close file. sl@0: //! 7. Delete file. sl@0: //! 8. Close file server session. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Panic FSCLIENT:19 at step 5. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0901-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0901-001-Write_command006 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0901-001-Read_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0901-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0901-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0901 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-0902 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-0902 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Read() neg. test - try to read beyond file's length. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0902.txt", EFileWrite sl@0: //! 3. Write "test" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read() passing 100 for position. sl@0: //! 6. Close file. sl@0: //! 7. Delete file. sl@0: //! 8. Close file server session. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read(data, position) returns zero length descriptor. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-0902-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-0902-001-Write_command006 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-0902-001-Read_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0902-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-0902 sl@0: sl@0: sl@0: // sl@0: // READ6 sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1001 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1001 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous Read() neg. test - try to read from negative position. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1001.txt", EFileWrite sl@0: //! 3. Write "synchronous read with position test" to file sl@0: //! 4. Call RFile::Read() passing -1 for position, TRequestStatus. sl@0: //! 5. close file. sl@0: //! 6. Delete tc1001.txt sl@0: //! 7. Close file server session. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Panic FSCLIENT:19 at step 5. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1001-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1001-001-Write_command006 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-1001-001-Read_command007 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1001-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1001-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1001 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1002 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1002 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous Read() neg. test - try to read beyond files length. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1002.txt", EFileWrite sl@0: //! 3. Write "test" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read() passing 100 for position, TRequestStatus. sl@0: //! 6. close file. sl@0: //! 7. Delete tc1002.txt sl@0: //! 8. Close file server session. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read(data, position, status) returns zero length descriptor. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1002-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1002-001-Write_command006 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-1002-001-Read_command007 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1002-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1002 sl@0: sl@0: // sl@0: // READ7 sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1101 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1101 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Read() neg. test - Will try to read from negative position. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1101.txt", EFileWrite sl@0: //! 3. Write "test" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read() passing 4 for length and -1 for position. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Panic FSCLIENT:19 at step 5. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1101-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1101-001-Write_command006 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-1101-001-Read_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1101-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1101-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1101 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1102 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1102 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Read() neg. test - will try to read negative length. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1102.txt", EFileWrite sl@0: //! 3. Write "test" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read() passing -4 for length and 10 for position. sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns KErrArgument. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1102-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1102-001-Write_command006 sl@0: COMMAND !Error=-6 file Read PBASE-F32-File-PublicApi-1102-001-Read_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1102-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1102 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1103 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1103 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Read() neg. test - Will try to read from position beyond file length. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1103.txt", EFileWrite sl@0: //! 3. Write "test" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read() passing 4 for length and 10 for position (larger than file's content). sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns KErrNone. Length of data read is 0. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1103-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1103-001-Write_command006 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-1103-001-Read_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1103-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1103 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1104 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1104 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Read() neg. test - Read more from file than buffer's length. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1104.txt", EFileRead sl@0: //! 3. Write "readtest" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read() passing buffer (with size 4) 1000 for length and 10 for position. sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns an KErrOverlow. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1104-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1104-001-Write_command006 sl@0: COMMAND !Error=-9 file Read PBASE-F32-File-PublicApi-1104-001-Read_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1104-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1104 sl@0: sl@0: sl@0: // sl@0: // READ8 sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1201 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1201 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous Read() neg. test - Will try to read from negative position. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1201.txt", EFileWrite sl@0: //! 3. Write "test" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read() passing 4 for length and -1 for position and TRequestStatus. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Panic FSCLIENT:19 at step 5. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1201-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1201-001-Write_command006 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-1201-001-Read_command007 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1201-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1201-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1201 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1202 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1202 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous Read() neg. test - will try to read negative length. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1202.txt", EFileWrite sl@0: //! 3. Write "test" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read() passing -4 for length and 10 for position and TRequestStatus. sl@0: //! 6. wait for request to complete sl@0: //! 7. Close RFile. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns KErrArgument. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1202-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1202-001-Write_command006 sl@0: COMMAND !AsyncError=-6 file Read PBASE-F32-File-PublicApi-1202-001-Read_command007 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1202-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1202 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1203 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1203 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous Read() neg. test - Will try to read from position beyond file length. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1203.txt", EFileWrite sl@0: //! 3. Write "test" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read(), 4 for length, 10 for position. sl@0: //! 6. Wait for request to complete. sl@0: //! 7. Close RFile. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns KErrNone. Length of data read is 0. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1203-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1203-001-Write_command006 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-1203-001-Read_command007 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1203-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1203 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1204 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1204 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Read() neg. test - Read more from file than buffer's length. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1204.txt", EFileWrite sl@0: //! 3. Write "synchronous read with length and position test" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read() passing buffer (buffer size 4) 1000 for length and for position 10, TRequestStatus. sl@0: //! 6. Wait for request. sl@0: //! 7. Close RFile. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns an KErrOverlow. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1204-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1204-001-Write_command006 sl@0: COMMAND !AsyncError=-9 file Read PBASE-F32-File-PublicApi-1204-001-Read_command007 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1204-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1204 sl@0: sl@0: // sl@0: // Write sl@0: // sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1301 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1301 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Write(const TDesC8 &aDes) test - write an emptry buffer to file. sl@0: //! sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1301.txt", EFileWrite. sl@0: //! 3. Call Write, passing "" and descriptor with length 0. sl@0: //! 4. Close file sl@0: //! 5. Close RFile. sl@0: //! 6. Delete file sl@0: //! 7. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults No panic is raised, or error returned. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1301-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1301-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1301-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1301 sl@0: sl@0: // sl@0: // Write2 sl@0: // sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1401 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1401 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function WWrite(const TDesC8 &aDes, TRequestStatus &aStatus) test - write an emptry buffer to file. sl@0: //! sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc.txt", EFileWrite. sl@0: //! 3. Call Write, passing "" and descriptor with length 0. sl@0: //! 4. Close file sl@0: //! 5. Close RFile. sl@0: //! 6. Delete file sl@0: //! 7. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults No panic is raised, or error returned. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1401-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1401-001-Write_command006 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1401-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1401 sl@0: sl@0: sl@0: // sl@0: // Write3 sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1602 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1602 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function write neg. test - pass negative number for length. sl@0: //! sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1602.txt", EFileWrite. sl@0: //! 3. Call Write, pass message "short data" and -1 length. sl@0: //! 4. Close file sl@0: //! 5. Close RFile. sl@0: //! 6. Delete file sl@0: //! 7. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Write() returns KErrArgument. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1602-001-Replace_command005 sl@0: COMMAND !Error=-6 file Write PBASE-F32-File-PublicApi-1602-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1602-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1602 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1603 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1603 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function write neg. test - pass 0 number for length. sl@0: //! sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1603.txt", EFileWrite. sl@0: //! 3. Call Write, pass message "short data" and 0. sl@0: //! 4. Close file sl@0: //! 5. Close RFile. sl@0: //! 6. Delete file. sl@0: //! 7. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Write() returns KErrNone. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1603-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1603-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1603-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1603 sl@0: sl@0: sl@0: // sl@0: // Write4 sl@0: // sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1701 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1701 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous function write neg. test - pass negative number for length. sl@0: //! sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1701.txt", EFileWrite. sl@0: //! 3. Call Write passing literal "test", -1 for length and TRequestStatus. sl@0: //! 4. Close RFile. sl@0: //! 5. Delete file. sl@0: //! 6. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Write() returns KErrArgument. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1701-001-Replace_command005 sl@0: COMMAND !AsyncError=-6 file Write PBASE-F32-File-PublicApi-1701-001-Write_command006 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1701-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1701 sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1702 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1702 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous function write test - pass 0 for length. sl@0: //! sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1702.txt", EFileWrite. sl@0: //! 3. Call Write passing literal "test", 0 for length and TRequestStatus. sl@0: //! 4. Close RFile. sl@0: //! 5. Delete file. sl@0: //! 6. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults No panics raised or errors returned. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1702-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1702-001-Write_command006 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1702-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1702 sl@0: sl@0: sl@0: // sl@0: // Write5 sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1801 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1801 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function write neg. test. Write to negative position. sl@0: //! Uses API elements:. sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1801.txt", EFileWrite. sl@0: //! 3. Call Write passing "test" and -1 for position. sl@0: //! sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Panic FSCLIENT:19. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1801-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1801-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1801-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1801-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1801 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1802 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1802 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous function write test. Pass a 0 length descriptor to RFile::Write(). sl@0: //! Uses API elements: void Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1802.txt", EFileWrite. sl@0: //! 3. Call Write passing "" and 1 for position. sl@0: //! sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults No error is returned or panic raised. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1802-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1802-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1802-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1802 sl@0: sl@0: sl@0: // sl@0: // Write6 sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1901 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1901 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous function write neg. test. Pass a negative number for position to RFile::Write(). sl@0: //! Uses API elements: void Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1901.txt", EFileWrite. sl@0: //! 3. Call Write passing "test" and -1 for position. sl@0: //! sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Panic FSCLIENT:19. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1901-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1901-001-Write_command006 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1901-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1901-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1901 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-1902 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-1902 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous function write test. Pass a 0 length descriptor to RFile::Write(). sl@0: //! Uses API elements: void Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1902.txt", EFileWrite. sl@0: //! 3. Call Write passing descriptor with length 0 and 1 for position. sl@0: //! sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults No error is returned or panic raised. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-1902-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-1902-001-Write_command006 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1902-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-1902 sl@0: sl@0: sl@0: // sl@0: // Write7 sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2001 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2001 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) neg. test. Pass a negative position and negative length. sl@0: //! Uses API elements: Write(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2001.txt", EFileWrite. sl@0: //! 3. call write, pass "test", -1 for length, -1 for position. sl@0: //! sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Panic, FSCLIENT:19 sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2001-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-2001-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2001-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2001-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2001 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2002 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2002 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test. Pass 0 for length. sl@0: //! Uses API elements: Write(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2002.txt", EFileWrite. sl@0: //! 3. call write, pass "test", 0 for length, 0 for position. sl@0: //! sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults No panic is raised and no error is returned sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2002-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-2002-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2002-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2002 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2003 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2003 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test. Pass -1 for length. sl@0: //! Uses API elements: Write(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2003.txt", EFileWrite. sl@0: //! 3. call write, pass "test", -1 for length, 0 for position. sl@0: //! sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Write returns KerrArgument sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2003-001-Replace_command005 sl@0: COMMAND !Error=-6 file Write PBASE-F32-File-PublicApi-2003-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2003-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2003 sl@0: sl@0: sl@0: // sl@0: // Write8 sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2101 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2101 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous function write test. Pass a negative position and negative length. sl@0: //! Uses API elements: Write(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2101.txt", EFileWrite. sl@0: //! 3. call write, pass literal "negative write test", -1 for length, -1 for negative, TRequestStatus. sl@0: //! sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Panic, FSCLIENT:19 sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2101-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-2101-001-Write_command006 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2101-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2101-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2101 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2102 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2102 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test. Pass 0 for length. sl@0: //! Uses API elements: Write(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2102.txt", EFileWrite. sl@0: //! 3. call write, pass "test", 0 for length, 0 for position. sl@0: //! sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults No panic is raised and no error is returned sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2102-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-2102-001-Write_command006 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2102-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2102 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2103 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2103 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test. Pass a negative length. sl@0: //! Uses API elements: Write(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2103.txt", EFileWrite. sl@0: //! 3. call write, pass "test", -1 for length, 0 for position. sl@0: //! sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Write returns KerrArgument sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2103-001-Replace_command005 sl@0: COMMAND !AsyncError=-6 file Write PBASE-F32-File-PublicApi-2103-001-Write_command006 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2103-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2103 sl@0: sl@0: sl@0: // sl@0: // Lock sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2201 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2201 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Lock() neg. test - open a file and try to lock zero bytes. sl@0: //! Uses API elements: Lock(), Unlock(), Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2201.txt", EFileRead. sl@0: //! 3. Write "test" to file. sl@0: //! 4. Lock the file by Calling Lock(), passing pos 0, len 0. sl@0: //! 5. Close file. sl@0: //! 6. Close fs session. sl@0: //! sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Panic - FSCLIENT:17 sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2201-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-2201-001-Write_command006 sl@0: COMMAND file Lock PBASE-F32-File-PublicApi-2201-001-Lock_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2201-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK !PanicCode=17 !PanicString="FSCLIENT" sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2201-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2201 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2202 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2202 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Lock() neg. test - open same file with two handles, try to lock the same region twice. sl@0: //! Uses API elements: Lock(), Unlock(), Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2202.txt", EFileWrite, open file as fileOne. sl@0: //! 3. Lock the file by Calling Lock(). sl@0: //! 4. Open "{Drives, RAMDriveTestPath}file\tc2202.txt" as fileTwo. sl@0: //! 5. lock the file 2 at the same position and length as fileOne. sl@0: //! 6. Close fileOne. sl@0: //! 7. Close fileTwo sl@0: //! 8. Delete file sl@0: //! 9. Close first RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Lock() returns KErrLocked at step 5. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: CREATE_OBJECT RFile file2 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2202-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-2202-001-Write_command006 sl@0: COMMAND file Lock PBASE-F32-File-PublicApi-2202-001-Lock_command007 sl@0: COMMAND file2 new sl@0: COMMAND file2 Open PBASE-F32-File-PublicApi-2202-001-Open_command010 sl@0: COMMAND !Error=-22 file2 Lock PBASE-F32-File-PublicApi-2202-001-Lock_command011 sl@0: COMMAND file2 Close sl@0: COMMAND file2 ~ sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2202-001-Delete_command017 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2202 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2203 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2203 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Lock() neg. test - try to lock negative length. sl@0: //! Uses API elements: Lock(), Unlock(), Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2203.txt", EFileWrite, open file as fileOne. sl@0: //! 3. Lock the file by Calling Lock() with 0 for pos and -1 for length. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Lock() returns panic. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2203-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-2203-001-Write_command006 sl@0: COMMAND file Lock PBASE-F32-File-PublicApi-2203-001-Lock_command007 sl@0: END_TEST_BLOCK !PanicCode=17 !PanicString="FSCLIENT" sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2203-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2203 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2204 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2204 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Lock() neg. test - try to lock negative position. sl@0: //! Uses API elements: Lock(), Unlock(), Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2204.txt", EFileWrite, open file as fileOne. sl@0: //! 3. Lock the file by Calling Lock() with -1 for pos and 1 for length. sl@0: //! 4. Close file. sl@0: //! 5. Delete file. sl@0: //! 6. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults No error returned or panic raised. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2204-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-2204-001-Write_command006 sl@0: COMMAND file Lock PBASE-F32-File-PublicApi-2204-001-Lock_command007 sl@0: END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2204-001-Delete_command010 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2204 sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2205 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2205 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Lock() neg. test - try to write to locked file. sl@0: //! Uses API elements: Lock(), Unlock(), Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2205.txt", EFileWrite, open file as file1. sl@0: //! 3. Call RFile::Open passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2205.txt", EFileWrite | EFileShareAny, open file as file2. sl@0: //! 4. Write "test" to file through file1. sl@0: //! 5. Lock the file by Calling Lock() with 6 for pos and 4 for length, through file1 sl@0: //! 6. Write "Trying to write to locked region" through new handle sl@0: //! 7. Close file. sl@0: //! 8. Close second handle sl@0: //! 9. Delete file. sl@0: //! 10. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults trying to write to locked file returns KErrLocked sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: CREATE_OBJECT RFile file2 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2205-001-Replace_command005 sl@0: COMMAND file2 new sl@0: COMMAND file2 Open PBASE-F32-File-PublicApi-2205-001-Open_command008 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-2205-001-Write_command010 sl@0: COMMAND file Lock PBASE-F32-File-PublicApi-2205-001-Lock_command011 sl@0: COMMAND !Error=-22 file2 Write PBASE-F32-File-PublicApi-2205-001-Write_command013 sl@0: COMMAND file2 Close sl@0: COMMAND file2 ~ sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2205-001-Delete_command020 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2205 sl@0: sl@0: // sl@0: // UnLock sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2301 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2301 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function UnLock() neg. test - open a file try to unlock a region that has not been locked. sl@0: //! sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2301.txt", EFileWrite. sl@0: //! 3. write "test data" to file. sl@0: //! 4. call UnLock with position 2 and with length 4 sl@0: //! 5. close file sl@0: //! 6. Delete file. sl@0: //! 7. close fs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults UnLock() returns KErrNotFound. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2301-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-2301-001-Write_command006 sl@0: COMMAND !Error=-1 file UnLock PBASE-F32-File-PublicApi-2301-001-UnLock_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2301-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2301 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2302 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2302 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function UnLock() neg. test - open a file lock some part, try to unlock a portion of the locked region. sl@0: //! sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2302.txt", EFileWrite. sl@0: //! 3. Write some data to file. sl@0: //! 4. Lock the file by Calling Lock() with pos 0 and length 2. sl@0: //! 5. UnLock a portion of that file with posi 0 and length 1. sl@0: //! 6. Close that file. sl@0: //! 7. Delete file. sl@0: //! 8. close fs session. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults UnLock() returns KErrNotFound. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2302-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-2302-001-Write_command006 sl@0: COMMAND file Lock PBASE-F32-File-PublicApi-2302-001-Lock_command007 sl@0: COMMAND !Error=-1 file UnLock PBASE-F32-File-PublicApi-2302-001-Close_command008 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2302-001-Delete_command014 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2302 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2303 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2303 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function UnLock() neg. test - UnLock a region with negative length sl@0: //! sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2303.txt", EFileWrite. sl@0: //! 3. Write some data to file. sl@0: //! 4. Call Lock with pos 2, length 2. sl@0: //! 5. UnLock by calling 2 for position -2 for length. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults UnLock() causes FSCLIENT:18. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2303-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-2303-001-Write_command006 sl@0: COMMAND file Lock PBASE-F32-File-PublicApi-2303-001-Lock_command007 sl@0: COMMAND file UnLock PBASE-F32-File-PublicApi-2303-001-UnLock_command008 sl@0: END_TEST_BLOCK !PanicCode=18 !PanicString="FSCLIENT" sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2303-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2303 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2304 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2304 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function UnLock() neg. test - UnLock a region with negative position sl@0: //! sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2304.txt", EFileWrite. sl@0: //! 3. Write some data to file. sl@0: //! 4. Call Lock with pos 2, length 2. sl@0: //! 5. UnLock by calling -2 for position 2 for length. sl@0: //! 6. Close that file. sl@0: //! 7. Delete file. sl@0: //! 8. close fs session. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::UnLock() causes FSCLIENT:19. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2304-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-2304-001-Write_command006 sl@0: COMMAND file Lock PBASE-F32-File-PublicApi-2304-001-Lock_command007 sl@0: COMMAND file UnLock PBASE-F32-File-PublicApi-2304-001-UnLock_command008 sl@0: END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic" sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2304-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2304 sl@0: sl@0: sl@0: // sl@0: // Seek sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2401 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2401 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Seek() neg. test - try to seek to negative position. sl@0: //! sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2401.txt", EFileWrite. sl@0: //! 3. Write "Seek test" to file. sl@0: //! 4. Call RFile::Seek() passing ESeekStart, -10. sl@0: //! 5. Close file. sl@0: //! 6. Delete file. sl@0: //! 7. Close fs session. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Seek returns KErrArgument. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2401-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-2401-001-Write_command006 sl@0: COMMAND !Error=-6 file Seek PBASE-F32-File-PublicApi-2401-001-Seek_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2401-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2401 sl@0: sl@0: sl@0: // sl@0: // Flush sl@0: // sl@0: sl@0: sl@0: sl@0: sl@0: // sl@0: // Size sl@0: // sl@0: sl@0: sl@0: sl@0: sl@0: // sl@0: // SetSize sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2701 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2701 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function SetSize() neg test - try to pass a negative size. sl@0: //! sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2701.txt", EFileWrite. sl@0: //! 3. Write "test" to file. sl@0: //! 3. Call SetSize with -2. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Panic - FSCLIENT:20 sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2701-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-2701-001-Write_command006 sl@0: COMMAND file SetSize PBASE-F32-File-PublicApi-2701-001-SetSize_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2701-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK !PanicCode=20 !PanicString="FSCLIENT" sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2701-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2701 sl@0: sl@0: sl@0: // sl@0: // Att sl@0: // sl@0: sl@0: sl@0: sl@0: // sl@0: // SetAtt sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-2901 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-2901 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function SetAtt neg. test - set same attribute on both bitmasks. sl@0: //! Uses API elements: Att(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2901.txt", EFileWrite. sl@0: //! 3. Write "test" to file. sl@0: //! 4. Call RFile::SetAtt, passing KEntryAttNormal, KEntryAttNormal sl@0: //! sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Panic FSCLIENT:21 at step 3. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-2901-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-2901-001-Write_command006 sl@0: COMMAND file SetAtt PBASE-F32-File-PublicApi-2901-001-SetAtt_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2901-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK !PanicCode=21 !PanicString="FSCLIENT panic" sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2901-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-2901 sl@0: sl@0: sl@0: // sl@0: // Modified sl@0: // sl@0: sl@0: sl@0: sl@0: // sl@0: // SetModified sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-3101 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-3101 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function SetModified neg. test - open file for reading and set it's date. sl@0: //! Uses API elements: Modified(), SetModified(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3101.txt", EFileWrite. sl@0: //! 3. Write "test" to file sl@0: //! 4. Call RFile::SetModified. sl@0: //! 5. Close file. sl@0: //! 6. Delete file. sl@0: //! 7. Close fs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::SetModified returns KErrAccessDenied. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-3101-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-3101-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-3101-001-Open_command008 sl@0: COMMAND !Error=-21 file SetModified PBASE-F32-File-PublicApi-3101-001-SetModified_command009 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3101-001-Delete_command013 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-3101 sl@0: sl@0: sl@0: // sl@0: // ChangeMode sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-5501 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-5501 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function ChangeMode() neg. test - call ChangeMode with value outside of set (EFileShareExclusive, EFileShareReadersOnly). sl@0: //! Uses API elements: SetModified(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc5501.txt", EFileShareExclusive. sl@0: //! 3. Write "test" to file. sl@0: //! 4. Call RFile::ChangeMode() passing it EFileWrite. sl@0: //! 5. Close RFile. sl@0: //! 6. Delete file. sl@0: //! 7. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::ChangeMode() returns KErrArgument. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-5501-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-5501-001-Write_command006 sl@0: COMMAND !Error=-6 file ChangeMode PBASE-F32-File-PublicApi-5501-001-ChangeMode_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-5501-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-5501 sl@0: sl@0: // sl@0: // Set sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-3201 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-3201 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Set() neg. test - try to clear and set the same attribute. sl@0: //! Uses API elements: Set(), Modified(), Att(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3201.txt", EFileShareAny. sl@0: //! 3. Call RFile::Set() passing it 20070118:, KEntryAttReadOnly, KEntryAttReadOnly. sl@0: //! 4. Close file sl@0: //! 5. Delete file. sl@0: //! 6. Close Fs session sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Panic - FSCLIENT:21. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-3201-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-3201-001-Write_command006 sl@0: COMMAND file Set PBASE-F32-File-PublicApi-3201-001-Set_command007 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK !PanicCode=21 !PanicString="FSCLIENT panic" sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3201-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-3201 sl@0: sl@0: sl@0: sl@0: // sl@0: // Rename sl@0: // sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-3401 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-3401 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function Rename() neg. test - open file in read mode and try to rename it. sl@0: //! Uses API elements: RFile::Rename(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3401.txt", EFileRead. sl@0: //! 3. Write "test" to file. sl@0: //! 4. Call RFile::Rename() passing it string literal "test_renamed.txt". sl@0: //! 5. Close RFile. sl@0: //! 6. Delete file. sl@0: //! 7. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Rename() returns KErrAccessDenied. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-3401-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-3401-001-Write_command006 sl@0: COMMAND file Close sl@0: COMMAND file Open PBASE-F32-File-PublicApi-3401-001-Open_command008 sl@0: COMMAND !Error=-21 file Rename PBASE-F32-File-PublicApi-3401-001-Rename_command009 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3401-001-Delete_command12 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: sl@0: END_TESTCASE PBASE-F32-File-PublicApi-3401 sl@0: sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-3402 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-3402 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function BlockMap() negative test, replace a file and then call BlockMap on it. sl@0: //! Uses API elements: Open(), BlockMap(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace() passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3402.txt", EFileRead. sl@0: //! 4. Call RFile::BlockMap(). sl@0: //! 5. Close RFile. sl@0: //! 6. Delete file. sl@0: //! 7. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults BlockMap returns KErrNotSupported. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-3402-001-Replace_command003 sl@0: COMMAND !Error=-5 file BlockMap sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3402-001-Delete_command007 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-3402 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-3403 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-3403 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Function BlockMap() negative test. Call BlockMap with Usage ETestDebug sl@0: //! Uses API elements: Open(), BlockMap(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace() to create file tc3403 with EFileWrite sl@0: //! 4. Call RFile::BlockMap() passing ETestDebug for usage, 0 for startPos. sl@0: //! 5. Close RFile. sl@0: //! 6. Delete file. sl@0: //! 7. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults BlockMap returns KErrNotSupported. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-3403-001-Replace_command003 sl@0: COMMAND !Error=-5 file BlockMap PBASE-F32-File-PublicApi-3403-001-BlockMap_command004 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3403-001-Delete_command007 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-3403 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-3501 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-3501 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous Read(TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) test. Pass 0 for length. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3501.txt", EFileWrite. sl@0: //! 3. Call RFile::Write passing literal "Asynchronous read with length test" sl@0: //! 4. Reset file position sl@0: //! 4. Create TRequestStatus variable. sl@0: //! 5. Call RFile::Read() passing TRequestStatus and 0 for length. sl@0: //! 6. Wait until asynchronous call completes sl@0: //! 7. Close RFile. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns empty descriptor sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-3501-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-3501-001-Write_command006 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-3501-001-Seek_command007 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-3501-001-Read_command008 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3501-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-3501 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-3502 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-3502 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Synchronous Read(TInt aPos, TDes8 &aDes, TInt aLength) test. Pass 0 for length. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3502.txt", EFileWrite sl@0: //! 3. Write "synchronous read with length and position test" to file sl@0: //! 4. Reset file position. sl@0: //! 5. Call RFile::Read() passing 0 for length and 5 for position. sl@0: //! 6. Close RFile. sl@0: //! 7. Delete file. sl@0: //! 8. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns empty descriptor sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-3502-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-3502-001-Write_command006 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-3502-001-Seek_command007 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-3502-001-Read_command008 sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3502-001-Delete_command012 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-3502 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-File-PublicApi-3503 sl@0: //! @SYMTestCaseID PBASE-F32-File-PublicApi-3503 sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Asynchronous Read(TInt aPos, TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) test. Pass 0 for length. sl@0: //! Uses API elements: Read(). sl@0: //! @SYMTestActions 1. Create RFs session. sl@0: //! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3503.txt", EFileWrite. sl@0: //! 3. Call RFile::Write passing literal "asynchronous read with length and position test" sl@0: //! 4. Reset file position sl@0: //! 5. Call RFile::Read() passing TRequestStatus, 0 for length and 5 for position. sl@0: //! 6. Wait until asynchronous call completes sl@0: //! 7. Close RFile. sl@0: //! 8. Delete file. sl@0: //! 9. Close RFs. sl@0: //! sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults RFile::Read() returns empty descriptor sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RFile file sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND file new sl@0: COMMAND file Replace PBASE-F32-File-PublicApi-3503-001-Replace_command005 sl@0: COMMAND file Write PBASE-F32-File-PublicApi-3503-001-Write_command006 sl@0: COMMAND file Seek PBASE-F32-File-PublicApi-3503-001-Seek_command007 sl@0: COMMAND file Read PBASE-F32-File-PublicApi-3503-001-Read_command008 sl@0: OUTSTANDING sl@0: COMMAND file Close sl@0: COMMAND file ~ sl@0: COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3503-001-Delete_command011 sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-PublicApi-3503 sl@0: sl@0: START_TESTCASE PBASE-F32-File-Uninstall sl@0: //! @SYMTestCaseID PBASE-F32-File-Uninstall sl@0: //! @SYMAPI RFile sl@0: //! @SYMTestCaseDesc Cleanup the directories created to test RFile sl@0: //! @SYMTestActions 1. Create RFs Session. sl@0: //! 2. Remove the directories created using Rfs::RmDir(). sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults Removes the directory created and keeps the environment clean. sl@0: //! sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 RmDir PBASE-F32-File-PublicApi-Unistall sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-File-Uninstall