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 Jaanus Randveer, Runno Sgirka sl@0: //! @SYMScriptCreationDate 31/08/2007 sl@0: //! @SYMScriptDescription The test script contains API tests for the following functions of RDir class: sl@0: //! TInt Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) sl@0: //! TInt Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) sl@0: //! void Close() sl@0: //! TInt Read(TEntryArray &anArray) sl@0: //! void Read(TEntryArray &anArray, TRequestStatus &aStatus) sl@0: //! TInt Read(TEntry &anEntry) sl@0: //! void Read(TPckg< TEntry > &anEntry, TRequestStatus &aStatus) sl@0: sl@0: sl@0: LOAD_SUITE T_SfSrv sl@0: DELAY 5000 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-RDir-CopyFiles sl@0: //! @SYMTestCaseID PBASE-F32-RDir-CopyFiles sl@0: //! @SYMAPI CFileMan sl@0: //! @SYMTestCaseDesc SetupTestCase to test RDir Apis sl@0: //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function. sl@0: //! 2. Use CFileMan to copy the files on to relavent directories. sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The CFileMan::Copy() copies the testdata files properly on to specific directories. sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT CFileMan CFileMan1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND CFileMan1 NewL PBASE-F32-RDir-PublicApi-NewL sl@0: COMMAND RFs1 MkDirAll PBASE-F32-RDir-PublicApi-001-RamDiskPath sl@0: COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Any sl@0: COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Bigline sl@0: COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_FtEof sl@0: COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_FtRead sl@0: COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_MLine sl@0: COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_NewFile sl@0: COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Oneliner sl@0: COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Test1 sl@0: COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Test2 sl@0: COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Test3 sl@0: COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Test sl@0: COMMAND CFileMan1 ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-RDir-CopyFiles sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-RDir-PublicApi-5001 sl@0: //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5001 sl@0: //! @SYMAPI RDir sl@0: //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) and sl@0: //! function Close() test, that opens a directory using the NULL UIDs. sl@0: //! Uses API elements: Open(), Close(). sl@0: //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function. sl@0: //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType), sl@0: //! and RFs session as first parameter, and :\base\t_sfsrv\ as second parameter, sl@0: //! and empty TUidType as third parameter. sl@0: //! 3.Call RDir::Close(). sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The Open() method call is completed returning KErrNone. sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RDir RDir1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RDir1 new sl@0: COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5001-001-Open_command005 sl@0: COMMAND RDir1 Close sl@0: COMMAND RDir1 ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-RDir-PublicApi-5001 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-RDir-PublicApi-5002 sl@0: //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5002 sl@0: //! @SYMAPI RDir sl@0: //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) test, that opens a directory using sl@0: //! an attribute bitmask to filter the directory entry types. sl@0: //! Uses API elements: Open(), Close(). sl@0: //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function. sl@0: //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask), sl@0: //! and RFs session as first parameter, and :\base\t_sfsrv\ as second parameter, sl@0: //! and KEntryAttNormal as third parameter. sl@0: //! 3.Call RDir::Close(). sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The Open() method call is completed returning KErrNone. sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RDir RDir1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RDir1 new sl@0: COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5002-001-Open_command005 sl@0: COMMAND RDir1 Close sl@0: COMMAND RDir1 ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-RDir-PublicApi-5002 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-RDir-PublicApi-5003 sl@0: //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5003 sl@0: //! @SYMAPI RDir sl@0: //! @SYMTestCaseDesc Function Read(TEntryArray &anArray) test, that reads all filtered directory entries into the sl@0: //! specified array synchronously. sl@0: //! Uses API elements: Open(), Read(), Close(). sl@0: //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function. sl@0: //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask), sl@0: //! and RFs session as first parameter, and :\base\t_sfsrv\ (containing 14 files: 1mb, sl@0: //! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt, sl@0: //! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt, sl@0: //! Test3.txt, USBLOAD.ZIP) as second parameter, and KEntryAttNormal sl@0: //! as third parameter. sl@0: //! 3.Call RDir::Read(TEntryArray &anArray) to read all filtered directory entries into the sl@0: //! specified array synchronously. sl@0: //! 4.Call RDir::Close(). sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The Read() method call is completed returning KErrEof. sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RDir RDir1 sl@0: CREATE_OBJECT TEntryArray TEntryArray1 sl@0: CREATE_OBJECT TEntry TEntry1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND TEntryArray1 new sl@0: COMMAND RDir1 new sl@0: COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5003-001-Open_command005 sl@0: COMMAND !Error=-25 RDir1 Read PBASE-F32-RDir-PublicApi-5003-001-Read_command006 sl@0: COMMAND RDir1 Close sl@0: COMMAND TEntry1 ~ sl@0: COMMAND TEntryArray1 ~ sl@0: COMMAND RDir1 ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-RDir-PublicApi-5003 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-RDir-PublicApi-5004 sl@0: //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5004 sl@0: //! @SYMAPI RDir sl@0: //! @SYMTestCaseDesc Function Read(TEntryArray &anArray, TRequestStatus &aStatus) test, that reads all filtered directory sl@0: //! entries into the specified array asynchronously. sl@0: //! Uses API elements: Open(), Read(), Close(). sl@0: //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function. sl@0: //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask), sl@0: //! and RFs session as first parameter, and :\base\t_sfsrv\ (containing 14 files: 1mb, sl@0: //! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt, sl@0: //! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt, sl@0: //! Test3.txt, USBLOAD.ZIP) as second parameter, and KEntryAttNormal sl@0: //! as third parameter. sl@0: //! 3.Call RDir::Read(TEntryArray &anArray, TRequestStatus &aStatus) to read all filtered directory sl@0: //! entries into the specified array asynchronously. sl@0: //! 4.Call RDir::Close(). sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The Read() method call is completed returning KErrEof. sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RDir RDir1 sl@0: CREATE_OBJECT TEntryArray TEntryArray1 sl@0: CREATE_OBJECT TEntry TEntry1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND TEntryArray1 new sl@0: COMMAND RDir1 new sl@0: COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5004-001-Open_command005 sl@0: COMMAND !AsyncError=-25 RDir1 Read PBASE-F32-RDir-PublicApi-5004-001-Read_command006 sl@0: OUTSTANDING sl@0: COMMAND RDir1 Close sl@0: COMMAND TEntry1 ~ sl@0: COMMAND TEntryArray1 ~ sl@0: COMMAND RDir1 ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-RDir-PublicApi-5004 sl@0: sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-RDir-PublicApi-5007 sl@0: //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5007 sl@0: //! @SYMAPI RDir sl@0: //! @SYMTestCaseDesc Function Read(TEntry &anEntry) test, that calls multiple iterations of Read() and checks the values returned. sl@0: //! Uses API elements: Open(), Read(), Close(). sl@0: //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function. sl@0: //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask), sl@0: //! and RFs session as first parameter, and :\base\t_sfsrv\ (containing 14 files: 1mb, sl@0: //! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt, sl@0: //! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt, sl@0: //! Test3.txt, USBLOAD.ZIP) as second parameter, and KEntryAttNormal sl@0: //! as third parameter. sl@0: //! 3.Call multiple RDir::Read(TEntry &anEntry) methods to read the contents of the entire directory. sl@0: //! 4.Call RDir::Close(). sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The first six Read() method calls are completed returning KErrNone, the last returns error -25 (KErrEof) as there sl@0: //! are no more entries. All verifications with expected values pass. sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RDir RDir1 sl@0: CREATE_OBJECT TEntry TEntry1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RDir1 new sl@0: COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5007-001-Open_command005 sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5007-001-Read_command006 sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND !Error=-25 RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Close sl@0: COMMAND TEntry1 ~ sl@0: COMMAND RDir1 ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-RDir-PublicApi-5007 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-RDir-PublicApi-5008 sl@0: //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5008 sl@0: //! @SYMAPI RDir sl@0: //! @SYMTestCaseDesc Function Read(TPckg &anEntry, TRequestStatus &aStatus) test, that calls multiple iterations of Read() and sl@0: //! checks the values returned. sl@0: //! Uses API elements: Open(), Read(), Close(). sl@0: //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function. sl@0: //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask), sl@0: //! and RFs session as first parameter, and :\base\t_sfsrv\ (containing 14 files: 1mb, sl@0: //! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt, sl@0: //! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt, sl@0: //! Test3.txt, USBLOAD.ZIP) as second parameter, and KEntryAttNormal sl@0: //! as third parameter. sl@0: //! 3.Call multiple RDir::Read(TPckg &anEntry, TRequestStatus &aStatus) methods to read the contents of the sl@0: //! entire directory asynchronously. sl@0: //! 4.Call RDir::Close(). sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The first six Read() method calls are completed returning KErrNone, the last returns error -25 (KErrEof) as there sl@0: //! are no more entries. All verifications with expected values pass. sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RDir RDir1 sl@0: CREATE_OBJECT TEntry TEntry1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RDir1 new sl@0: COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5008-001-Open_command005 sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5008-001-Read_command006 sl@0: OUTSTANDING sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async sl@0: OUTSTANDING sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async sl@0: OUTSTANDING sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async sl@0: OUTSTANDING sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async sl@0: OUTSTANDING sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async sl@0: OUTSTANDING sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async sl@0: OUTSTANDING sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async sl@0: OUTSTANDING sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async sl@0: OUTSTANDING sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async sl@0: OUTSTANDING sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async sl@0: OUTSTANDING sl@0: COMMAND !AsyncError=-25 RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async sl@0: OUTSTANDING sl@0: COMMAND RDir1 Close sl@0: COMMAND TEntry1 ~ sl@0: COMMAND RDir1 ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-RDir-PublicApi-5008 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-RDir-PublicApi-5009 sl@0: //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5009 sl@0: //! @SYMAPI RDir sl@0: //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) test, that checks that Open() makes it sl@0: //! possible to filter entries by attributes. sl@0: //! Uses API elements: Open(), Read(), Close(). sl@0: //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function. sl@0: //! 2.Call RFs::setAtt, to set some attributes of the files in :\base\t_sfsrv\. sl@0: //! 3.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask), sl@0: //! and RFs session as first parameter, and :\base\t_sfsrv\ (containing 14 files: 1mb, sl@0: //! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt, sl@0: //! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt, sl@0: //! Test3.txt, USBLOAD.ZIP) as second parameter, and sl@0: //! KEntryAttReadOnly|KEntryAttMatchExclusive as third parameter. sl@0: //! 4.Call multiple RDir::Read(TEntry &anEntry) methods to read the contents of the entire directory. sl@0: //! 5.Set previously set attributes back to normal. sl@0: //! 6.Call RDir::Close(). sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The first two Read() method calls are completed returning KErrNone, the last returns error -25 (KErrEof) as there sl@0: //! are no more entries (only two read-only files - Test2.txt and USBLOAD.ZIP). All verifications with expected values sl@0: //! pass. sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RDir RDir1 sl@0: CREATE_OBJECT TEntry TEntry1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command005 sl@0: COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command006 sl@0: COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command008 sl@0: COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command009 sl@0: COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command010 sl@0: COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command011 sl@0: COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command012 sl@0: COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command013 sl@0: COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command014 sl@0: COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command016 sl@0: COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command020 sl@0: COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command021 sl@0: COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command015 sl@0: COMMAND RDir1 new sl@0: COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5009-001-Open_command013 sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5009-001-Read_command014 sl@0: COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_Test1 sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5009-001-Read_command015 sl@0: COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_Test3 sl@0: COMMAND !Error=-25 RDir1 Read PBASE-F32-RDir-PublicApi-5009-001-Read_command016 sl@0: COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_EOF sl@0: COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command017 sl@0: COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command019 sl@0: COMMAND RDir1 Close sl@0: COMMAND TEntry1 ~ sl@0: COMMAND RDir1 ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-RDir-PublicApi-5009 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-RDir-PublicApi-5010 sl@0: //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5010 sl@0: //! @SYMAPI RDir sl@0: //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) test, that checks that Open() works fine sl@0: //! with * wildcard. sl@0: //! Uses API elements: Open(), Read(), Close(). sl@0: //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function. sl@0: //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType), sl@0: //! and RFs session as first parameter, and :\base\t_sfsrv\ (containing 14 files: 1mb, sl@0: //! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt, sl@0: //! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt, sl@0: //! Test3.txt, USBLOAD.ZIP) as second parameter, and empty TUidType as sl@0: //! third parameter. sl@0: //! 3.Call RDir::Read(TEntry &anEntry) to read a single directory entry synchronously. sl@0: //! 4.Call RDir::Close(). sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The Open() method call is completed returning KErrNone. The last Read() method call returns KErrEof as there are sl@0: //! only 5 *.txt files (test.txt, Test1.txt, Test2.txt, Test3.txt, test_rom.txt). All other verifications pass. sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RDir RDir1 sl@0: CREATE_OBJECT TEntry TEntry1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RDir1 new sl@0: COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5010-001-Open_command005 sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5010-001-Read_command007 sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND !Error=-25 RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync sl@0: COMMAND RDir1 Close sl@0: COMMAND TEntry1 ~ sl@0: COMMAND RDir1 ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-RDir-PublicApi-5010 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-RDir-PublicApi-5011 sl@0: //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5011 sl@0: //! @SYMAPI RDir sl@0: //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) test, that checks that Open() works fine sl@0: //! with ? wildcard. sl@0: //! Uses API elements: Open(), Read(), Close(). sl@0: //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function. sl@0: //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask), sl@0: //! and RFs session as first parameter, and :\base\t_sfsrv\ (containing 14 files: 1mb, sl@0: //! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt, sl@0: //! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt, sl@0: //! Test3.txt, USBLOAD.ZIP) as second parameter, and sl@0: //! KEntryAttNormal as third parameter. sl@0: //! 3.Call RDir::Read(TEntry &anEntry) to read a single directory entry synchronously. sl@0: //! 4.Call RDir::Close(). sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The Open() method call is completed returning KErrNone. The last Read() method call returns KErrEof as there are sl@0: //! only 3 Test?.txt files (Test1.txt, Test2.txt, Test3.txt). All other verifications pass. sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RDir RDir1 sl@0: CREATE_OBJECT TEntry TEntry1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RDir1 new sl@0: COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5011-001-Open_command005 sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5011-001-Read_command006 sl@0: COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_Test1 sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5011-001-Read_command006 sl@0: COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_Test2 sl@0: COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5011-001-Read_command008 sl@0: COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_Test3 sl@0: COMMAND !Error=-25 RDir1 Read PBASE-F32-RDir-PublicApi-5011-001-Read_command009 sl@0: COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_EOF sl@0: COMMAND RDir1 Close sl@0: COMMAND TEntry1 ~ sl@0: COMMAND RDir1 ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-RDir-PublicApi-5011 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: //////////////////////////////////////////////////////////////////// sl@0: // sl@0: //OPEN sl@0: //Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) sl@0: // sl@0: //////////////////////////////////////////////////////////////////// sl@0: sl@0: START_TESTCASE PBASE-F32-RDir-PublicApi-5101 sl@0: //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5101 sl@0: //! @SYMAPI RDir sl@0: //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) negative test, that tries to open sl@0: //! a directory which not exist and using the NULL UIDs. sl@0: //! Uses API elements: Open(), Close(). sl@0: //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function. sl@0: //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType), sl@0: //! and RFs session as first parameter, and :\base\t_sfsrv\NotExist\ as second parameter, sl@0: //! and empty TUidType as third parameter. sl@0: //! 3.Call RDir::Close(). sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The Open() method call returns error -12 (KErrPathNotFound). sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RDir RDir1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RDir1 new sl@0: COMMAND !Error=-12 RDir1 Open PBASE-F32-RDir-PublicApi-5101-001-Open_command005 sl@0: COMMAND RDir1 Close sl@0: COMMAND RDir1 ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-RDir-PublicApi-5101 sl@0: sl@0: sl@0: START_TESTCASE PBASE-F32-RDir-PublicApi-5102 sl@0: //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5102 sl@0: //! @SYMAPI RDir sl@0: //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) negative test, that tries to open sl@0: //! a directory using the NULL UIDs when directory path is not correct. sl@0: //! Uses API elements: Open(), Close(). sl@0: //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function. sl@0: //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType), sl@0: //! and RFs session as first parameter, and :\base\t_sfsrv\\\\as second parameter, sl@0: //! and empty TUidType as third parameter. sl@0: //! 3.Call RDir::Close(). sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The Open() method call returns error -28 (KErrBadName). sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RDir RDir1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RDir1 new sl@0: COMMAND !Error=-28 RDir1 Open PBASE-F32-RDir-PublicApi-5102-001-Open_command005 sl@0: COMMAND RDir1 Close sl@0: COMMAND RDir1 ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: END_TESTCASE PBASE-F32-RDir-PublicApi-5102 sl@0: sl@0: sl@0: ////////////////////////////////////////////////////////// sl@0: // sl@0: //OPEN sl@0: //Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) sl@0: // sl@0: ////////////////////////////////////////////////////////// sl@0: sl@0: START_TESTCASE PBASE-F32-RDir-PublicApi-5103 sl@0: //! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5103 sl@0: //! @SYMAPI RDir sl@0: //! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) test, that tries to open a directory sl@0: //! when directory path is not correct. sl@0: //! Uses API elements: Open(), Close(). sl@0: //! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function. sl@0: //! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask), sl@0: //! and empty RFs session as first parameter, and :\base\t_sfsrv\\\\ as second parameter, sl@0: //! and KEntryAttNormal as third parameter. sl@0: //! 3.Call RDir::Close(). sl@0: //! @SYMTestStatus Implemented sl@0: //! @SYMTestPriority Critical sl@0: //! @SYMTestExpectedResults The Open() method call returns error -28 (KErrBadName). sl@0: //! @SYMTestType CIT sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT RDir RDir1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND RDir1 new sl@0: COMMAND !Error=-28 RDir1 Open PBASE-F32-RDir-PublicApi-5103-001-Open_command005 sl@0: COMMAND RDir1 Close sl@0: COMMAND RDir1 ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini sl@0: CREATE_OBJECT RFs RFs1 sl@0: CREATE_OBJECT CFileMan CFileMan1 sl@0: COMMAND RFs1 new sl@0: COMMAND RFs1 Connect sl@0: COMMAND CFileMan1 NewL PBASE-F32-RDir-PublicApi-NewL sl@0: COMMAND CFileMan1 Delete PBASE-F32-RDir-PublicApi-001-Delete sl@0: COMMAND RFs1 RmDir PBASE-F32-RDir-PublicApi-001-RmDir sl@0: COMMAND CFileMan1 ~ sl@0: COMMAND RFs1 ~ sl@0: END_TEST_BLOCK sl@0: sl@0: END_TESTCASE PBASE-F32-RDir-PublicApi-5103