os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-RDir-PublicApi-RAM.script
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 //
     2 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 // All rights reserved.
     4 // This component and the accompanying materials are made available
     5 // under the terms of "Eclipse Public License v1.0"
     6 // which accompanies this distribution, and is available
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 //
     9 // Initial Contributors:
    10 // Nokia Corporation - initial contribution.
    11 //
    12 // Contributors:
    13 //
    14 // Description: 
    15 //
    16 //! 	@file
    17 //! 	@SYMTestSuiteName		pbase-f32-sfsrv-publicapi-ram
    18 //!	@SYMScriptTestEnvironment	This test script requires a basic ROM.
    19 //! 	@SYMScriptAuthor 		Jaanus Randveer, Runno Sgirka
    20 //! 	@SYMScriptCreationDate		31/08/2007
    21 //! 	@SYMScriptDescription		The test script contains API tests for the following functions of RDir class:
    22 //!	TInt Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType)
    23 //!	TInt Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask)
    24 //!	void Close()
    25 //!	TInt Read(TEntryArray &anArray)
    26 //!	void Read(TEntryArray &anArray, TRequestStatus &aStatus)
    27 //!	TInt Read(TEntry &anEntry)
    28 //!	void Read(TPckg< TEntry > &anEntry, TRequestStatus &aStatus)	
    29 	
    30 
    31 LOAD_SUITE	T_SfSrv
    32 DELAY		5000
    33 
    34 
    35 START_TESTCASE			PBASE-F32-RDir-CopyFiles
    36 //! @SYMTestCaseID		PBASE-F32-RDir-CopyFiles
    37 //! @SYMAPI			CFileMan
    38 //! @SYMTestCaseDesc		SetupTestCase to test RDir Apis
    39 //! @SYMTestActions		1.Call Create a RFs session and call it's Connect() function.
    40 //!				2. Use CFileMan to copy the files on to relavent directories.
    41 //! @SYMTestStatus		Implemented
    42 //! @SYMTestPriority		Critical
    43 //! @SYMTestExpectedResults	The CFileMan::Copy() copies the testdata files properly on to specific directories.
    44 //! @SYMTestType		CIT
    45 	START_TEST_BLOCK	100		T_SfSrv	\base\PBASE-F32-RDir-PublicApi.ini
    46 		CREATE_OBJECT	RFs		RFs1
    47 		CREATE_OBJECT	CFileMan	CFileMan1
    48 		COMMAND         RFs1		new    
    49 		COMMAND         RFs1		Connect
    50 		COMMAND		CFileMan1	NewL		PBASE-F32-RDir-PublicApi-NewL
    51 		COMMAND		RFs1		MkDirAll	PBASE-F32-RDir-PublicApi-001-RamDiskPath
    52 		COMMAND		CFileMan1	Copy		PBASE-F32-RDir-PublicApi-001-Copy_Any
    53 		COMMAND		CFileMan1	Copy		PBASE-F32-RDir-PublicApi-001-Copy_Bigline
    54 		COMMAND		CFileMan1	Copy		PBASE-F32-RDir-PublicApi-001-Copy_FtEof
    55 		COMMAND		CFileMan1	Copy		PBASE-F32-RDir-PublicApi-001-Copy_FtRead
    56 		COMMAND		CFileMan1	Copy		PBASE-F32-RDir-PublicApi-001-Copy_MLine
    57 		COMMAND		CFileMan1	Copy		PBASE-F32-RDir-PublicApi-001-Copy_NewFile
    58 		COMMAND		CFileMan1	Copy		PBASE-F32-RDir-PublicApi-001-Copy_Oneliner
    59 		COMMAND		CFileMan1	Copy		PBASE-F32-RDir-PublicApi-001-Copy_Test1
    60 		COMMAND		CFileMan1	Copy		PBASE-F32-RDir-PublicApi-001-Copy_Test2
    61 		COMMAND		CFileMan1	Copy		PBASE-F32-RDir-PublicApi-001-Copy_Test3
    62 		COMMAND		CFileMan1	Copy		PBASE-F32-RDir-PublicApi-001-Copy_Test
    63 		COMMAND		CFileMan1	~
    64 		COMMAND		RFs1		~
    65 	END_TEST_BLOCK	
    66 END_TESTCASE			PBASE-F32-RDir-CopyFiles
    67 
    68 
    69 
    70 
    71 
    72 START_TESTCASE			PBASE-F32-RDir-PublicApi-5001
    73 //! @SYMTestCaseID		PBASE-F32-RDir-PublicApi-5001
    74 //! @SYMAPI			RDir
    75 //! @SYMTestCaseDesc		Function Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) and 
    76 //!				function Close() test, that opens a directory using the NULL UIDs.
    77 //! 				Uses API elements: Open(), Close().
    78 //! @SYMTestActions		1.Call Create a RFs session and call it's Connect() function.
    79 //!				2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType),
    80 //!				  and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ as second parameter, 
    81 //!				  and empty TUidType as third parameter.
    82 //!				3.Call RDir::Close().
    83 //! @SYMTestStatus		Implemented
    84 //! @SYMTestPriority		Critical
    85 //! @SYMTestExpectedResults	The Open() method call is completed returning KErrNone.
    86 //! @SYMTestType		CIT
    87 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-RDir-PublicApi.ini 
    88 		CREATE_OBJECT	RFs	RFs1
    89 		CREATE_OBJECT	RDir	RDir1
    90 		COMMAND		RFs1	new		
    91 		COMMAND		RFs1	Connect		
    92 		COMMAND		RDir1	new
    93 		COMMAND		RDir1	Open		PBASE-F32-RDir-PublicApi-5001-001-Open_command005
    94 		COMMAND		RDir1	Close
    95 		COMMAND		RDir1	~
    96 		COMMAND		RFs1	~		
    97 	END_TEST_BLOCK	
    98 END_TESTCASE			PBASE-F32-RDir-PublicApi-5001
    99 
   100 
   101 START_TESTCASE			PBASE-F32-RDir-PublicApi-5002
   102 //! @SYMTestCaseID		PBASE-F32-RDir-PublicApi-5002
   103 //! @SYMAPI			RDir
   104 //! @SYMTestCaseDesc		Function Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) test, that opens a directory using
   105 //!				an attribute bitmask to filter the directory entry types.
   106 //! 				Uses API elements: Open(), Close().
   107 //! @SYMTestActions		1.Call Create a RFs session and call it's Connect() function.
   108 //!				2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
   109 //!				  and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ as second parameter, 
   110 //!				  and KEntryAttNormal as third parameter.
   111 //!				3.Call RDir::Close().
   112 //! @SYMTestStatus		Implemented
   113 //! @SYMTestPriority		Critical
   114 //! @SYMTestExpectedResults	The Open() method call is completed returning KErrNone.
   115 //! @SYMTestType		CIT
   116 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-RDir-PublicApi.ini 
   117 		CREATE_OBJECT	RFs	RFs1
   118 		CREATE_OBJECT	RDir	RDir1
   119 		COMMAND		RFs1	new		
   120 		COMMAND		RFs1	Connect		
   121 		COMMAND		RDir1	new
   122 		COMMAND		RDir1	Open		PBASE-F32-RDir-PublicApi-5002-001-Open_command005
   123 		COMMAND		RDir1	Close
   124 		COMMAND		RDir1	~		
   125 		COMMAND		RFs1	~		
   126 	END_TEST_BLOCK	
   127 END_TESTCASE			PBASE-F32-RDir-PublicApi-5002
   128 
   129 
   130 START_TESTCASE			PBASE-F32-RDir-PublicApi-5003
   131 //! @SYMTestCaseID		PBASE-F32-RDir-PublicApi-5003
   132 //! @SYMAPI			RDir
   133 //! @SYMTestCaseDesc		Function Read(TEntryArray &anArray) test, that reads all filtered directory entries into the
   134 //!				specified array synchronously.
   135 //! 				Uses API elements: Open(), Read(), Close().
   136 //! @SYMTestActions		1.Call Create a RFs session and call it's Connect() function.
   137 //!				2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
   138 //!				  and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb, 
   139 //!				  any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt, 
   140 //!				  oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt, 
   141 //!				  Test3.txt, USBLOAD.ZIP) as second parameter, and KEntryAttNormal
   142 //!				  as third parameter.
   143 //!				3.Call RDir::Read(TEntryArray &anArray) to read all filtered directory entries into the
   144 //!				  specified array synchronously.
   145 //!				4.Call RDir::Close().
   146 //! @SYMTestStatus		Implemented
   147 //! @SYMTestPriority		Critical
   148 //! @SYMTestExpectedResults	The Read() method call is completed returning KErrEof.
   149 //! @SYMTestType		CIT
   150 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-RDir-PublicApi.ini 
   151 		CREATE_OBJECT		RFs		RFs1
   152 		CREATE_OBJECT		RDir		RDir1
   153 		CREATE_OBJECT		TEntryArray	TEntryArray1
   154 		CREATE_OBJECT		TEntry		TEntry1
   155 		COMMAND			RFs1		new		
   156 		COMMAND			RFs1		Connect
   157 		COMMAND			TEntryArray1	new		
   158 		COMMAND			RDir1		new
   159 		COMMAND			RDir1		Open		PBASE-F32-RDir-PublicApi-5003-001-Open_command005
   160 		COMMAND !Error=-25	RDir1		Read		PBASE-F32-RDir-PublicApi-5003-001-Read_command006
   161 		COMMAND			RDir1		Close
   162 		COMMAND			TEntry1		~
   163 		COMMAND			TEntryArray1	~
   164 		COMMAND			RDir1		~
   165 		COMMAND			RFs1		~
   166 	END_TEST_BLOCK	
   167 END_TESTCASE			PBASE-F32-RDir-PublicApi-5003
   168 
   169 
   170 START_TESTCASE			PBASE-F32-RDir-PublicApi-5004
   171 //! @SYMTestCaseID		PBASE-F32-RDir-PublicApi-5004
   172 //! @SYMAPI			RDir
   173 //! @SYMTestCaseDesc		Function Read(TEntryArray &anArray, TRequestStatus &aStatus) test, that reads all filtered directory
   174 //!				entries into the specified array asynchronously.
   175 //! 				Uses API elements: Open(), Read(), Close().
   176 //! @SYMTestActions		1.Call Create a RFs session and call it's Connect() function.
   177 //!				2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
   178 //!				  and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb, 
   179 //!				  any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt, 
   180 //!				  oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt, 
   181 //!				  Test3.txt, USBLOAD.ZIP) as second parameter, and KEntryAttNormal
   182 //!				  as third parameter.
   183 //!				3.Call RDir::Read(TEntryArray &anArray, TRequestStatus &aStatus) to read all filtered directory
   184 //!				  entries into the specified array asynchronously.
   185 //!				4.Call RDir::Close().
   186 //! @SYMTestStatus		Implemented
   187 //! @SYMTestPriority		Critical
   188 //! @SYMTestExpectedResults	The Read() method call is completed returning KErrEof.
   189 //! @SYMTestType		CIT
   190 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-RDir-PublicApi.ini 
   191 		CREATE_OBJECT		RFs		RFs1
   192 		CREATE_OBJECT		RDir		RDir1
   193 		CREATE_OBJECT		TEntryArray	TEntryArray1
   194 		CREATE_OBJECT		TEntry		TEntry1
   195 		COMMAND			RFs1		new		
   196 		COMMAND			RFs1		Connect	
   197 		COMMAND			TEntryArray1	new	
   198 		COMMAND			RDir1		new
   199 		COMMAND			RDir1		Open		PBASE-F32-RDir-PublicApi-5004-001-Open_command005
   200 		COMMAND !AsyncError=-25	RDir1		Read		PBASE-F32-RDir-PublicApi-5004-001-Read_command006
   201 		OUTSTANDING
   202 		COMMAND			RDir1		Close
   203 		COMMAND			TEntry1		~
   204 		COMMAND			TEntryArray1	~
   205 		COMMAND			RDir1		~
   206 		COMMAND			RFs1		~
   207 	END_TEST_BLOCK	
   208 END_TESTCASE			PBASE-F32-RDir-PublicApi-5004
   209 
   210 
   211 
   212 START_TESTCASE			PBASE-F32-RDir-PublicApi-5007
   213 //! @SYMTestCaseID		PBASE-F32-RDir-PublicApi-5007
   214 //! @SYMAPI			RDir
   215 //! @SYMTestCaseDesc		Function Read(TEntry &anEntry) test, that calls multiple iterations of Read() and checks the values returned.
   216 //! 				Uses API elements: Open(), Read(), Close().
   217 //! @SYMTestActions		1.Call Create a RFs session and call it's Connect() function.
   218 //!				2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
   219 //!				  and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb, 
   220 //!				  any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt, 
   221 //!				  oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt, 
   222 //!				  Test3.txt, USBLOAD.ZIP) as second parameter, and KEntryAttNormal
   223 //!				  as third parameter.
   224 //!				3.Call multiple RDir::Read(TEntry &anEntry) methods to read the contents of the entire directory.
   225 //!				4.Call RDir::Close().
   226 //! @SYMTestStatus		Implemented
   227 //! @SYMTestPriority		Critical
   228 //! @SYMTestExpectedResults	The first six Read() method calls are completed returning KErrNone, the last returns error -25 (KErrEof) as there
   229 //!				are no more entries. All verifications with expected values pass.
   230 //! @SYMTestType		CIT
   231 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-RDir-PublicApi.ini 
   232 		CREATE_OBJECT		RFs	RFs1
   233 		CREATE_OBJECT		RDir	RDir1
   234 		CREATE_OBJECT		TEntry	TEntry1
   235 		COMMAND			RFs1	new		
   236 		COMMAND			RFs1	Connect		
   237 		COMMAND			RDir1	new
   238 		COMMAND			RDir1	Open		PBASE-F32-RDir-PublicApi-5007-001-Open_command005
   239 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-5007-001-Read_command006
   240 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   241 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   242 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   243 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   244 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   245 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   246 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   247 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   248 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   249 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   250 		COMMAND	!Error=-25	RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   251 		COMMAND			RDir1	Close
   252 		COMMAND			TEntry1	~
   253 		COMMAND			RDir1	~		
   254 		COMMAND			RFs1	~		
   255 	END_TEST_BLOCK	
   256 END_TESTCASE			PBASE-F32-RDir-PublicApi-5007
   257 
   258 
   259 START_TESTCASE			PBASE-F32-RDir-PublicApi-5008
   260 //! @SYMTestCaseID		PBASE-F32-RDir-PublicApi-5008
   261 //! @SYMAPI			RDir
   262 //! @SYMTestCaseDesc		Function Read(TPckg<TEntry> &anEntry, TRequestStatus &aStatus) test, that calls multiple iterations of Read() and
   263 //!				checks the values returned.
   264 //! 				Uses API elements: Open(), Read(), Close().
   265 //! @SYMTestActions		1.Call Create a RFs session and call it's Connect() function.
   266 //!				2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
   267 //!				  and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb, 
   268 //!				  any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt, 
   269 //!				  oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt, 
   270 //!				  Test3.txt, USBLOAD.ZIP) as second parameter, and KEntryAttNormal
   271 //!				  as third parameter.
   272 //!				3.Call multiple RDir::Read(TPckg<TEntry> &anEntry, TRequestStatus &aStatus) methods to read the contents of the
   273 //!				  entire directory asynchronously.
   274 //!				4.Call RDir::Close().
   275 //! @SYMTestStatus		Implemented
   276 //! @SYMTestPriority		Critical
   277 //! @SYMTestExpectedResults	The first six Read() method calls are completed returning KErrNone, the last returns error -25 (KErrEof) as there
   278 //!				are no more entries. All verifications with expected values pass.
   279 //! @SYMTestType		CIT
   280 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-RDir-PublicApi.ini 
   281 		CREATE_OBJECT		RFs	RFs1
   282 		CREATE_OBJECT		RDir	RDir1
   283 		CREATE_OBJECT		TEntry	TEntry1
   284 		COMMAND			RFs1	new		
   285 		COMMAND			RFs1	Connect		
   286 		COMMAND			RDir1	new
   287 		COMMAND			RDir1	Open	PBASE-F32-RDir-PublicApi-5008-001-Open_command005
   288 		COMMAND			RDir1	Read	PBASE-F32-RDir-PublicApi-5008-001-Read_command006
   289 		OUTSTANDING
   290 		COMMAND			RDir1	Read	PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
   291 		OUTSTANDING
   292 		COMMAND			RDir1	Read	PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
   293 		OUTSTANDING
   294 		COMMAND			RDir1	Read	PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
   295 		OUTSTANDING
   296 		COMMAND			RDir1	Read	PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
   297 		OUTSTANDING
   298 		COMMAND			RDir1	Read	PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
   299 		OUTSTANDING
   300 		COMMAND			RDir1	Read	PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
   301 		OUTSTANDING
   302 		COMMAND			RDir1	Read	PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
   303 		OUTSTANDING
   304 		COMMAND			RDir1	Read	PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
   305 		OUTSTANDING
   306 		COMMAND			RDir1	Read	PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
   307 		OUTSTANDING
   308 		COMMAND			RDir1	Read	PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
   309 		OUTSTANDING
   310 		COMMAND	!AsyncError=-25	RDir1	Read	PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
   311 		OUTSTANDING
   312 		COMMAND			RDir1	Close
   313 		COMMAND			TEntry1	~
   314 		COMMAND			RDir1	~		
   315 		COMMAND			RFs1	~		
   316 	END_TEST_BLOCK	
   317 END_TESTCASE			PBASE-F32-RDir-PublicApi-5008
   318 
   319 
   320 START_TESTCASE			PBASE-F32-RDir-PublicApi-5009
   321 //! @SYMTestCaseID		PBASE-F32-RDir-PublicApi-5009
   322 //! @SYMAPI			RDir
   323 //! @SYMTestCaseDesc		Function Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) test, that checks that Open() makes it
   324 //!				possible to filter entries by attributes.
   325 //! 				Uses API elements: Open(), Read(), Close().
   326 //! @SYMTestActions		1.Call Create a RFs session and call it's Connect() function.
   327 //!				2.Call RFs::setAtt, to set some attributes of the files in <DRIVE>:\base\t_sfsrv\.
   328 //!				3.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
   329 //!				  and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb, 
   330 //!				  any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt, 
   331 //!				  oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt, 
   332 //!				  Test3.txt, USBLOAD.ZIP) as second parameter, and
   333 //!				  KEntryAttReadOnly|KEntryAttMatchExclusive as third parameter.
   334 //!				4.Call multiple RDir::Read(TEntry &anEntry) methods to read the contents of the entire directory.
   335 //!				5.Set previously set attributes back to normal.
   336 //!				6.Call RDir::Close().
   337 //! @SYMTestStatus		Implemented
   338 //! @SYMTestPriority		Critical
   339 //! @SYMTestExpectedResults	The first two Read() method calls are completed returning KErrNone, the last returns error -25 (KErrEof) as there
   340 //!				are no more entries (only two read-only files - Test2.txt and USBLOAD.ZIP). All verifications with expected values
   341 //!				pass.
   342 //! @SYMTestType		CIT
   343 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-RDir-PublicApi.ini 
   344 		CREATE_OBJECT		RFs	RFs1
   345 		CREATE_OBJECT		RDir	RDir1
   346 		CREATE_OBJECT		TEntry	TEntry1
   347 		COMMAND			RFs1	new		
   348 		COMMAND			RFs1	Connect	
   349 		COMMAND			RFs1	SetAtt		PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command005
   350 		COMMAND			RFs1	SetAtt		PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command006
   351 		COMMAND			RFs1	SetAtt		PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command008
   352 		COMMAND			RFs1	SetAtt		PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command009
   353 		COMMAND			RFs1	SetAtt		PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command010
   354 		COMMAND			RFs1	SetAtt		PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command011
   355 		COMMAND			RFs1	SetAtt		PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command012
   356 		COMMAND			RFs1	SetAtt		PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command013
   357 		COMMAND			RFs1	SetAtt		PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command014
   358 		COMMAND			RFs1	SetAtt		PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command016
   359 		COMMAND			RFs1	SetAtt		PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command020
   360 		COMMAND			RFs1	SetAtt		PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command021
   361 		COMMAND			RFs1	SetAtt		PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command015
   362 		COMMAND			RDir1	new
   363 		COMMAND			RDir1	Open		PBASE-F32-RDir-PublicApi-5009-001-Open_command013
   364 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-5009-001-Read_command014
   365 		COMMAND			TEntry1	=		PBASE-F32-RDir-PublicApi-global-001-assign_Test1
   366 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-5009-001-Read_command015
   367 		COMMAND			TEntry1	=		PBASE-F32-RDir-PublicApi-global-001-assign_Test3
   368 		COMMAND	!Error=-25	RDir1	Read		PBASE-F32-RDir-PublicApi-5009-001-Read_command016
   369 		COMMAND			TEntry1	=		PBASE-F32-RDir-PublicApi-global-001-assign_EOF
   370 		COMMAND			RFs1	SetAtt		PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command017
   371 		COMMAND			RFs1	SetAtt		PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command019
   372 		COMMAND			RDir1	Close	
   373 		COMMAND			TEntry1	~
   374 		COMMAND			RDir1	~		
   375 		COMMAND			RFs1	~		
   376 	END_TEST_BLOCK	
   377 END_TESTCASE			PBASE-F32-RDir-PublicApi-5009
   378 
   379 
   380 START_TESTCASE			PBASE-F32-RDir-PublicApi-5010
   381 //! @SYMTestCaseID		PBASE-F32-RDir-PublicApi-5010
   382 //! @SYMAPI			RDir
   383 //! @SYMTestCaseDesc		Function Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) test, that checks that Open() works fine
   384 //!				with * wildcard.
   385 //! 				Uses API elements: Open(), Read(), Close().
   386 //! @SYMTestActions		1.Call Create a RFs session and call it's Connect() function.
   387 //!				2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType),
   388 //!				  and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb, 
   389 //!				  any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt, 
   390 //!				  oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt, 
   391 //!				  Test3.txt, USBLOAD.ZIP) as second parameter, and empty TUidType as
   392 //!				  third parameter.
   393 //!				3.Call RDir::Read(TEntry &anEntry) to read a single directory entry synchronously.
   394 //!				4.Call RDir::Close().
   395 //! @SYMTestStatus		Implemented
   396 //! @SYMTestPriority		Critical
   397 //! @SYMTestExpectedResults	The Open() method call is completed returning KErrNone. The last Read() method call returns KErrEof as there are 
   398 //!				only 5 *.txt files (test.txt, Test1.txt, Test2.txt, Test3.txt, test_rom.txt). All other verifications pass.
   399 //! @SYMTestType		CIT
   400 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-RDir-PublicApi.ini 
   401 		CREATE_OBJECT		RFs	RFs1
   402 		CREATE_OBJECT		RDir	RDir1
   403 		CREATE_OBJECT		TEntry	TEntry1
   404 		COMMAND			RFs1	new		
   405 		COMMAND			RFs1	Connect		
   406 		COMMAND			RDir1	new
   407 		COMMAND			RDir1	Open		PBASE-F32-RDir-PublicApi-5010-001-Open_command005
   408 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-5010-001-Read_command007
   409 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   410 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   411 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   412 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   413 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   414 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   415 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   416 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   417 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   418 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   419 		COMMAND	!Error=-25	RDir1	Read		PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
   420 		COMMAND			RDir1	Close
   421 		COMMAND			TEntry1	~
   422 		COMMAND			RDir1	~
   423 		COMMAND			RFs1	~		
   424 	END_TEST_BLOCK	
   425 END_TESTCASE			PBASE-F32-RDir-PublicApi-5010
   426 
   427 
   428 START_TESTCASE			PBASE-F32-RDir-PublicApi-5011
   429 //! @SYMTestCaseID		PBASE-F32-RDir-PublicApi-5011
   430 //! @SYMAPI			RDir
   431 //! @SYMTestCaseDesc		Function Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) test, that checks that Open() works fine
   432 //!				with ? wildcard.
   433 //! 				Uses API elements: Open(), Read(), Close().
   434 //! @SYMTestActions		1.Call Create a RFs session and call it's Connect() function.
   435 //!				2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
   436 //!				  and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb, 
   437 //!				  any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt, 
   438 //!				  oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt, 
   439 //!				  Test3.txt, USBLOAD.ZIP) as second parameter, and 
   440 //!				  KEntryAttNormal as third parameter.
   441 //!				3.Call RDir::Read(TEntry &anEntry) to read a single directory entry synchronously.
   442 //!				4.Call RDir::Close().
   443 //! @SYMTestStatus		Implemented
   444 //! @SYMTestPriority		Critical
   445 //! @SYMTestExpectedResults	The Open() method call is completed returning KErrNone. The last Read() method call returns KErrEof as there are 
   446 //!				only 3 Test?.txt files (Test1.txt, Test2.txt, Test3.txt). All other verifications pass.
   447 //! @SYMTestType		CIT
   448 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-RDir-PublicApi.ini 
   449 		CREATE_OBJECT		RFs	RFs1
   450 		CREATE_OBJECT		RDir	RDir1
   451 		CREATE_OBJECT		TEntry	TEntry1
   452 		COMMAND			RFs1	new		
   453 		COMMAND			RFs1	Connect		
   454 		COMMAND			RDir1	new
   455 		COMMAND			RDir1	Open		PBASE-F32-RDir-PublicApi-5011-001-Open_command005
   456 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-5011-001-Read_command006
   457 		COMMAND			TEntry1	=		PBASE-F32-RDir-PublicApi-global-001-assign_Test1
   458 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-5011-001-Read_command006
   459 		COMMAND			TEntry1	=		PBASE-F32-RDir-PublicApi-global-001-assign_Test2
   460 		COMMAND			RDir1	Read		PBASE-F32-RDir-PublicApi-5011-001-Read_command008
   461 		COMMAND			TEntry1	=		PBASE-F32-RDir-PublicApi-global-001-assign_Test3
   462 		COMMAND	!Error=-25	RDir1	Read		PBASE-F32-RDir-PublicApi-5011-001-Read_command009
   463 		COMMAND			TEntry1	=		PBASE-F32-RDir-PublicApi-global-001-assign_EOF
   464 		COMMAND			RDir1	Close
   465 		COMMAND			TEntry1	~
   466 		COMMAND			RDir1	~		
   467 		COMMAND			RFs1	~		
   468 	END_TEST_BLOCK	
   469 END_TESTCASE			PBASE-F32-RDir-PublicApi-5011
   470 
   471 
   472 //////////////////////////////////////////////////////////////////////
   473 //////////////////////////////////////////////////////////////////////
   474 //////								//////
   475 //////		 ///////////////////////////////////		//////
   476 //////		 ///				 ///		//////
   477 //////		 ///	  NEGATIVE TESTS	 ///		//////
   478 //////		 ///				 ///		//////	
   479 //////		 ///////////////////////////////////		//////
   480 //////								//////
   481 //////////////////////////////////////////////////////////////////////
   482 //////////////////////////////////////////////////////////////////////
   483 
   484 
   485 ////////////////////////////////////////////////////////////////////
   486 //
   487 //OPEN
   488 //Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType)
   489 //
   490 ////////////////////////////////////////////////////////////////////
   491 
   492 START_TESTCASE			PBASE-F32-RDir-PublicApi-5101
   493 //! @SYMTestCaseID		PBASE-F32-RDir-PublicApi-5101
   494 //! @SYMAPI			RDir
   495 //! @SYMTestCaseDesc		Function Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) negative test, that tries to open
   496 //!				a directory which not exist and using the NULL UIDs.
   497 //! 				Uses API elements: Open(), Close().
   498 //! @SYMTestActions		1.Call Create a RFs session and call it's Connect() function.
   499 //!				2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType),
   500 //!				  and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\NotExist\ as second parameter, 
   501 //!				  and empty TUidType as third parameter. 
   502 //!				3.Call RDir::Close().
   503 //! @SYMTestStatus		Implemented
   504 //! @SYMTestPriority		Critical
   505 //! @SYMTestExpectedResults	The Open() method call returns error -12 (KErrPathNotFound).
   506 //! @SYMTestType		CIT
   507 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-RDir-PublicApi.ini 
   508 		CREATE_OBJECT		RFs	RFs1
   509 		CREATE_OBJECT		RDir	RDir1
   510 		COMMAND			RFs1	new		
   511 		COMMAND			RFs1	Connect		
   512 		COMMAND			RDir1	new
   513 		COMMAND	!Error=-12	RDir1	Open		PBASE-F32-RDir-PublicApi-5101-001-Open_command005
   514 		COMMAND			RDir1	Close
   515 		COMMAND			RDir1	~		
   516 		COMMAND			RFs1	~		
   517 	END_TEST_BLOCK	
   518 END_TESTCASE			PBASE-F32-RDir-PublicApi-5101
   519 
   520 
   521 START_TESTCASE			PBASE-F32-RDir-PublicApi-5102
   522 //! @SYMTestCaseID		PBASE-F32-RDir-PublicApi-5102
   523 //! @SYMAPI			RDir
   524 //! @SYMTestCaseDesc		Function Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) negative test, that tries to open
   525 //!				a directory using the NULL UIDs when directory path is not correct.
   526 //! 				Uses API elements: Open(), Close().
   527 //! @SYMTestActions		1.Call Create a RFs session and call it's Connect() function.
   528 //!				2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType),
   529 //!				  and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\\\\as second parameter, 
   530 //!				  and empty TUidType as third parameter.
   531 //!				3.Call RDir::Close(). 
   532 //! @SYMTestStatus		Implemented
   533 //! @SYMTestPriority		Critical
   534 //! @SYMTestExpectedResults	The Open() method call returns error -28 (KErrBadName).
   535 //! @SYMTestType		CIT
   536 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-RDir-PublicApi.ini 
   537 		CREATE_OBJECT		RFs	RFs1
   538 		CREATE_OBJECT		RDir	RDir1
   539 		COMMAND			RFs1	new		
   540 		COMMAND			RFs1	Connect		
   541 		COMMAND			RDir1	new
   542 		COMMAND	!Error=-28	RDir1	Open		PBASE-F32-RDir-PublicApi-5102-001-Open_command005
   543 		COMMAND			RDir1	Close
   544 		COMMAND			RDir1	~		
   545 		COMMAND			RFs1	~		
   546 	END_TEST_BLOCK	
   547 END_TESTCASE			PBASE-F32-RDir-PublicApi-5102
   548 
   549 
   550 //////////////////////////////////////////////////////////
   551 //
   552 //OPEN
   553 //Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask)
   554 //
   555 //////////////////////////////////////////////////////////
   556 
   557 START_TESTCASE			PBASE-F32-RDir-PublicApi-5103
   558 //! @SYMTestCaseID		PBASE-F32-RDir-PublicApi-5103
   559 //! @SYMAPI			RDir
   560 //! @SYMTestCaseDesc		Function Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) test, that tries to open a directory
   561 //!				when directory path is not correct.
   562 //! 				Uses API elements: Open(), Close().
   563 //! @SYMTestActions		1.Call Create a RFs session and call it's Connect() function.
   564 //!				2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
   565 //!				  and empty RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\\\\ as second parameter, 
   566 //!				  and KEntryAttNormal as third parameter.
   567 //!				3.Call RDir::Close().
   568 //! @SYMTestStatus		Implemented
   569 //! @SYMTestPriority		Critical
   570 //! @SYMTestExpectedResults	The Open() method call returns error -28 (KErrBadName).
   571 //! @SYMTestType		CIT
   572 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-RDir-PublicApi.ini 
   573 		CREATE_OBJECT		RFs	RFs1
   574 		CREATE_OBJECT		RDir	RDir1
   575 		COMMAND			RFs1	new		
   576 		COMMAND			RFs1	Connect		
   577 		COMMAND			RDir1	new
   578 		COMMAND !Error=-28	RDir1	Open		PBASE-F32-RDir-PublicApi-5103-001-Open_command005
   579 		COMMAND			RDir1	Close
   580 		COMMAND			RDir1	~		
   581 		COMMAND			RFs1	~		
   582 	END_TEST_BLOCK
   583 START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-RDir-PublicApi.ini
   584    		CREATE_OBJECT		RFs		RFs1
   585 		CREATE_OBJECT		CFileMan	CFileMan1
   586    		COMMAND			RFs1		new		
   587    		COMMAND			RFs1		Connect
   588 		COMMAND			CFileMan1	NewL		PBASE-F32-RDir-PublicApi-NewL
   589 		COMMAND			CFileMan1	Delete		PBASE-F32-RDir-PublicApi-001-Delete
   590 		COMMAND			RFs1		RmDir		PBASE-F32-RDir-PublicApi-001-RmDir
   591 		COMMAND			CFileMan1	~
   592    		COMMAND			RFs1		~		
   593 END_TEST_BLOCK
   594 
   595 END_TESTCASE			PBASE-F32-RDir-PublicApi-5103