os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-RDir-PublicApi-RAM.script
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-RDir-PublicApi-RAM.script Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,595 @@
1.4 +//
1.5 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of "Eclipse Public License v1.0"
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +//! @file
1.20 +//! @SYMTestSuiteName pbase-f32-sfsrv-publicapi-ram
1.21 +//! @SYMScriptTestEnvironment This test script requires a basic ROM.
1.22 +//! @SYMScriptAuthor Jaanus Randveer, Runno Sgirka
1.23 +//! @SYMScriptCreationDate 31/08/2007
1.24 +//! @SYMScriptDescription The test script contains API tests for the following functions of RDir class:
1.25 +//! TInt Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType)
1.26 +//! TInt Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask)
1.27 +//! void Close()
1.28 +//! TInt Read(TEntryArray &anArray)
1.29 +//! void Read(TEntryArray &anArray, TRequestStatus &aStatus)
1.30 +//! TInt Read(TEntry &anEntry)
1.31 +//! void Read(TPckg< TEntry > &anEntry, TRequestStatus &aStatus)
1.32 +
1.33 +
1.34 +LOAD_SUITE T_SfSrv
1.35 +DELAY 5000
1.36 +
1.37 +
1.38 +START_TESTCASE PBASE-F32-RDir-CopyFiles
1.39 +//! @SYMTestCaseID PBASE-F32-RDir-CopyFiles
1.40 +//! @SYMAPI CFileMan
1.41 +//! @SYMTestCaseDesc SetupTestCase to test RDir Apis
1.42 +//! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
1.43 +//! 2. Use CFileMan to copy the files on to relavent directories.
1.44 +//! @SYMTestStatus Implemented
1.45 +//! @SYMTestPriority Critical
1.46 +//! @SYMTestExpectedResults The CFileMan::Copy() copies the testdata files properly on to specific directories.
1.47 +//! @SYMTestType CIT
1.48 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
1.49 + CREATE_OBJECT RFs RFs1
1.50 + CREATE_OBJECT CFileMan CFileMan1
1.51 + COMMAND RFs1 new
1.52 + COMMAND RFs1 Connect
1.53 + COMMAND CFileMan1 NewL PBASE-F32-RDir-PublicApi-NewL
1.54 + COMMAND RFs1 MkDirAll PBASE-F32-RDir-PublicApi-001-RamDiskPath
1.55 + COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Any
1.56 + COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Bigline
1.57 + COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_FtEof
1.58 + COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_FtRead
1.59 + COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_MLine
1.60 + COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_NewFile
1.61 + COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Oneliner
1.62 + COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Test1
1.63 + COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Test2
1.64 + COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Test3
1.65 + COMMAND CFileMan1 Copy PBASE-F32-RDir-PublicApi-001-Copy_Test
1.66 + COMMAND CFileMan1 ~
1.67 + COMMAND RFs1 ~
1.68 + END_TEST_BLOCK
1.69 +END_TESTCASE PBASE-F32-RDir-CopyFiles
1.70 +
1.71 +
1.72 +
1.73 +
1.74 +
1.75 +START_TESTCASE PBASE-F32-RDir-PublicApi-5001
1.76 +//! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5001
1.77 +//! @SYMAPI RDir
1.78 +//! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) and
1.79 +//! function Close() test, that opens a directory using the NULL UIDs.
1.80 +//! Uses API elements: Open(), Close().
1.81 +//! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
1.82 +//! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType),
1.83 +//! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ as second parameter,
1.84 +//! and empty TUidType as third parameter.
1.85 +//! 3.Call RDir::Close().
1.86 +//! @SYMTestStatus Implemented
1.87 +//! @SYMTestPriority Critical
1.88 +//! @SYMTestExpectedResults The Open() method call is completed returning KErrNone.
1.89 +//! @SYMTestType CIT
1.90 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
1.91 + CREATE_OBJECT RFs RFs1
1.92 + CREATE_OBJECT RDir RDir1
1.93 + COMMAND RFs1 new
1.94 + COMMAND RFs1 Connect
1.95 + COMMAND RDir1 new
1.96 + COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5001-001-Open_command005
1.97 + COMMAND RDir1 Close
1.98 + COMMAND RDir1 ~
1.99 + COMMAND RFs1 ~
1.100 + END_TEST_BLOCK
1.101 +END_TESTCASE PBASE-F32-RDir-PublicApi-5001
1.102 +
1.103 +
1.104 +START_TESTCASE PBASE-F32-RDir-PublicApi-5002
1.105 +//! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5002
1.106 +//! @SYMAPI RDir
1.107 +//! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) test, that opens a directory using
1.108 +//! an attribute bitmask to filter the directory entry types.
1.109 +//! Uses API elements: Open(), Close().
1.110 +//! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
1.111 +//! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
1.112 +//! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ as second parameter,
1.113 +//! and KEntryAttNormal as third parameter.
1.114 +//! 3.Call RDir::Close().
1.115 +//! @SYMTestStatus Implemented
1.116 +//! @SYMTestPriority Critical
1.117 +//! @SYMTestExpectedResults The Open() method call is completed returning KErrNone.
1.118 +//! @SYMTestType CIT
1.119 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
1.120 + CREATE_OBJECT RFs RFs1
1.121 + CREATE_OBJECT RDir RDir1
1.122 + COMMAND RFs1 new
1.123 + COMMAND RFs1 Connect
1.124 + COMMAND RDir1 new
1.125 + COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5002-001-Open_command005
1.126 + COMMAND RDir1 Close
1.127 + COMMAND RDir1 ~
1.128 + COMMAND RFs1 ~
1.129 + END_TEST_BLOCK
1.130 +END_TESTCASE PBASE-F32-RDir-PublicApi-5002
1.131 +
1.132 +
1.133 +START_TESTCASE PBASE-F32-RDir-PublicApi-5003
1.134 +//! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5003
1.135 +//! @SYMAPI RDir
1.136 +//! @SYMTestCaseDesc Function Read(TEntryArray &anArray) test, that reads all filtered directory entries into the
1.137 +//! specified array synchronously.
1.138 +//! Uses API elements: Open(), Read(), Close().
1.139 +//! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
1.140 +//! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
1.141 +//! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb,
1.142 +//! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt,
1.143 +//! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt,
1.144 +//! Test3.txt, USBLOAD.ZIP) as second parameter, and KEntryAttNormal
1.145 +//! as third parameter.
1.146 +//! 3.Call RDir::Read(TEntryArray &anArray) to read all filtered directory entries into the
1.147 +//! specified array synchronously.
1.148 +//! 4.Call RDir::Close().
1.149 +//! @SYMTestStatus Implemented
1.150 +//! @SYMTestPriority Critical
1.151 +//! @SYMTestExpectedResults The Read() method call is completed returning KErrEof.
1.152 +//! @SYMTestType CIT
1.153 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
1.154 + CREATE_OBJECT RFs RFs1
1.155 + CREATE_OBJECT RDir RDir1
1.156 + CREATE_OBJECT TEntryArray TEntryArray1
1.157 + CREATE_OBJECT TEntry TEntry1
1.158 + COMMAND RFs1 new
1.159 + COMMAND RFs1 Connect
1.160 + COMMAND TEntryArray1 new
1.161 + COMMAND RDir1 new
1.162 + COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5003-001-Open_command005
1.163 + COMMAND !Error=-25 RDir1 Read PBASE-F32-RDir-PublicApi-5003-001-Read_command006
1.164 + COMMAND RDir1 Close
1.165 + COMMAND TEntry1 ~
1.166 + COMMAND TEntryArray1 ~
1.167 + COMMAND RDir1 ~
1.168 + COMMAND RFs1 ~
1.169 + END_TEST_BLOCK
1.170 +END_TESTCASE PBASE-F32-RDir-PublicApi-5003
1.171 +
1.172 +
1.173 +START_TESTCASE PBASE-F32-RDir-PublicApi-5004
1.174 +//! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5004
1.175 +//! @SYMAPI RDir
1.176 +//! @SYMTestCaseDesc Function Read(TEntryArray &anArray, TRequestStatus &aStatus) test, that reads all filtered directory
1.177 +//! entries into the specified array asynchronously.
1.178 +//! Uses API elements: Open(), Read(), Close().
1.179 +//! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
1.180 +//! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
1.181 +//! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb,
1.182 +//! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt,
1.183 +//! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt,
1.184 +//! Test3.txt, USBLOAD.ZIP) as second parameter, and KEntryAttNormal
1.185 +//! as third parameter.
1.186 +//! 3.Call RDir::Read(TEntryArray &anArray, TRequestStatus &aStatus) to read all filtered directory
1.187 +//! entries into the specified array asynchronously.
1.188 +//! 4.Call RDir::Close().
1.189 +//! @SYMTestStatus Implemented
1.190 +//! @SYMTestPriority Critical
1.191 +//! @SYMTestExpectedResults The Read() method call is completed returning KErrEof.
1.192 +//! @SYMTestType CIT
1.193 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
1.194 + CREATE_OBJECT RFs RFs1
1.195 + CREATE_OBJECT RDir RDir1
1.196 + CREATE_OBJECT TEntryArray TEntryArray1
1.197 + CREATE_OBJECT TEntry TEntry1
1.198 + COMMAND RFs1 new
1.199 + COMMAND RFs1 Connect
1.200 + COMMAND TEntryArray1 new
1.201 + COMMAND RDir1 new
1.202 + COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5004-001-Open_command005
1.203 + COMMAND !AsyncError=-25 RDir1 Read PBASE-F32-RDir-PublicApi-5004-001-Read_command006
1.204 + OUTSTANDING
1.205 + COMMAND RDir1 Close
1.206 + COMMAND TEntry1 ~
1.207 + COMMAND TEntryArray1 ~
1.208 + COMMAND RDir1 ~
1.209 + COMMAND RFs1 ~
1.210 + END_TEST_BLOCK
1.211 +END_TESTCASE PBASE-F32-RDir-PublicApi-5004
1.212 +
1.213 +
1.214 +
1.215 +START_TESTCASE PBASE-F32-RDir-PublicApi-5007
1.216 +//! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5007
1.217 +//! @SYMAPI RDir
1.218 +//! @SYMTestCaseDesc Function Read(TEntry &anEntry) test, that calls multiple iterations of Read() and checks the values returned.
1.219 +//! Uses API elements: Open(), Read(), Close().
1.220 +//! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
1.221 +//! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
1.222 +//! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb,
1.223 +//! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt,
1.224 +//! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt,
1.225 +//! Test3.txt, USBLOAD.ZIP) as second parameter, and KEntryAttNormal
1.226 +//! as third parameter.
1.227 +//! 3.Call multiple RDir::Read(TEntry &anEntry) methods to read the contents of the entire directory.
1.228 +//! 4.Call RDir::Close().
1.229 +//! @SYMTestStatus Implemented
1.230 +//! @SYMTestPriority Critical
1.231 +//! @SYMTestExpectedResults The first six Read() method calls are completed returning KErrNone, the last returns error -25 (KErrEof) as there
1.232 +//! are no more entries. All verifications with expected values pass.
1.233 +//! @SYMTestType CIT
1.234 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
1.235 + CREATE_OBJECT RFs RFs1
1.236 + CREATE_OBJECT RDir RDir1
1.237 + CREATE_OBJECT TEntry TEntry1
1.238 + COMMAND RFs1 new
1.239 + COMMAND RFs1 Connect
1.240 + COMMAND RDir1 new
1.241 + COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5007-001-Open_command005
1.242 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5007-001-Read_command006
1.243 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.244 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.245 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.246 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.247 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.248 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.249 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.250 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.251 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.252 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.253 + COMMAND !Error=-25 RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.254 + COMMAND RDir1 Close
1.255 + COMMAND TEntry1 ~
1.256 + COMMAND RDir1 ~
1.257 + COMMAND RFs1 ~
1.258 + END_TEST_BLOCK
1.259 +END_TESTCASE PBASE-F32-RDir-PublicApi-5007
1.260 +
1.261 +
1.262 +START_TESTCASE PBASE-F32-RDir-PublicApi-5008
1.263 +//! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5008
1.264 +//! @SYMAPI RDir
1.265 +//! @SYMTestCaseDesc Function Read(TPckg<TEntry> &anEntry, TRequestStatus &aStatus) test, that calls multiple iterations of Read() and
1.266 +//! checks the values returned.
1.267 +//! Uses API elements: Open(), Read(), Close().
1.268 +//! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
1.269 +//! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
1.270 +//! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb,
1.271 +//! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt,
1.272 +//! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt,
1.273 +//! Test3.txt, USBLOAD.ZIP) as second parameter, and KEntryAttNormal
1.274 +//! as third parameter.
1.275 +//! 3.Call multiple RDir::Read(TPckg<TEntry> &anEntry, TRequestStatus &aStatus) methods to read the contents of the
1.276 +//! entire directory asynchronously.
1.277 +//! 4.Call RDir::Close().
1.278 +//! @SYMTestStatus Implemented
1.279 +//! @SYMTestPriority Critical
1.280 +//! @SYMTestExpectedResults The first six Read() method calls are completed returning KErrNone, the last returns error -25 (KErrEof) as there
1.281 +//! are no more entries. All verifications with expected values pass.
1.282 +//! @SYMTestType CIT
1.283 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
1.284 + CREATE_OBJECT RFs RFs1
1.285 + CREATE_OBJECT RDir RDir1
1.286 + CREATE_OBJECT TEntry TEntry1
1.287 + COMMAND RFs1 new
1.288 + COMMAND RFs1 Connect
1.289 + COMMAND RDir1 new
1.290 + COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5008-001-Open_command005
1.291 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5008-001-Read_command006
1.292 + OUTSTANDING
1.293 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
1.294 + OUTSTANDING
1.295 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
1.296 + OUTSTANDING
1.297 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
1.298 + OUTSTANDING
1.299 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
1.300 + OUTSTANDING
1.301 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
1.302 + OUTSTANDING
1.303 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
1.304 + OUTSTANDING
1.305 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
1.306 + OUTSTANDING
1.307 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
1.308 + OUTSTANDING
1.309 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
1.310 + OUTSTANDING
1.311 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
1.312 + OUTSTANDING
1.313 + COMMAND !AsyncError=-25 RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_async
1.314 + OUTSTANDING
1.315 + COMMAND RDir1 Close
1.316 + COMMAND TEntry1 ~
1.317 + COMMAND RDir1 ~
1.318 + COMMAND RFs1 ~
1.319 + END_TEST_BLOCK
1.320 +END_TESTCASE PBASE-F32-RDir-PublicApi-5008
1.321 +
1.322 +
1.323 +START_TESTCASE PBASE-F32-RDir-PublicApi-5009
1.324 +//! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5009
1.325 +//! @SYMAPI RDir
1.326 +//! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) test, that checks that Open() makes it
1.327 +//! possible to filter entries by attributes.
1.328 +//! Uses API elements: Open(), Read(), Close().
1.329 +//! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
1.330 +//! 2.Call RFs::setAtt, to set some attributes of the files in <DRIVE>:\base\t_sfsrv\.
1.331 +//! 3.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
1.332 +//! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb,
1.333 +//! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt,
1.334 +//! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt,
1.335 +//! Test3.txt, USBLOAD.ZIP) as second parameter, and
1.336 +//! KEntryAttReadOnly|KEntryAttMatchExclusive as third parameter.
1.337 +//! 4.Call multiple RDir::Read(TEntry &anEntry) methods to read the contents of the entire directory.
1.338 +//! 5.Set previously set attributes back to normal.
1.339 +//! 6.Call RDir::Close().
1.340 +//! @SYMTestStatus Implemented
1.341 +//! @SYMTestPriority Critical
1.342 +//! @SYMTestExpectedResults The first two Read() method calls are completed returning KErrNone, the last returns error -25 (KErrEof) as there
1.343 +//! are no more entries (only two read-only files - Test2.txt and USBLOAD.ZIP). All verifications with expected values
1.344 +//! pass.
1.345 +//! @SYMTestType CIT
1.346 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
1.347 + CREATE_OBJECT RFs RFs1
1.348 + CREATE_OBJECT RDir RDir1
1.349 + CREATE_OBJECT TEntry TEntry1
1.350 + COMMAND RFs1 new
1.351 + COMMAND RFs1 Connect
1.352 + COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command005
1.353 + COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command006
1.354 + COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command008
1.355 + COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command009
1.356 + COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command010
1.357 + COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command011
1.358 + COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command012
1.359 + COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command013
1.360 + COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command014
1.361 + COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command016
1.362 + COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command020
1.363 + COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command021
1.364 + COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command015
1.365 + COMMAND RDir1 new
1.366 + COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5009-001-Open_command013
1.367 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5009-001-Read_command014
1.368 + COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_Test1
1.369 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5009-001-Read_command015
1.370 + COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_Test3
1.371 + COMMAND !Error=-25 RDir1 Read PBASE-F32-RDir-PublicApi-5009-001-Read_command016
1.372 + COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_EOF
1.373 + COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command017
1.374 + COMMAND RFs1 SetAtt PBASE-F32-RDir-PublicApi-5009-001-SetAtt_command019
1.375 + COMMAND RDir1 Close
1.376 + COMMAND TEntry1 ~
1.377 + COMMAND RDir1 ~
1.378 + COMMAND RFs1 ~
1.379 + END_TEST_BLOCK
1.380 +END_TESTCASE PBASE-F32-RDir-PublicApi-5009
1.381 +
1.382 +
1.383 +START_TESTCASE PBASE-F32-RDir-PublicApi-5010
1.384 +//! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5010
1.385 +//! @SYMAPI RDir
1.386 +//! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) test, that checks that Open() works fine
1.387 +//! with * wildcard.
1.388 +//! Uses API elements: Open(), Read(), Close().
1.389 +//! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
1.390 +//! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType),
1.391 +//! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb,
1.392 +//! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt,
1.393 +//! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt,
1.394 +//! Test3.txt, USBLOAD.ZIP) as second parameter, and empty TUidType as
1.395 +//! third parameter.
1.396 +//! 3.Call RDir::Read(TEntry &anEntry) to read a single directory entry synchronously.
1.397 +//! 4.Call RDir::Close().
1.398 +//! @SYMTestStatus Implemented
1.399 +//! @SYMTestPriority Critical
1.400 +//! @SYMTestExpectedResults The Open() method call is completed returning KErrNone. The last Read() method call returns KErrEof as there are
1.401 +//! only 5 *.txt files (test.txt, Test1.txt, Test2.txt, Test3.txt, test_rom.txt). All other verifications pass.
1.402 +//! @SYMTestType CIT
1.403 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
1.404 + CREATE_OBJECT RFs RFs1
1.405 + CREATE_OBJECT RDir RDir1
1.406 + CREATE_OBJECT TEntry TEntry1
1.407 + COMMAND RFs1 new
1.408 + COMMAND RFs1 Connect
1.409 + COMMAND RDir1 new
1.410 + COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5010-001-Open_command005
1.411 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5010-001-Read_command007
1.412 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.413 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.414 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.415 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.416 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.417 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.418 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.419 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.420 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.421 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.422 + COMMAND !Error=-25 RDir1 Read PBASE-F32-RDir-PublicApi-global-001-Read_compare_sync
1.423 + COMMAND RDir1 Close
1.424 + COMMAND TEntry1 ~
1.425 + COMMAND RDir1 ~
1.426 + COMMAND RFs1 ~
1.427 + END_TEST_BLOCK
1.428 +END_TESTCASE PBASE-F32-RDir-PublicApi-5010
1.429 +
1.430 +
1.431 +START_TESTCASE PBASE-F32-RDir-PublicApi-5011
1.432 +//! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5011
1.433 +//! @SYMAPI RDir
1.434 +//! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) test, that checks that Open() works fine
1.435 +//! with ? wildcard.
1.436 +//! Uses API elements: Open(), Read(), Close().
1.437 +//! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
1.438 +//! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
1.439 +//! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\ (containing 14 files: 1mb,
1.440 +//! any.txt, big_line.txt, filetext_eof.txt, filetext_read.txt, multiline.txt, new_file.txt,
1.441 +//! oneliner_tmp.txt, test_rom.txt, test.txt, Test1.txt, Test2.txt,
1.442 +//! Test3.txt, USBLOAD.ZIP) as second parameter, and
1.443 +//! KEntryAttNormal as third parameter.
1.444 +//! 3.Call RDir::Read(TEntry &anEntry) to read a single directory entry synchronously.
1.445 +//! 4.Call RDir::Close().
1.446 +//! @SYMTestStatus Implemented
1.447 +//! @SYMTestPriority Critical
1.448 +//! @SYMTestExpectedResults The Open() method call is completed returning KErrNone. The last Read() method call returns KErrEof as there are
1.449 +//! only 3 Test?.txt files (Test1.txt, Test2.txt, Test3.txt). All other verifications pass.
1.450 +//! @SYMTestType CIT
1.451 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
1.452 + CREATE_OBJECT RFs RFs1
1.453 + CREATE_OBJECT RDir RDir1
1.454 + CREATE_OBJECT TEntry TEntry1
1.455 + COMMAND RFs1 new
1.456 + COMMAND RFs1 Connect
1.457 + COMMAND RDir1 new
1.458 + COMMAND RDir1 Open PBASE-F32-RDir-PublicApi-5011-001-Open_command005
1.459 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5011-001-Read_command006
1.460 + COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_Test1
1.461 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5011-001-Read_command006
1.462 + COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_Test2
1.463 + COMMAND RDir1 Read PBASE-F32-RDir-PublicApi-5011-001-Read_command008
1.464 + COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_Test3
1.465 + COMMAND !Error=-25 RDir1 Read PBASE-F32-RDir-PublicApi-5011-001-Read_command009
1.466 + COMMAND TEntry1 = PBASE-F32-RDir-PublicApi-global-001-assign_EOF
1.467 + COMMAND RDir1 Close
1.468 + COMMAND TEntry1 ~
1.469 + COMMAND RDir1 ~
1.470 + COMMAND RFs1 ~
1.471 + END_TEST_BLOCK
1.472 +END_TESTCASE PBASE-F32-RDir-PublicApi-5011
1.473 +
1.474 +
1.475 +//////////////////////////////////////////////////////////////////////
1.476 +//////////////////////////////////////////////////////////////////////
1.477 +////// //////
1.478 +////// /////////////////////////////////// //////
1.479 +////// /// /// //////
1.480 +////// /// NEGATIVE TESTS /// //////
1.481 +////// /// /// //////
1.482 +////// /////////////////////////////////// //////
1.483 +////// //////
1.484 +//////////////////////////////////////////////////////////////////////
1.485 +//////////////////////////////////////////////////////////////////////
1.486 +
1.487 +
1.488 +////////////////////////////////////////////////////////////////////
1.489 +//
1.490 +//OPEN
1.491 +//Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType)
1.492 +//
1.493 +////////////////////////////////////////////////////////////////////
1.494 +
1.495 +START_TESTCASE PBASE-F32-RDir-PublicApi-5101
1.496 +//! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5101
1.497 +//! @SYMAPI RDir
1.498 +//! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) negative test, that tries to open
1.499 +//! a directory which not exist and using the NULL UIDs.
1.500 +//! Uses API elements: Open(), Close().
1.501 +//! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
1.502 +//! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType),
1.503 +//! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\NotExist\ as second parameter,
1.504 +//! and empty TUidType as third parameter.
1.505 +//! 3.Call RDir::Close().
1.506 +//! @SYMTestStatus Implemented
1.507 +//! @SYMTestPriority Critical
1.508 +//! @SYMTestExpectedResults The Open() method call returns error -12 (KErrPathNotFound).
1.509 +//! @SYMTestType CIT
1.510 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
1.511 + CREATE_OBJECT RFs RFs1
1.512 + CREATE_OBJECT RDir RDir1
1.513 + COMMAND RFs1 new
1.514 + COMMAND RFs1 Connect
1.515 + COMMAND RDir1 new
1.516 + COMMAND !Error=-12 RDir1 Open PBASE-F32-RDir-PublicApi-5101-001-Open_command005
1.517 + COMMAND RDir1 Close
1.518 + COMMAND RDir1 ~
1.519 + COMMAND RFs1 ~
1.520 + END_TEST_BLOCK
1.521 +END_TESTCASE PBASE-F32-RDir-PublicApi-5101
1.522 +
1.523 +
1.524 +START_TESTCASE PBASE-F32-RDir-PublicApi-5102
1.525 +//! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5102
1.526 +//! @SYMAPI RDir
1.527 +//! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType) negative test, that tries to open
1.528 +//! a directory using the NULL UIDs when directory path is not correct.
1.529 +//! Uses API elements: Open(), Close().
1.530 +//! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
1.531 +//! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, const TUidType &aUidType),
1.532 +//! and RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\\\\as second parameter,
1.533 +//! and empty TUidType as third parameter.
1.534 +//! 3.Call RDir::Close().
1.535 +//! @SYMTestStatus Implemented
1.536 +//! @SYMTestPriority Critical
1.537 +//! @SYMTestExpectedResults The Open() method call returns error -28 (KErrBadName).
1.538 +//! @SYMTestType CIT
1.539 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
1.540 + CREATE_OBJECT RFs RFs1
1.541 + CREATE_OBJECT RDir RDir1
1.542 + COMMAND RFs1 new
1.543 + COMMAND RFs1 Connect
1.544 + COMMAND RDir1 new
1.545 + COMMAND !Error=-28 RDir1 Open PBASE-F32-RDir-PublicApi-5102-001-Open_command005
1.546 + COMMAND RDir1 Close
1.547 + COMMAND RDir1 ~
1.548 + COMMAND RFs1 ~
1.549 + END_TEST_BLOCK
1.550 +END_TESTCASE PBASE-F32-RDir-PublicApi-5102
1.551 +
1.552 +
1.553 +//////////////////////////////////////////////////////////
1.554 +//
1.555 +//OPEN
1.556 +//Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask)
1.557 +//
1.558 +//////////////////////////////////////////////////////////
1.559 +
1.560 +START_TESTCASE PBASE-F32-RDir-PublicApi-5103
1.561 +//! @SYMTestCaseID PBASE-F32-RDir-PublicApi-5103
1.562 +//! @SYMAPI RDir
1.563 +//! @SYMTestCaseDesc Function Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask) test, that tries to open a directory
1.564 +//! when directory path is not correct.
1.565 +//! Uses API elements: Open(), Close().
1.566 +//! @SYMTestActions 1.Call Create a RFs session and call it's Connect() function.
1.567 +//! 2.Call RDir::Open(RFs &aFs, const TDesC &aMatchName, TUint anAttMask),
1.568 +//! and empty RFs session as first parameter, and <DRIVE>:\base\t_sfsrv\\\\ as second parameter,
1.569 +//! and KEntryAttNormal as third parameter.
1.570 +//! 3.Call RDir::Close().
1.571 +//! @SYMTestStatus Implemented
1.572 +//! @SYMTestPriority Critical
1.573 +//! @SYMTestExpectedResults The Open() method call returns error -28 (KErrBadName).
1.574 +//! @SYMTestType CIT
1.575 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
1.576 + CREATE_OBJECT RFs RFs1
1.577 + CREATE_OBJECT RDir RDir1
1.578 + COMMAND RFs1 new
1.579 + COMMAND RFs1 Connect
1.580 + COMMAND RDir1 new
1.581 + COMMAND !Error=-28 RDir1 Open PBASE-F32-RDir-PublicApi-5103-001-Open_command005
1.582 + COMMAND RDir1 Close
1.583 + COMMAND RDir1 ~
1.584 + COMMAND RFs1 ~
1.585 + END_TEST_BLOCK
1.586 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-RDir-PublicApi.ini
1.587 + CREATE_OBJECT RFs RFs1
1.588 + CREATE_OBJECT CFileMan CFileMan1
1.589 + COMMAND RFs1 new
1.590 + COMMAND RFs1 Connect
1.591 + COMMAND CFileMan1 NewL PBASE-F32-RDir-PublicApi-NewL
1.592 + COMMAND CFileMan1 Delete PBASE-F32-RDir-PublicApi-001-Delete
1.593 + COMMAND RFs1 RmDir PBASE-F32-RDir-PublicApi-001-RmDir
1.594 + COMMAND CFileMan1 ~
1.595 + COMMAND RFs1 ~
1.596 +END_TEST_BLOCK
1.597 +
1.598 +END_TESTCASE PBASE-F32-RDir-PublicApi-5103