os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-File-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-File-PublicApi-RAM.script Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,4238 @@
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 Alvar Udras
1.23 +//! @SYMScriptDescription The test script contains API tests for the following functions of RFile class:
1.24 +//! TInt Open(RFs &aFs, const TDesC &aName, TUint aFileMode);
1.25 +//! void Close();
1.26 +//! TInt Create(RFs &aFs, const TDesC &aName, TUint aFileMode);
1.27 +//! TInt Replace(RFs &aFs, const TDesC &aName, TUint aFileMode);
1.28 +//! TInt Temp(RFs &aFs, const TDesC &aPath, TFileName &aName, TUint aFileMode);
1.29 +//! TInt Read(TDes8 &aDes) const;
1.30 +//! void Read(TDes8 &aDes, TRequestStatus &aStatus) const;
1.31 +//! TInt Read(TDes8 &aDes, TInt aLength) const;
1.32 +//! void Read(TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) const;
1.33 +//! TInt Read(TInt aPos, TDes8 &aDes) const;
1.34 +//! void Read(TInt aPos, TDes8 &aDes, TRequestStatus &aStatus) const;
1.35 +//! TInt Read(TInt aPos, TDes8 &aDes, TInt aLength) const;
1.36 +//! void Read(TInt aPos, TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) const;
1.37 +//! void ReadCancel(TRequestStatus &aStatus) const;
1.38 +//! void ReadCancel() const;
1.39 +//! TInt Write(const TDesC8 &aDes);
1.40 +//! void Write(const TDesC8 &aDes, TRequestStatus &aStatus);
1.41 +//! TInt Write(const TDesC8 &aDes, TInt aLength);
1.42 +//! void Write(const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus);
1.43 +//! TInt Write(TInt aPos, const TDesC8 &aDes);
1.44 +//! void Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus);
1.45 +//! TInt Write(TInt aPos, const TDesC8 &aDes, TInt aLength);
1.46 +//! void Write(TInt aPos, const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus);
1.47 +//! TInt Lock(TInt aPos, TInt aLength) const;
1.48 +//! TInt UnLock(TInt aPos, TInt aLength) const;
1.49 +//! TInt Seek(TSeek aMode, TInt &aPos) const;
1.50 +//! TInt Flush();
1.51 +//! void Flush(TRequestStatus &aStatus);
1.52 +//! TInt Size(TInt &aSize) const;
1.53 +//! TInt SetSize(TInt aSize);
1.54 +//! TInt Att(TUint &aAttValue) const;
1.55 +//! TInt SetAtt(TUint aSetAttMask, TUint aClearAttMask);
1.56 +//! TInt Modified(TTime &aTime) const;
1.57 +//! TInt SetModified(const TTime &aTime);
1.58 +//! TInt Set(const TTime &aTime, TUint aSetAttMask, TUint aClearAttMask);
1.59 +//! TInt ChangeMode(TFileMode aNewMode);
1.60 +//! TInt Rename(const TDesC &aNewName);
1.61 +//! TInt Drive(TInt &aDriveNumber, TDriveInfo &aDriveInfo) const;
1.62 +//! TInt Name(TDes &aName) const;
1.63 +//! TInt Duplicate(const RFile &aFile, TOwnerType aType=EOwnerProcess);
1.64 +//! TInt FullName(TDes &aName) const;
1.65 +
1.66 +LOAD_SUITE T_SfSrv
1.67 +DELAY 1000
1.68 +
1.69 +
1.70 +START_TESTCASE PBASE-F32-File-PublicApi-Install
1.71 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-Install
1.72 +//! @SYMAPI RFile
1.73 +//! @SYMTestCaseDesc Setup the Environment to test RFile APIs by creating directories.
1.74 +//! @SYMTestActions 1. Rfs::New() to create Rfs Object.
1.75 +//! 2. Rfs::MkDirAll() to create directories required.
1.76 +//! @SYMTestStatus Implemented
1.77 +//! @SYMTestPriority Critical
1.78 +//! @SYMTestExpectedResults Directories get created.
1.79 +//!
1.80 +//! @SYMTestType CIT
1.81 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.82 + CREATE_OBJECT RFs RFs1
1.83 + COMMAND RFs1 new
1.84 + COMMAND RFs1 Connect
1.85 + COMMAND RFs1 MkDirAll PBASE-F32-File-PublicApi-Install
1.86 + COMMAND RFs1 ~
1.87 +END_TEST_BLOCK
1.88 +END_TESTCASE PBASE-F32-File-PublicApi-Install
1.89 +
1.90 +
1.91 +START_TESTCASE PBASE-F32-File-PublicApi-0001
1.92 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0001
1.93 +//! @SYMAPI RFile
1.94 +//! @SYMTestCaseDesc Function Open() test. Open a file and close it.
1.95 +//! Uses API elements: Open().
1.96 +//! @SYMTestActions 1. Create RFs session
1.97 +//! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc0001.txt", EFileShareAny | EFileWrite
1.98 +//! 3. Write "open test" to file.
1.99 +//! 4. Close file.
1.100 +//! 5. Open file "{Drives, RAMDriveTestPath}file\tc0001.txt", with EFileRead
1.101 +//! 6. Read from file to determine, that the file is opened.
1.102 +//! 7. Close file.
1.103 +//! 8. Delete file.
1.104 +//! 9. Close file system.
1.105 +//!
1.106 +//! @SYMTestStatus Implemented
1.107 +//! @SYMTestPriority Critical
1.108 +//! @SYMTestExpectedResults RFile::Open() returns KErrNone. File is opened after Open call.
1.109 +//!
1.110 +//! @SYMTestType CIT
1.111 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.112 + CREATE_OBJECT RFs RFs1
1.113 + CREATE_OBJECT RFile file
1.114 + COMMAND RFs1 new
1.115 + COMMAND RFs1 Connect
1.116 + COMMAND file new
1.117 + COMMAND file Replace PBASE-F32-File-PublicApi-0001-001-Replace_command005
1.118 + COMMAND file Write PBASE-F32-File-PublicApi-0001-001-Write_command006
1.119 + COMMAND file Close
1.120 + COMMAND file Open PBASE-F32-File-PublicApi-0001-001-Open_command008
1.121 + COMMAND file Read PBASE-F32-File-PublicApi-0001-001-Read_command009
1.122 + COMMAND file Close
1.123 + COMMAND file ~
1.124 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0001-001-Delete_command013
1.125 + COMMAND RFs1 ~
1.126 +END_TEST_BLOCK
1.127 +END_TESTCASE PBASE-F32-File-PublicApi-0001
1.128 +
1.129 +
1.130 +//FileModes - EFileRead
1.131 +
1.132 +
1.133 +START_TESTCASE PBASE-F32-File-PublicApi-4001
1.134 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-4001
1.135 +//! @SYMAPI RFile
1.136 +//! @SYMTestCaseDesc Function TFileMode::EFileRead test. open file for reading and try to write to it.
1.137 +//! Uses API elements: Open().
1.138 +//! @SYMTestActions 1. Create RFs session
1.139 +//! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4001.txt", EFileShareAny | EFileWrite
1.140 +//! 3. Close file.
1.141 +//! 4. Open file "{Drives, RAMDriveTestPath}file\tc4001.txt", with EFileRead
1.142 +//! 5. Write "test" to file.
1.143 +//! 6. Close file.
1.144 +//! 7. Delete file.
1.145 +//! 8. Close file system.
1.146 +//!
1.147 +//! @SYMTestStatus Implemented
1.148 +//! @SYMTestPriority Critical
1.149 +//! @SYMTestExpectedResults RFile::Write returns KErrAccessDenied.
1.150 +//!
1.151 +//! @SYMTestType CIT
1.152 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.153 + CREATE_OBJECT RFs RFs1
1.154 + CREATE_OBJECT RFile file
1.155 + COMMAND RFs1 new
1.156 + COMMAND RFs1 Connect
1.157 + COMMAND file new
1.158 + COMMAND file Replace PBASE-F32-File-PublicApi-4001-001-Replace_command005
1.159 + COMMAND file Close
1.160 + COMMAND file Open PBASE-F32-File-PublicApi-4001-001-Open_command007
1.161 + COMMAND !Error=-21 file Write PBASE-F32-File-PublicApi-4001-001-Write_command008
1.162 + COMMAND file Close
1.163 + COMMAND file ~
1.164 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4001-001-Delete_command012
1.165 + COMMAND RFs1 ~
1.166 +END_TEST_BLOCK
1.167 +END_TESTCASE PBASE-F32-File-PublicApi-4001
1.168 +
1.169 +
1.170 +//EFileShareExclusive
1.171 +
1.172 +
1.173 +START_TESTCASE PBASE-F32-File-PublicApi-4002
1.174 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-4002
1.175 +//! @SYMAPI RFile
1.176 +//! @SYMTestCaseDesc Function TFileMode::EFileShareExclusive test. Open a file in EFileShareExclusive and try to open the same file through another handle.
1.177 +//! Uses API elements: Open().
1.178 +//! @SYMTestActions 1. Create RFs session
1.179 +//! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4002.txt", EFileShareAny | EFileWrite.
1.180 +//! 3. Close file.
1.181 +//! 4. Open file "{Drives, RAMDriveTestPath}file\tc4002.txt", with EFileShareExclusive
1.182 +//! 5. Open "{Drives, RAMDriveTestPath}file\tc4002.txt" through new handle called file2, with EFileShareExlusive
1.183 +//! 6. Close file.
1.184 +//! 7. Delete file.
1.185 +//! 8. Close file system.
1.186 +//!
1.187 +//! @SYMTestStatus Implemented
1.188 +//! @SYMTestPriority Critical
1.189 +//! @SYMTestExpectedResults RFile::Open returns KErrInUse.
1.190 +//!
1.191 +//! @SYMTestType CIT
1.192 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.193 + CREATE_OBJECT RFs RFs1
1.194 + CREATE_OBJECT RFile file
1.195 + CREATE_OBJECT RFile file2
1.196 + COMMAND RFs1 new
1.197 + COMMAND RFs1 Connect
1.198 + COMMAND file new
1.199 + COMMAND file Replace PBASE-F32-File-PublicApi-4002-001-Replace_command005
1.200 + COMMAND file Close
1.201 + COMMAND file Open PBASE-F32-File-PublicApi-4002-001-Open_command007
1.202 + COMMAND file2 new
1.203 + COMMAND !Error=-14 file2 Open PBASE-F32-File-PublicApi-4002-001-Open_command010
1.204 + COMMAND file2 Close
1.205 + COMMAND file2 ~
1.206 + COMMAND file Close
1.207 + COMMAND file ~
1.208 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4002-001-Delete_command017
1.209 + COMMAND RFs1 ~
1.210 +END_TEST_BLOCK
1.211 +END_TESTCASE PBASE-F32-File-PublicApi-4002
1.212 +
1.213 +
1.214 +//EFileShareReadersOnly
1.215 +
1.216 +
1.217 +START_TESTCASE PBASE-F32-File-PublicApi-4003
1.218 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-4003
1.219 +//! @SYMAPI RFile
1.220 +//! @SYMTestCaseDesc Function TFileMode::EFileShareReadersOnly test. Open a file in EFileShareReadersOnly and try to write to it through another handle.
1.221 +//! Uses API elements: Open().
1.222 +//! @SYMTestActions 1. Create RFs session
1.223 +//! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4003.txt", EFileShareAny | EFileWrite
1.224 +//! 3. Write "open test" to file.
1.225 +//! 4. Close file.
1.226 +//! 5. Open file "{Drives, RAMDriveTestPath}file\tc4003.txt", with EFileShareReadersOnly
1.227 +//! 6. Open "{Drives, RAMDriveTestPath}file\tc4003.txt" through new handle called file2 EFileRead.
1.228 +//! 7. Read from file.
1.229 +//! 8. Try to write "will cause error" to file.
1.230 +//! 9. Close file.
1.231 +//! 10. Delete file.
1.232 +//! 11. Close file system.
1.233 +//!
1.234 +//! @SYMTestStatus Implemented
1.235 +//! @SYMTestPriority Critical
1.236 +//! @SYMTestExpectedResults RFile::Write returns KErrAccessDenied.
1.237 +//!
1.238 +//! @SYMTestType CIT
1.239 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.240 + CREATE_OBJECT RFs RFs1
1.241 + CREATE_OBJECT RFile file
1.242 + CREATE_OBJECT RFile file2
1.243 + COMMAND RFs1 new
1.244 + COMMAND RFs1 Connect
1.245 + COMMAND file new
1.246 + COMMAND file Replace PBASE-F32-File-PublicApi-4003-001-Replace_command005
1.247 + COMMAND file Write PBASE-F32-File-PublicApi-4003-001-Write_command006
1.248 + COMMAND file Close
1.249 + COMMAND file Open PBASE-F32-File-PublicApi-4003-001-Open_command008
1.250 + COMMAND file2 new
1.251 + COMMAND file2 Open PBASE-F32-File-PublicApi-4003-001-Open_command011
1.252 + COMMAND file2 Read PBASE-F32-File-PublicApi-4003-001-Read_command012
1.253 + COMMAND !Error=-21 file2 Write PBASE-F32-File-PublicApi-4003-001-Write_command013
1.254 + COMMAND file2 Close
1.255 + COMMAND file2 ~
1.256 + COMMAND file Close
1.257 + COMMAND file ~
1.258 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4003-001-Delete_command020
1.259 + COMMAND RFs1 ~
1.260 +END_TEST_BLOCK
1.261 +END_TESTCASE PBASE-F32-File-PublicApi-4003
1.262 +
1.263 +
1.264 +//EFileShareAny
1.265 +
1.266 +START_TESTCASE PBASE-F32-File-PublicApi-4004
1.267 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-4004
1.268 +//! @SYMAPI RFile
1.269 +//! @SYMTestCaseDesc Function TFileMode::EFileShareAny test. Open a file in EFileShareAny and try to write to it through another handle.
1.270 +//! Uses API elements: Open().
1.271 +//! @SYMTestActions 1. Create RFs session
1.272 +//! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4004.txt", EFileShareAny | EFileWrite
1.273 +//! 3. Write "open test" to file.
1.274 +//! 4. Close file.
1.275 +//! 5. Open file "{Drives, RAMDriveTestPath}file\tc4004.txt", with EFileShareAny.
1.276 +//! 6. Open "{Drives, RAMDriveTestPath}file\tc4004.txt" through new handle called file2 EFileShareAny | EFileWrite.
1.277 +//! 7. Read from file.
1.278 +//! 8. Try to write "open test" to file.
1.279 +//! 9. Close file.
1.280 +//! 10. Delete file.
1.281 +//! 11. Close file system.
1.282 +//!
1.283 +//! @SYMTestStatus Implemented
1.284 +//! @SYMTestPriority Critical
1.285 +//! @SYMTestExpectedResults No error is returned or panic raised.
1.286 +//!
1.287 +//! @SYMTestType CIT
1.288 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.289 + CREATE_OBJECT RFs RFs1
1.290 + CREATE_OBJECT RFile file
1.291 + CREATE_OBJECT RFile file2
1.292 + COMMAND RFs1 new
1.293 + COMMAND RFs1 Connect
1.294 + COMMAND file new
1.295 + COMMAND file Replace PBASE-F32-File-PublicApi-4004-001-Replace_command005
1.296 + COMMAND file Write PBASE-F32-File-PublicApi-4004-001-Write_command006
1.297 + COMMAND file Close
1.298 + COMMAND file Open PBASE-F32-File-PublicApi-4004-001-Open_command008
1.299 + COMMAND file2 new
1.300 + COMMAND file2 Open PBASE-F32-File-PublicApi-4004-001-Open_command011
1.301 + COMMAND file2 Read PBASE-F32-File-PublicApi-4004-001-Read_command012
1.302 + COMMAND file2 Write PBASE-F32-File-PublicApi-4004-001-Write_command013
1.303 + COMMAND file2 Close
1.304 + COMMAND file2 ~
1.305 + COMMAND file Close
1.306 + COMMAND file ~
1.307 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4004-001-Delete_command020
1.308 + COMMAND RFs1 ~
1.309 +END_TEST_BLOCK
1.310 +END_TESTCASE PBASE-F32-File-PublicApi-4004
1.311 +
1.312 +//EFileShareReadersOfWriters
1.313 +
1.314 +START_TESTCASE PBASE-F32-File-PublicApi-4005
1.315 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-4005
1.316 +//! @SYMAPI RFile
1.317 +//! @SYMTestCaseDesc Function TFileMode::EFileShareReadersOrWriters test. Open a file in EFileShareReadersOrWriters and try to write to it through another handle.
1.318 +//! Uses API elements: Open().
1.319 +//! @SYMTestActions 1. Create RFs session
1.320 +//! 2. Call Replace passing "{Drives, RAMDriveTestPath}file\tc4005.txt", EFileShareAny | EFileWrite.
1.321 +//! 3. Write "open test" to file.
1.322 +//! 4. Close file.
1.323 +//! 5. Open file "{Drives, RAMDriveTestPath}file\tc4005.txt", with EFileShareReadersOrWriters | EFileRead.
1.324 +//! 6. Open "{Drives, RAMDriveTestPath}file\tc4005.txt" through new handle called file2, EFileShareReadersOrWriters | EFileWrite.
1.325 +//! 7. Read from file.
1.326 +//! 8. Try to write "open test" to file.
1.327 +//! 9. Close file.
1.328 +//! 10. Delete file.
1.329 +//! 11. Close file system.
1.330 +//!
1.331 +//! @SYMTestStatus Implemented
1.332 +//! @SYMTestPriority Critical
1.333 +//! @SYMTestExpectedResults No errors returned or panics raised.
1.334 +//!
1.335 +//! @SYMTestType CIT
1.336 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.337 + CREATE_OBJECT RFs RFs1
1.338 + CREATE_OBJECT RFile file
1.339 + CREATE_OBJECT RFile file2
1.340 + COMMAND RFs1 new
1.341 + COMMAND RFs1 Connect
1.342 + COMMAND file new
1.343 + COMMAND file Replace PBASE-F32-File-PublicApi-4005-001-Replace_command005
1.344 + COMMAND file Write PBASE-F32-File-PublicApi-4005-001-Write_command006
1.345 + COMMAND file Close
1.346 + COMMAND file Open PBASE-F32-File-PublicApi-4005-001-Open_command008
1.347 + COMMAND file2 new
1.348 + COMMAND file2 Open PBASE-F32-File-PublicApi-4005-001-Open_command011
1.349 + COMMAND file2 Read PBASE-F32-File-PublicApi-4005-001-Read_command012
1.350 + COMMAND file2 Write PBASE-F32-File-PublicApi-4005-001-Write_command013
1.351 + COMMAND file2 Close
1.352 + COMMAND file2 ~
1.353 + COMMAND file Close
1.354 + COMMAND file ~
1.355 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-4005-001-Delete_command020
1.356 + COMMAND RFs1 ~
1.357 +END_TEST_BLOCK
1.358 +END_TESTCASE PBASE-F32-File-PublicApi-4005
1.359 +
1.360 +START_TESTCASE PBASE-F32-File-PublicApi-0003
1.361 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0003
1.362 +//! @SYMAPI RFile
1.363 +//! @SYMTestCaseDesc Function Create() test. Create a file.
1.364 +//! Uses API elements: Create().
1.365 +//! @SYMTestActions 1. Create RFs session
1.366 +//! 2. Call RFile::Create passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0003.txt", EFileShareAny
1.367 +//! 3. Open the file.
1.368 +//! 4. Write literal "test created this file" to file.
1.369 +//! 5. Close RFile.
1.370 +//! 6. Delete file.
1.371 +//! 7. Close RFs.
1.372 +//!
1.373 +//! @SYMTestStatus Implemented
1.374 +//! @SYMTestPriority Critical
1.375 +//! @SYMTestExpectedResults RFile::Create() returns KErrNone. File is created. No panics raised or errors returned
1.376 +//!
1.377 +//! @SYMTestType CIT
1.378 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.379 + CREATE_OBJECT RFs RFs1
1.380 + CREATE_OBJECT RFile file
1.381 + COMMAND RFs1 new
1.382 + COMMAND RFs1 Connect
1.383 + COMMAND file new
1.384 + COMMAND file Create PBASE-F32-File-PublicApi-0003-001-Create_command005
1.385 + COMMAND file Write PBASE-F32-File-PublicApi-0003-001-Write_command006
1.386 + COMMAND file Close
1.387 + COMMAND file ~
1.388 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0003-001-Delete_command010
1.389 + COMMAND RFs1 ~
1.390 +END_TEST_BLOCK
1.391 +END_TESTCASE PBASE-F32-File-PublicApi-0003
1.392 +
1.393 +
1.394 +START_TESTCASE PBASE-F32-File-PublicApi-0004
1.395 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0004
1.396 +//! @SYMAPI RFile
1.397 +//! @SYMTestCaseDesc Function Replace() test. Replace a file.
1.398 +//! Uses API elements: Replace().
1.399 +//! @SYMTestActions 1. Create RFs session
1.400 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0004.txt", EFileWrite
1.401 +//! 3. Call RFile::Write passing literal "This file is replaced"
1.402 +//! 4. Call Flush on file.
1.403 +//! 5. Close file.
1.404 +//! 6. Open file.
1.405 +//! 7. Read the file.
1.406 +//! 8. Close RFile.
1.407 +//! 9. Delete file.
1.408 +//! 10. Close RFs.
1.409 +//!
1.410 +//! @SYMTestStatus Implemented
1.411 +//! @SYMTestPriority Critical
1.412 +//! @SYMTestExpectedResults RFile::Replace returns KErrNone. File contains written literal and nothing else.
1.413 +//!
1.414 +//! @SYMTestType CIT
1.415 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.416 + CREATE_OBJECT RFs RFs1
1.417 + CREATE_OBJECT RFile file
1.418 + COMMAND RFs1 new
1.419 + COMMAND RFs1 Connect
1.420 + COMMAND file new
1.421 + COMMAND file Replace PBASE-F32-File-PublicApi-0004-001-Replace_command005
1.422 + COMMAND file Write PBASE-F32-File-PublicApi-0004-001-Write_command006
1.423 + COMMAND file Flush
1.424 + COMMAND file Close
1.425 + COMMAND file Open PBASE-F32-File-PublicApi-0004-001-Open_command009
1.426 + COMMAND file Read
1.427 + COMMAND file Close
1.428 + COMMAND file ~
1.429 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0004-001-Delete_command013
1.430 + COMMAND RFs1 ~
1.431 +END_TEST_BLOCK
1.432 +END_TESTCASE PBASE-F32-File-PublicApi-0004
1.433 +
1.434 +
1.435 +START_TESTCASE PBASE-F32-File-PublicApi-0005
1.436 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0005
1.437 +//! @SYMAPI RFile
1.438 +//! @SYMTestCaseDesc Function Temp() test. Create a temporary file.
1.439 +//! Uses API elements: Temp().
1.440 +//! @SYMTestActions 1. Create RFs session
1.441 +//! 2. Call RFile::Temp passing RFs, literal "{Drives, RAMDriveTestPath}file\", TDesc&, EFileWrite
1.442 +//! 3. Call RFile::Write passing literal "This is temporary file"
1.443 +//! 4. Rename the file to "tc0005.txt".
1.444 +//! 5. Close RFile.
1.445 +//! 6. Delete temporary file.
1.446 +//! 7. Close RFs.
1.447 +//!
1.448 +//! @SYMTestStatus Implemented
1.449 +//! @SYMTestPriority Critical
1.450 +//! @SYMTestExpectedResults RFile::Temp() returns KErrNone, temporary file is created.
1.451 +//!
1.452 +//! @SYMTestType CIT
1.453 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.454 + CREATE_OBJECT RFs RFs1
1.455 + CREATE_OBJECT RFile file
1.456 + COMMAND RFs1 new
1.457 + COMMAND RFs1 Connect
1.458 + COMMAND file new
1.459 + COMMAND file Temp PBASE-F32-File-PublicApi-0005-001-Temp_command005
1.460 + COMMAND file Write PBASE-F32-File-PublicApi-0005-001-Write_command006
1.461 + COMMAND file Rename PBASE-F32-File-PublicApi-0005-001-Rename_command007
1.462 + COMMAND file Close
1.463 + COMMAND file ~
1.464 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0005-001-Delete_command011
1.465 + COMMAND RFs1 ~
1.466 +END_TEST_BLOCK
1.467 +END_TESTCASE PBASE-F32-File-PublicApi-0005
1.468 +
1.469 +
1.470 +START_TESTCASE PBASE-F32-File-PublicApi-0006
1.471 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0006
1.472 +//! @SYMAPI RFile
1.473 +//! @SYMTestCaseDesc Synchronous Read(TDes8 &aDes) test - will open file and read its contents to a buffer.
1.474 +//! Uses API elements: Read().
1.475 +//! @SYMTestActions 1. Create RFs session
1.476 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0006.txt", EFileWrite
1.477 +//! 3. Call RFile::Write passing literal "Synchronous read test!".
1.478 +//! 4. Set the file position to 0.
1.479 +//! 5. Call RFile::Read().
1.480 +//! 6. Close RFile.
1.481 +//! 7. Delete file.
1.482 +//! 8. Close RFs.
1.483 +//!
1.484 +//! @SYMTestStatus Implemented
1.485 +//! @SYMTestPriority Critical
1.486 +//! @SYMTestExpectedResults RFile::Read() returns KErrNone. Data is read and verified.
1.487 +//!
1.488 +//! @SYMTestType CIT
1.489 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.490 + CREATE_OBJECT RFs RFs1
1.491 + CREATE_OBJECT RFile file
1.492 + COMMAND RFs1 new
1.493 + COMMAND RFs1 Connect
1.494 + COMMAND file new
1.495 + COMMAND file Replace PBASE-F32-File-PublicApi-0006-001-Replace_command005
1.496 + COMMAND file Write PBASE-F32-File-PublicApi-0006-001-Write_command006
1.497 + COMMAND file Seek PBASE-F32-File-PublicApi-0006-001-Seek_command007
1.498 + COMMAND file Read PBASE-F32-File-PublicApi-0006-001-Read_command008
1.499 + COMMAND file Close
1.500 + COMMAND file ~
1.501 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0006-001-Delete_command012
1.502 + COMMAND RFs1 ~
1.503 +END_TEST_BLOCK
1.504 +END_TESTCASE PBASE-F32-File-PublicApi-0006
1.505 +
1.506 +
1.507 +START_TESTCASE PBASE-F32-File-PublicApi-0007
1.508 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0007
1.509 +//! @SYMAPI RFile
1.510 +//! @SYMTestCaseDesc Asynchronous Read(TDes8& aDes, TRequestStatus &aStatus) test - will open file and read its contents to a buffer.
1.511 +//! Uses API elements: Read().
1.512 +//! @SYMTestActions 1. Create RFs session.
1.513 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0007.txt", EFileWrite.
1.514 +//! 3. Call RFile::Write passing literal "asynchronous read test"
1.515 +//! 4. Reset file position
1.516 +//! 5. Call RFile::Read() passing TRequestStatus.
1.517 +//! 6. Wait until asynchronous call completes
1.518 +//! 7. Close RFile.
1.519 +//! 8. Delete file.
1.520 +//! 9. Close RFs.
1.521 +//!
1.522 +//! @SYMTestStatus Implemented
1.523 +//! @SYMTestPriority Critical
1.524 +//! @SYMTestExpectedResults The asynchronous read call finishes with KErrNone. Data is read and verified.
1.525 +//!
1.526 +//! @SYMTestType CIT
1.527 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.528 + CREATE_OBJECT RFs RFs1
1.529 + CREATE_OBJECT RFile file
1.530 + COMMAND RFs1 new
1.531 + COMMAND RFs1 Connect
1.532 + COMMAND file new
1.533 + COMMAND file Replace PBASE-F32-File-PublicApi-0007-001-Replace_command005
1.534 + COMMAND file Write PBASE-F32-File-PublicApi-0007-001-Write_command006
1.535 + COMMAND file Seek PBASE-F32-File-PublicApi-0007-001-Seek_command007
1.536 + COMMAND file Read PBASE-F32-File-PublicApi-0007-001-Read_command008
1.537 + OUTSTANDING
1.538 + COMMAND file Close
1.539 + COMMAND file ~
1.540 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0007-001-Delete_command012
1.541 + COMMAND RFs1 ~
1.542 +END_TEST_BLOCK
1.543 +END_TESTCASE PBASE-F32-File-PublicApi-0007
1.544 +
1.545 +
1.546 +START_TESTCASE PBASE-F32-File-PublicApi-0008
1.547 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0008
1.548 +//! @SYMAPI RFile
1.549 +//! @SYMTestCaseDesc Synchronous Read(TDes8 &aDes, TInt aLength) test - will open file and read fixed length from its contents to a buffer.
1.550 +//! Uses API elements: Read().
1.551 +//! @SYMTestActions 1. Create RFs session
1.552 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0008.txt", EFileWrite
1.553 +//! 3. Write "synchronous read with length test" to file
1.554 +//! 4. Reset file position.
1.555 +//! 5. Call RFile::Read() passing TDesC, 5 for the length
1.556 +//! 6. Close RFile.
1.557 +//! 7. Delete file.
1.558 +//! 8. Close RFs.
1.559 +//!
1.560 +//! @SYMTestStatus Implemented
1.561 +//! @SYMTestPriority Critical
1.562 +//! @SYMTestExpectedResults RFile::Read() returns KErrNone. Data is read and verified.
1.563 +//!
1.564 +//! @SYMTestType CIT
1.565 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.566 + CREATE_OBJECT RFs RFs1
1.567 + CREATE_OBJECT RFile file
1.568 + COMMAND RFs1 new
1.569 + COMMAND RFs1 Connect
1.570 + COMMAND file new
1.571 + COMMAND file Replace PBASE-F32-File-PublicApi-0008-001-Replace_command005
1.572 + COMMAND file Write PBASE-F32-File-PublicApi-0008-001-Write_command006
1.573 + COMMAND file Seek PBASE-F32-File-PublicApi-0008-001-Seek_command007
1.574 + COMMAND file Read PBASE-F32-File-PublicApi-0008-001-Read_command008
1.575 + COMMAND file Close
1.576 + COMMAND file ~
1.577 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0008-001-Delete_command012
1.578 + COMMAND RFs1 ~
1.579 +END_TEST_BLOCK
1.580 +END_TESTCASE PBASE-F32-File-PublicApi-0008
1.581 +
1.582 +
1.583 +START_TESTCASE PBASE-F32-File-PublicApi-0009
1.584 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0009
1.585 +//! @SYMAPI RFile
1.586 +//! @SYMTestCaseDesc Asynchronous Read(TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) test - will open file and read fixed length from its contents to a buffer.
1.587 +//! Uses API elements: Read().
1.588 +//! @SYMTestActions 1. Create RFs session.
1.589 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0009.txt", EFileWrite.
1.590 +//! 3. Call RFile::Write passing literal "Asynchronous read with length test"
1.591 +//! 4. Reset file position
1.592 +//! 4. Create TRequestStatus variable.
1.593 +//! 5. Call RFile::Read() passing TRequestStatus and 5 for length.
1.594 +//! 6. Wait until asynchronous call completes
1.595 +//! 7. Close RFile.
1.596 +//! 8. Delete file.
1.597 +//! 9. Close RFs.
1.598 +//!
1.599 +//! @SYMTestStatus Implemented
1.600 +//! @SYMTestPriority Critical
1.601 +//! @SYMTestExpectedResults The asynchronous read call finishes with KErrNone. Data is read and verified.
1.602 +//!
1.603 +//! @SYMTestType CIT
1.604 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.605 + CREATE_OBJECT RFs RFs1
1.606 + CREATE_OBJECT RFile file
1.607 + COMMAND RFs1 new
1.608 + COMMAND RFs1 Connect
1.609 + COMMAND file new
1.610 + COMMAND file Replace PBASE-F32-File-PublicApi-0009-001-Replace_command005
1.611 + COMMAND file Write PBASE-F32-File-PublicApi-0009-001-Write_command006
1.612 + COMMAND file Seek PBASE-F32-File-PublicApi-0009-001-Seek_command007
1.613 + COMMAND file Read PBASE-F32-File-PublicApi-0009-001-Read_command008
1.614 + OUTSTANDING
1.615 + COMMAND file Close
1.616 + COMMAND file ~
1.617 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0009-001-Delete_command012
1.618 + COMMAND RFs1 ~
1.619 +END_TEST_BLOCK
1.620 +END_TESTCASE PBASE-F32-File-PublicApi-0009
1.621 +
1.622 +
1.623 +START_TESTCASE PBASE-F32-File-PublicApi-0010
1.624 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0010
1.625 +//! @SYMAPI RFile
1.626 +//! @SYMTestCaseDesc Synchronous Read(TInt aPos, TDes8 &aDes) test - will open file and read from given position its contents to a buffer.
1.627 +//! Uses API elements: Read().
1.628 +//! @SYMTestActions 1. Create RFs session
1.629 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0010.txt", EFileWrite
1.630 +//! 3. Write "synchronous read with position test" to file
1.631 +//! 4. Reset file position.
1.632 +//! 5. Call RFile::Read() passing 5 for position.
1.633 +//! 6. Close RFile.
1.634 +//! 7. Delete file.
1.635 +//! 8. Close RFs.
1.636 +//!
1.637 +//! @SYMTestStatus Implemented
1.638 +//! @SYMTestPriority Critical
1.639 +//! @SYMTestExpectedResults RFile::Read() returns KErrNone. Data is read and verified.
1.640 +//!
1.641 +//! @SYMTestType CIT
1.642 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.643 + CREATE_OBJECT RFs RFs1
1.644 + CREATE_OBJECT RFile file
1.645 + COMMAND RFs1 new
1.646 + COMMAND RFs1 Connect
1.647 + COMMAND file new
1.648 + COMMAND file Replace PBASE-F32-File-PublicApi-0010-001-Replace_command005
1.649 + COMMAND file Write PBASE-F32-File-PublicApi-0010-001-Write_command006
1.650 + COMMAND file Seek PBASE-F32-File-PublicApi-0010-001-Seek_command007
1.651 + COMMAND file Read PBASE-F32-File-PublicApi-0010-001-Read_command008
1.652 + COMMAND file Close
1.653 + COMMAND file ~
1.654 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0010-001-Delete_command012
1.655 + COMMAND RFs1 ~
1.656 +END_TEST_BLOCK
1.657 +END_TESTCASE PBASE-F32-File-PublicApi-0010
1.658 +
1.659 +
1.660 +START_TESTCASE PBASE-F32-File-PublicApi-0011
1.661 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0011
1.662 +//! @SYMAPI RFile
1.663 +//! @SYMTestCaseDesc Asynchronous Read(TInt aPos, TDes8 &aDes, TRequestStatus &aStatus) test - will open file and read from given position its contents to a buffer.
1.664 +//! Uses API elements: Read().
1.665 +//! @SYMTestActions 1. Create RFs session.
1.666 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0011.txt", EFileWrite.
1.667 +//! 3. Call RFile::Write passing literal "asynchronous read with position test"
1.668 +//! 4. Reset file position
1.669 +//! 5. Call RFile::Read() passing TRequestStatus and 5 for position.
1.670 +//! 6. Wait until asynchronous call completes
1.671 +//! 7. Close RFile.
1.672 +//! 8. Delete file.
1.673 +//! 9. Close RFs.
1.674 +//!
1.675 +//! @SYMTestStatus Implemented
1.676 +//! @SYMTestPriority Critical
1.677 +//! @SYMTestExpectedResults The asynchronous read call finishes with KErrNone. Data is read and verified.
1.678 +//!
1.679 +//! @SYMTestType CIT
1.680 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.681 + CREATE_OBJECT RFs RFs1
1.682 + CREATE_OBJECT RFile file
1.683 + COMMAND RFs1 new
1.684 + COMMAND RFs1 Connect
1.685 + COMMAND file new
1.686 + COMMAND file Replace PBASE-F32-File-PublicApi-0011-001-Replace_command005
1.687 + COMMAND file Write PBASE-F32-File-PublicApi-0011-001-Write_command006
1.688 + COMMAND file Seek PBASE-F32-File-PublicApi-0011-001-Seek_command007
1.689 + COMMAND file Read PBASE-F32-File-PublicApi-0011-001-Read_command008
1.690 + OUTSTANDING
1.691 + COMMAND file Close
1.692 + COMMAND file ~
1.693 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0011-001-Delete_command012
1.694 + COMMAND RFs1 ~
1.695 +END_TEST_BLOCK
1.696 +END_TESTCASE PBASE-F32-File-PublicApi-0011
1.697 +
1.698 +
1.699 +START_TESTCASE PBASE-F32-File-PublicApi-0012
1.700 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0012
1.701 +//! @SYMAPI RFile
1.702 +//! @SYMTestCaseDesc Synchronous Read(TInt aPos, TDes8 &aDes, TInt aLength) test - will open file and read from given position fixed length of contents into a buffer.
1.703 +//! Uses API elements: Read().
1.704 +//! @SYMTestActions 1. Create RFs session
1.705 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0012.txt", EFileWrite
1.706 +//! 3. Write "synchronous read with length and position test" to file
1.707 +//! 4. Reset file position.
1.708 +//! 5. Call RFile::Read() passing 5 for length and 5 for position.
1.709 +//! 6. Close RFile.
1.710 +//! 7. Delete file.
1.711 +//! 8. Close RFs.
1.712 +//!
1.713 +//! @SYMTestStatus Implemented
1.714 +//! @SYMTestPriority Critical
1.715 +//! @SYMTestExpectedResults RFile::Read() returns KErrNone. Data is read and verified.
1.716 +//!
1.717 +//! @SYMTestType CIT
1.718 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.719 + CREATE_OBJECT RFs RFs1
1.720 + CREATE_OBJECT RFile file
1.721 + COMMAND RFs1 new
1.722 + COMMAND RFs1 Connect
1.723 + COMMAND file new
1.724 + COMMAND file Replace PBASE-F32-File-PublicApi-0012-001-Replace_command005
1.725 + COMMAND file Write PBASE-F32-File-PublicApi-0012-001-Write_command006
1.726 + COMMAND file Seek PBASE-F32-File-PublicApi-0012-001-Seek_command007
1.727 + COMMAND file Read PBASE-F32-File-PublicApi-0012-001-Read_command008
1.728 + COMMAND file Close
1.729 + COMMAND file ~
1.730 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0012-001-Delete_command012
1.731 + COMMAND RFs1 ~
1.732 +END_TEST_BLOCK
1.733 +END_TESTCASE PBASE-F32-File-PublicApi-0012
1.734 +
1.735 +
1.736 +START_TESTCASE PBASE-F32-File-PublicApi-0013
1.737 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0013
1.738 +//! @SYMAPI RFile
1.739 +//! @SYMTestCaseDesc Asynchronous Read(TInt aPos, TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) test - will open file and read from given position fixed length of contents into a buffer.
1.740 +//! Uses API elements: Read().
1.741 +//! @SYMTestActions 1. Create RFs session.
1.742 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0013.txt", EFileWrite.
1.743 +//! 3. Call RFile::Write passing literal "asynchronous read with length and position test"
1.744 +//! 4. Reset file position
1.745 +//! 5. Call RFile::Read() passing TRequestStatus, 5 for length and 5 for position.
1.746 +//! 6. Wait until asynchronous call completes
1.747 +//! 7. Close RFile.
1.748 +//! 8. Delete file.
1.749 +//! 9. Close RFs.
1.750 +//!
1.751 +//! @SYMTestStatus Implemented
1.752 +//! @SYMTestPriority Critical
1.753 +//! @SYMTestExpectedResults The asynchronous read call finishes with KErrNone. Data is read and verified.
1.754 +//!
1.755 +//! @SYMTestType CIT
1.756 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.757 + CREATE_OBJECT RFs RFs1
1.758 + CREATE_OBJECT RFile file
1.759 + COMMAND RFs1 new
1.760 + COMMAND RFs1 Connect
1.761 + COMMAND file new
1.762 + COMMAND file Replace PBASE-F32-File-PublicApi-0013-001-Replace_command005
1.763 + COMMAND file Write PBASE-F32-File-PublicApi-0013-001-Write_command006
1.764 + COMMAND file Seek PBASE-F32-File-PublicApi-0013-001-Seek_command007
1.765 + COMMAND file Read PBASE-F32-File-PublicApi-0013-001-Read_command008
1.766 + OUTSTANDING
1.767 + COMMAND file Close
1.768 + COMMAND file ~
1.769 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0013-001-Delete_command011
1.770 + COMMAND RFs1 ~
1.771 +END_TEST_BLOCK
1.772 +END_TESTCASE PBASE-F32-File-PublicApi-0013
1.773 +
1.774 +
1.775 +START_TESTCASE PBASE-F32-File-PublicApi-0014
1.776 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0014
1.777 +//! @SYMAPI RFile
1.778 +//! @SYMTestCaseDesc Function ReadCancel(TRequestStatus aStatus) and EFileReadAsyncAll test.
1.779 +//! Uses API elements: ReadCancel().
1.780 +//! @SYMTestActions 1. Create RFs session.
1.781 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0014.txt", EFileWrite.
1.782 +//! 3. Write message "short data" to file.
1.783 +//! 4. Close file
1.784 +//! 5. Open fail again with EFileShareAny | EFileReadAsyncAll.
1.785 +//! 6. Call RFile::Read() passing TRequestStatus.
1.786 +//! 7. Call ReadCancel passing TRequestStatus.
1.787 +//! 8. Close RFile.
1.788 +//! 9. Delete file.
1.789 +//! 10. Close RFs.
1.790 +//!
1.791 +//! @SYMTestStatus Implemented
1.792 +//! @SYMTestPriority Critical
1.793 +//! @SYMTestExpectedResults TRequestStatus returns KErrCancel after ReadCancel.
1.794 +//!
1.795 +//! @SYMTestType CIT
1.796 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.797 + CREATE_OBJECT RFs RFs1
1.798 + CREATE_OBJECT RFile file
1.799 + COMMAND RFs1 new
1.800 + COMMAND RFs1 Connect
1.801 + COMMAND file new
1.802 + COMMAND file Replace PBASE-F32-File-PublicApi-0014-001-Replace_command005
1.803 + COMMAND file Write PBASE-F32-File-PublicApi-0014-001-Write_command006
1.804 + COMMAND file Close
1.805 + COMMAND file Open PBASE-F32-File-PublicApi-0014-001-Open_command008
1.806 + COMMAND file Seek PBASE-F32-File-PublicApi-0014-001-Seek_command009
1.807 + COMMAND !AsyncError=-3 file Read PBASE-F32-File-PublicApi-0014-001-Read_command010
1.808 + ASYNC_DELAY 5
1.809 + COMMAND file ReadCancel
1.810 + COMMAND file ReadCancel
1.811 + OUTSTANDING
1.812 + COMMAND file Close
1.813 + COMMAND file ~
1.814 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0014-001-Delete_command015
1.815 + COMMAND RFs1 ~
1.816 +END_TEST_BLOCK
1.817 +END_TESTCASE PBASE-F32-File-PublicApi-0014
1.818 +
1.819 +
1.820 +START_TESTCASE PBASE-F32-File-PublicApi-0015
1.821 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0015
1.822 +//! @SYMAPI RFile
1.823 +//! @SYMTestCaseDesc Function ReadCancel() test, call two asynchronous reads consequently on the same file.
1.824 +//! Uses API elements: ReadCancel().
1.825 +//! @SYMTestActions 1. Create RFs session.
1.826 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0015.txt", EFileWrite.
1.827 +//! 3. Write message "short data" to file.
1.828 +//! 4. Close file
1.829 +//! 5. Open fail again with EFileShareAny | EFileReadAsyncAll.
1.830 +//! 6. Call RFile::Read() passing TRequestStatus.
1.831 +//! 7. Call RFile::Read() passing TRequestStatus.
1.832 +//! 8. Call ReadCancel.
1.833 +//! 9. Close RFile.
1.834 +//! 10. Delete file.
1.835 +//! 11. Close RFs.
1.836 +//!
1.837 +//! @SYMTestStatus Implemented
1.838 +//! @SYMTestPriority Critical
1.839 +//! @SYMTestExpectedResults Both TRequestStatuses return KErrCancel after ReadCancel.
1.840 +//!
1.841 +//! @SYMTestType CIT
1.842 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.843 + CREATE_OBJECT RFs RFs1
1.844 + CREATE_OBJECT RFile file
1.845 + COMMAND RFs1 new
1.846 + COMMAND RFs1 Connect
1.847 + COMMAND file new
1.848 + COMMAND file Replace PBASE-F32-File-PublicApi-0015-001-Replace_command005
1.849 + COMMAND file Write PBASE-F32-File-PublicApi-0015-001-Write_command006
1.850 + COMMAND file Close
1.851 + COMMAND file Open PBASE-F32-File-PublicApi-0015-001-Open_command008
1.852 + COMMAND file Seek PBASE-F32-File-PublicApi-0015-001-Seek_command009
1.853 + COMMAND !AsyncError=-3 file Read PBASE-F32-File-PublicApi-0015-001-Read_command010
1.854 + COMMAND !AsyncError=-3 file Read PBASE-F32-File-PublicApi-0015-001-Read_command011
1.855 + ASYNC_DELAY 5
1.856 + COMMAND file ReadCancel PBASE-F32-File-PublicApi-0015-001-ReadCancel_command012
1.857 + OUTSTANDING
1.858 + COMMAND file Close
1.859 + COMMAND file ~
1.860 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0015-001-Delete_command016
1.861 + COMMAND RFs1 ~
1.862 +END_TEST_BLOCK
1.863 +END_TESTCASE PBASE-F32-File-PublicApi-0015
1.864 +
1.865 +
1.866 +START_TESTCASE PBASE-F32-File-PublicApi-0016
1.867 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0016
1.868 +//! @SYMAPI RFile
1.869 +//! @SYMTestCaseDesc Synchronous Write(const TDesC8 &aDes) test - will open file and Write to it from given buffer.
1.870 +//! Uses API elements: Write(const TDesC8 &aDes).
1.871 +//! @SYMTestActions 1. Create RFs session
1.872 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0016.txt", EFileWrite
1.873 +//! 3. Call RFile::Write() passing "Write test".
1.874 +//! 4. Reset file position
1.875 +//! 5. Read from file to verify it's content.
1.876 +//! 6. Close RFile.
1.877 +//! 7. Delete file.
1.878 +//! 8. Close RFs.
1.879 +//!
1.880 +//! @SYMTestStatus Implemented
1.881 +//! @SYMTestPriority Critical
1.882 +//! @SYMTestExpectedResults RFile::Write() returns KErrNone. File contains written data.
1.883 +//!
1.884 +//! @SYMTestType CIT
1.885 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.886 + CREATE_OBJECT RFs RFs1
1.887 + CREATE_OBJECT RFile file
1.888 + COMMAND RFs1 new
1.889 + COMMAND RFs1 Connect
1.890 + COMMAND file new
1.891 + COMMAND file Replace PBASE-F32-File-PublicApi-0016-001-Replace_command005
1.892 + COMMAND file Write PBASE-F32-File-PublicApi-0016-001-Write_command006
1.893 + COMMAND file Flush
1.894 + COMMAND file Close
1.895 + COMMAND file Open PBASE-F32-File-PublicApi-0016-001-Open_command009
1.896 + COMMAND file Read PBASE-F32-File-PublicApi-0016-001-Read_command010
1.897 + COMMAND file Close
1.898 + COMMAND file ~
1.899 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0016-001-Delete_command014
1.900 + COMMAND RFs1 ~
1.901 +END_TEST_BLOCK
1.902 +END_TESTCASE PBASE-F32-File-PublicApi-0016
1.903 +
1.904 +
1.905 +START_TESTCASE PBASE-F32-File-PublicApi-0017
1.906 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0017
1.907 +//! @SYMAPI RFile
1.908 +//! @SYMTestCaseDesc Asynchronous Write(const TDesC8 &aDes, TRequestStatus &aStat) test - will open file and Write to it from given buffer.
1.909 +//! Uses API elements: Write(const TDesC8 &aDes, TRequestStatus &aStat).
1.910 +//! @SYMTestActions 1. Create RFs session.
1.911 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0017.txt", EFileWrite.
1.912 +//! 3. Call RFile::Write() passing "Asynchronous write test" and TRequestStatus.
1.913 +//! 4. Wait for request to complete.
1.914 +//! 5. Reset file position
1.915 +//! 6. Read from file to verify it's content.
1.916 +//! 7. Close RFile.
1.917 +//! 8. Delete file.
1.918 +//! 9. Close RFs.
1.919 +//!
1.920 +//! @SYMTestStatus Implemented
1.921 +//! @SYMTestPriority Critical
1.922 +//! @SYMTestExpectedResults Write completes with KErrNone. File contains written data.
1.923 +//!
1.924 +//! @SYMTestType CIT
1.925 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.926 + CREATE_OBJECT RFs RFs1
1.927 + CREATE_OBJECT RFile file
1.928 + COMMAND RFs1 new
1.929 + COMMAND RFs1 Connect
1.930 + COMMAND file new
1.931 + COMMAND file Replace PBASE-F32-File-PublicApi-0017-001-Replace_command005
1.932 + COMMAND file Write PBASE-F32-File-PublicApi-0017-001-Write_command006
1.933 + OUTSTANDING
1.934 + COMMAND file Flush
1.935 + COMMAND file Close
1.936 + COMMAND file Open PBASE-F32-File-PublicApi-0017-001-Open_command009
1.937 + COMMAND file Read PBASE-F32-File-PublicApi-0017-001-Read_command010
1.938 + COMMAND file Close
1.939 + COMMAND file ~
1.940 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0017-001-Delete_command014
1.941 + COMMAND RFs1 ~
1.942 +END_TEST_BLOCK
1.943 +END_TESTCASE PBASE-F32-File-PublicApi-0017
1.944 +
1.945 +
1.946 +START_TESTCASE PBASE-F32-File-PublicApi-0018
1.947 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0018
1.948 +//! @SYMAPI RFile
1.949 +//! @SYMTestCaseDesc Synchronous Write(const TDesC8 &aDes, TInt aLength) test - will open file and Write to it fixed length bytes from given buffer.
1.950 +//! Uses API elements: Write(const TDesC8 &aDes, TInt aLength).
1.951 +//! @SYMTestActions 1. Create RFs session
1.952 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0018.txt", EFileWrite
1.953 +//! 3. Call RFile::Write() passing "Synchronous write test with length", and 5 for length to write.
1.954 +//! 4. Reset file position
1.955 +//! 5. Read from file to verify it's content.
1.956 +//! 6. Close RFile.
1.957 +//! 7. Delete file.
1.958 +//! 8. Close RFs.
1.959 +//!
1.960 +//! @SYMTestStatus Implemented
1.961 +//! @SYMTestPriority Critical
1.962 +//! @SYMTestExpectedResults RFile::Write() returns KErrNone. File contains written data.
1.963 +//!
1.964 +//! @SYMTestType CIT
1.965 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.966 + CREATE_OBJECT RFs RFs1
1.967 + CREATE_OBJECT RFile file
1.968 + COMMAND RFs1 new
1.969 + COMMAND RFs1 Connect
1.970 + COMMAND file new
1.971 + COMMAND file Replace PBASE-F32-File-PublicApi-0018-001-Replace_command005
1.972 + COMMAND file Write PBASE-F32-File-PublicApi-0018-001-Write_command006
1.973 + COMMAND file Flush
1.974 + COMMAND file Close
1.975 + COMMAND file Open PBASE-F32-File-PublicApi-0018-001-Open_command009
1.976 + COMMAND file Read PBASE-F32-File-PublicApi-0018-001-Read_command010
1.977 + COMMAND file Close
1.978 + COMMAND file ~
1.979 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0018-001-Delete_command014
1.980 + COMMAND RFs1 ~
1.981 +END_TEST_BLOCK
1.982 +END_TESTCASE PBASE-F32-File-PublicApi-0018
1.983 +
1.984 +
1.985 +START_TESTCASE PBASE-F32-File-PublicApi-0019
1.986 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0019
1.987 +//! @SYMAPI RFile
1.988 +//! @SYMTestCaseDesc Asynchronous Write(const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus) test - will open file and Write to it fixed length bytes from given buffer.
1.989 +//! Uses API elements: Write(const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus).
1.990 +//! @SYMTestActions 1. Create RFs session.
1.991 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0019.txt", EFileWrite.
1.992 +//! 3. Call RFile::Write() passing "Asynchronous write test with length", 5 for length and TRequestStatus.
1.993 +//! 4. Wait for request to complete.
1.994 +//! 5. Reset file position
1.995 +//! 6. Read from file to verify it's content.
1.996 +//! 7. Close RFile.
1.997 +//! 8. Delete file.
1.998 +//! 9. Close RFs.
1.999 +//!
1.1000 +//! @SYMTestStatus Implemented
1.1001 +//! @SYMTestPriority Critical
1.1002 +//! @SYMTestExpectedResults Write completes with KErrNone. File contains written data.
1.1003 +//!
1.1004 +//! @SYMTestType CIT
1.1005 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1006 + CREATE_OBJECT RFs RFs1
1.1007 + CREATE_OBJECT RFile file
1.1008 + COMMAND RFs1 new
1.1009 + COMMAND RFs1 Connect
1.1010 + COMMAND file new
1.1011 + COMMAND file Replace PBASE-F32-File-PublicApi-0019-001-Replace_command005
1.1012 + COMMAND file Write PBASE-F32-File-PublicApi-0019-001-Write_command006
1.1013 + OUTSTANDING
1.1014 + COMMAND file Flush
1.1015 + COMMAND file Close
1.1016 + COMMAND file Open PBASE-F32-File-PublicApi-0019-001-Open_command009
1.1017 + COMMAND file Read PBASE-F32-File-PublicApi-0019-001-Read_command010
1.1018 + COMMAND file Close
1.1019 + COMMAND file ~
1.1020 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0019-001-Delete_command014
1.1021 + COMMAND RFs1 ~
1.1022 +END_TEST_BLOCK
1.1023 +END_TESTCASE PBASE-F32-File-PublicApi-0019
1.1024 +
1.1025 +
1.1026 +START_TESTCASE PBASE-F32-File-PublicApi-0020
1.1027 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0020
1.1028 +//! @SYMAPI RFile
1.1029 +//! @SYMTestCaseDesc Synchronous Write(TInt aPos, const TDesC8 &aDes) test - will open file and Write to it from given position.
1.1030 +//! Uses API elements: Write(TInt aPos, const TDesC8 &aDes).
1.1031 +//! @SYMTestActions 1. Create RFs session
1.1032 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0020.txt", EFileWrite
1.1033 +//! 4. Call RFile::Write() passing "Synchronous write test with position", and 2 for position to write from.
1.1034 +//! 5. Reset file position
1.1035 +//! 6. Read from file to verify it's content.
1.1036 +//! 7. Close RFile.
1.1037 +//! 8. Delete file.
1.1038 +//! 9. Close RFs.
1.1039 +//!
1.1040 +//! @SYMTestStatus Implemented
1.1041 +//! @SYMTestPriority Critical
1.1042 +//! @SYMTestExpectedResults RFile::Write() returns KErrNone. File contains written data.
1.1043 +//!
1.1044 +//! @SYMTestType CIT
1.1045 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1046 + CREATE_OBJECT RFs RFs1
1.1047 + CREATE_OBJECT RFile file
1.1048 + COMMAND RFs1 new
1.1049 + COMMAND RFs1 Connect
1.1050 + COMMAND file new
1.1051 + COMMAND file Replace PBASE-F32-File-PublicApi-0020-001-Replace_command005
1.1052 + COMMAND file Write PBASE-F32-File-PublicApi-0020-001-Write_command006
1.1053 + COMMAND file Flush
1.1054 + COMMAND file Write PBASE-F32-File-PublicApi-0020-001-Write_command008
1.1055 + COMMAND file Flush
1.1056 + COMMAND file Close
1.1057 + COMMAND file Open PBASE-F32-File-PublicApi-0020-001-Open_command011
1.1058 + COMMAND file Read PBASE-F32-File-PublicApi-0020-001-Read_command012
1.1059 + COMMAND file Close
1.1060 + COMMAND file ~
1.1061 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0020-001-Delete_command016
1.1062 + COMMAND RFs1 ~
1.1063 +END_TEST_BLOCK
1.1064 +END_TESTCASE PBASE-F32-File-PublicApi-0020
1.1065 +
1.1066 +
1.1067 +START_TESTCASE PBASE-F32-File-PublicApi-0021
1.1068 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0021
1.1069 +//! @SYMAPI RFile
1.1070 +//! @SYMTestCaseDesc Asynchronous Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus) test - will open file and Write to it from given position.
1.1071 +//! Uses API elements: Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus).
1.1072 +//! @SYMTestActions 1. Create RFs session.
1.1073 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0021.txt", EFileWrite.
1.1074 +//! 3. Call RFile::Write() passing "Asynchronous write test with position", 2 for position and TRequestStatus.
1.1075 +//! 4. Wait for request to complete.
1.1076 +//! 5. Reset file position
1.1077 +//! 6. Read from file to verify it's content.
1.1078 +//! 7. Close RFile.
1.1079 +//! 8. Delete file.
1.1080 +//! 9. Close RFs.
1.1081 +//!
1.1082 +//! @SYMTestStatus Implemented
1.1083 +//! @SYMTestPriority Critical
1.1084 +//! @SYMTestExpectedResults TRequestStatus equals KErrNone after writing. File contains written data.
1.1085 +//!
1.1086 +//! @SYMTestType CIT
1.1087 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1088 + CREATE_OBJECT RFs RFs1
1.1089 + CREATE_OBJECT RFile file
1.1090 + COMMAND RFs1 new
1.1091 + COMMAND RFs1 Connect
1.1092 + COMMAND file new
1.1093 + COMMAND file Replace PBASE-F32-File-PublicApi-0021-001-Replace_command005
1.1094 + COMMAND file Write PBASE-F32-File-PublicApi-0021-001-Write_command006
1.1095 + COMMAND file Flush
1.1096 + COMMAND file Write PBASE-F32-File-PublicApi-0021-001-Write_command008
1.1097 + OUTSTANDING
1.1098 + COMMAND file Flush
1.1099 + COMMAND file Close
1.1100 + COMMAND file Open PBASE-F32-File-PublicApi-0021-001-Open_command011
1.1101 + COMMAND file Read PBASE-F32-File-PublicApi-0021-001-Read_command012
1.1102 + COMMAND file Close
1.1103 + COMMAND file ~
1.1104 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0021-001-Delete_command016
1.1105 + COMMAND RFs1 ~
1.1106 +END_TEST_BLOCK
1.1107 +END_TESTCASE PBASE-F32-File-PublicApi-0021
1.1108 +
1.1109 +
1.1110 +START_TESTCASE PBASE-F32-File-PublicApi-0022
1.1111 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0022
1.1112 +//! @SYMAPI RFile
1.1113 +//! @SYMTestCaseDesc Synchronous Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test - will open file and Write to it from given position and fixed length of bytes.
1.1114 +//! Uses API elements: Write(TInt aPos, const TDesC8 &aDes, TInt aLength).
1.1115 +//! @SYMTestActions 1. Create RFs session
1.1116 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0022.txt", EFileWrite
1.1117 +//! 3. Call RFile::Write() passing "Synchronous write test with position, length", 2 for position and 4 for length to write from.
1.1118 +//! 4. Reset file position
1.1119 +//! 5. Read from file to verify it's content.
1.1120 +//! 6. Close RFile.
1.1121 +//! 7. Delete file.
1.1122 +//! 8. Close RFs.
1.1123 +//!
1.1124 +//! @SYMTestStatus Implemented
1.1125 +//! @SYMTestPriority Critical
1.1126 +//! @SYMTestExpectedResults RFile::Write() returns KErrNone. File contains written data.
1.1127 +//!
1.1128 +//! @SYMTestType CIT
1.1129 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1130 + CREATE_OBJECT RFs RFs1
1.1131 + CREATE_OBJECT RFile file
1.1132 + COMMAND RFs1 new
1.1133 + COMMAND RFs1 Connect
1.1134 + COMMAND file new
1.1135 + COMMAND file Replace PBASE-F32-File-PublicApi-0022-001-Replace_command005
1.1136 + COMMAND file Write PBASE-F32-File-PublicApi-0022-001-Write_command006
1.1137 + COMMAND file Flush
1.1138 + COMMAND file Write PBASE-F32-File-PublicApi-0022-001-Write_command008
1.1139 + COMMAND file Flush
1.1140 + COMMAND file Close
1.1141 + COMMAND file Open PBASE-F32-File-PublicApi-0022-001-Open_command011
1.1142 + COMMAND file Read PBASE-F32-File-PublicApi-0022-001-Read_command012
1.1143 + COMMAND file Close
1.1144 + COMMAND file ~
1.1145 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0022-001-Delete_command016
1.1146 + COMMAND RFs1 ~
1.1147 +END_TEST_BLOCK
1.1148 +END_TESTCASE PBASE-F32-File-PublicApi-0022
1.1149 +
1.1150 +
1.1151 +START_TESTCASE PBASE-F32-File-PublicApi-0023
1.1152 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0023
1.1153 +//! @SYMAPI RFile
1.1154 +//! @SYMTestCaseDesc Asynchronous Write(TInt aPos, const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus) test - will open file and Write to it from given position and fixed length of bytes.
1.1155 +//! Uses API elements: Write(TInt aPos, const TDesC8 &aDes, TInt aLength, TRequestStatus &aStatus).
1.1156 +//! @SYMTestActions 1. Create RFs session.
1.1157 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0023.txt", EFileWrite.
1.1158 +//! 3. Call RFile::Write() passing "Asynchronous write test with position, length",2 for position, 4 for length and TRequestStatus.
1.1159 +//! 4. Wait for request to complete.
1.1160 +//! 5. Reset file position
1.1161 +//! 6. Read from file to verify it's content.
1.1162 +//! 7. Close RFile.
1.1163 +//! 8. Delete file.
1.1164 +//! 9. Close RFs.
1.1165 +//!
1.1166 +//! @SYMTestStatus Implemented
1.1167 +//! @SYMTestPriority Critical
1.1168 +//! @SYMTestExpectedResults TRequestStatus equals KErrNone after writing. File contains written data.
1.1169 +//!
1.1170 +//! @SYMTestType CIT
1.1171 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1172 + CREATE_OBJECT RFs RFs1
1.1173 + CREATE_OBJECT RFile file
1.1174 + COMMAND RFs1 new
1.1175 + COMMAND RFs1 Connect
1.1176 + COMMAND file new
1.1177 + COMMAND file Replace PBASE-F32-File-PublicApi-0023-001-Replace_command005
1.1178 + COMMAND file Write PBASE-F32-File-PublicApi-0023-001-Write_command006
1.1179 + COMMAND file Flush
1.1180 + COMMAND file Write PBASE-F32-File-PublicApi-0023-001-Write_command008
1.1181 + OUTSTANDING
1.1182 + COMMAND file Flush
1.1183 + COMMAND file Close
1.1184 + COMMAND file Open PBASE-F32-File-PublicApi-0023-001-Open_command011
1.1185 + COMMAND file Read PBASE-F32-File-PublicApi-0023-001-Read_command012
1.1186 + COMMAND file Close
1.1187 + COMMAND file ~
1.1188 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0023-001-Delete_command016
1.1189 + COMMAND RFs1 ~
1.1190 +END_TEST_BLOCK
1.1191 +END_TESTCASE PBASE-F32-File-PublicApi-0023
1.1192 +
1.1193 +
1.1194 +START_TESTCASE PBASE-F32-File-PublicApi-0024
1.1195 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0024
1.1196 +//! @SYMAPI RFile
1.1197 +//! @SYMTestCaseDesc Function Lock(), UnLock test - open a file and lock it, then try to read from it from another RFs.
1.1198 +//! Uses API elements: Lock(), Unlock(), Read().
1.1199 +//! @SYMTestActions 1. Create RFs session
1.1200 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0024.txt", EFileWrite, open file as fileOne.
1.1201 +//! 3. Write "Lock test" to file.
1.1202 +//! 4. Lock the file by Calling Lock() with pos=0 and length=3.
1.1203 +//! 5. open "{Drives, RAMDriveTestPath}file\tc0024.txt" as fileTwo.
1.1204 +//! 6. read from the fileTwo.
1.1205 +//! 7. read from fileOne.
1.1206 +//! 8. unlock fileOne by RFile::Unlock(), with pos=0 and length=3.
1.1207 +//! 9. read from fileTwo.
1.1208 +//! 10. Close fileOne.
1.1209 +//! 11. Close fileTwo.
1.1210 +//! 12. Delete file.
1.1211 +//! 13. Close first RFs.
1.1212 +//!
1.1213 +//! @SYMTestStatus Implemented
1.1214 +//! @SYMTestPriority Critical
1.1215 +//! @SYMTestExpectedResults When fileOne is locked reading of fileTwo returns KErrLocked, Lock() returns KErrNone, UnLock returns KErrNone.
1.1216 +//! After fileOne is unlocked Reading of fileTwo returns KErrNone.
1.1217 +//!
1.1218 +//! @SYMTestType CIT
1.1219 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1220 + CREATE_OBJECT RFs RFs1
1.1221 + CREATE_OBJECT RFile file
1.1222 + CREATE_OBJECT RFile file2
1.1223 + COMMAND RFs1 new
1.1224 + COMMAND RFs1 Connect
1.1225 + COMMAND file new
1.1226 + COMMAND file Replace PBASE-F32-File-PublicApi-0024-001-Replace_command005
1.1227 + COMMAND file2 new
1.1228 + COMMAND file2 Open PBASE-F32-File-PublicApi-0024-001-Open_command008
1.1229 + COMMAND file Write PBASE-F32-File-PublicApi-0024-001-Write_command010
1.1230 + COMMAND file Lock PBASE-F32-File-PublicApi-0024-001-Lock_command011
1.1231 + COMMAND !Error=-22 file2 Read
1.1232 + COMMAND file Read
1.1233 + COMMAND file UnLock PBASE-F32-File-PublicApi-0024-001-UnLock_command016
1.1234 + COMMAND file2 Read
1.1235 + COMMAND file2 Close
1.1236 + COMMAND file2 ~
1.1237 + COMMAND file Close
1.1238 + COMMAND file ~
1.1239 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0024-001-Delete_command025
1.1240 + COMMAND RFs1 ~
1.1241 +END_TEST_BLOCK
1.1242 +END_TESTCASE PBASE-F32-File-PublicApi-0024
1.1243 +
1.1244 +
1.1245 +START_TESTCASE PBASE-F32-File-PublicApi-0025
1.1246 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0025
1.1247 +//! @SYMAPI RFile
1.1248 +//! @SYMTestCaseDesc Function Seek() test - open a file and and get it's current position.
1.1249 +//! Uses API elements: Seek(), Read().
1.1250 +//! @SYMTestActions 1. Create RFs session
1.1251 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0025.txt", EFileWrite.
1.1252 +//! 3. Write "Should seek to pos here" to file.
1.1253 +//! 3. Call RFile::Seek passing ESeekStart, 19
1.1254 +//! 4. Call RFile::Read;
1.1255 +//! 5. Close file.
1.1256 +//! 6. Delete file.
1.1257 +//! 7. Close RFs.
1.1258 +//!
1.1259 +//! @SYMTestStatus Implemented
1.1260 +//! @SYMTestPriority Critical
1.1261 +//! @SYMTestExpectedResults Seek() returns KErrNone, buffer contents equals string literal "here".
1.1262 +//!
1.1263 +//! @SYMTestType CIT
1.1264 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1265 + CREATE_OBJECT RFs RFs1
1.1266 + CREATE_OBJECT RFile file
1.1267 + COMMAND RFs1 new
1.1268 + COMMAND RFs1 Connect
1.1269 + COMMAND file new
1.1270 + COMMAND file Replace PBASE-F32-File-PublicApi-0025-001-Replace_command005
1.1271 + COMMAND file Write PBASE-F32-File-PublicApi-0025-001-Write_command006
1.1272 + COMMAND file Seek PBASE-F32-File-PublicApi-0025-001-Seek_command007
1.1273 + COMMAND file Read PBASE-F32-File-PublicApi-0025-001-Read_command008
1.1274 + COMMAND file Close
1.1275 + COMMAND file ~
1.1276 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0025-001-Delete_command012
1.1277 + COMMAND RFs1 ~
1.1278 +END_TEST_BLOCK
1.1279 +END_TESTCASE PBASE-F32-File-PublicApi-0025
1.1280 +
1.1281 +
1.1282 +START_TESTCASE PBASE-F32-File-PublicApi-0125
1.1283 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0125
1.1284 +//! @SYMAPI RFile
1.1285 +//! @SYMTestCaseDesc Function Seek() test - test TSeek::ESeekCurrent.
1.1286 +//! Uses API elements: Seek(), Read().
1.1287 +//! @SYMTestActions 1. Create RFs session
1.1288 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0125.txt", EFileWrite.
1.1289 +//! 3. Write "Should seek to pos here" to file.
1.1290 +//! 3. Call RFile::Seek passing ESeekStart, 0
1.1291 +//! 4. Call RFile::Read passing 7 for length.
1.1292 +//! 5. Call RFile::Seek passing ESeekCurrent, 5.
1.1293 +//! 6. Call RFile::Read().
1.1294 +//! 7. Close file.
1.1295 +//! 8. Delete file.
1.1296 +//! 9. Close RFs.
1.1297 +//!
1.1298 +//! @SYMTestStatus Implemented
1.1299 +//! @SYMTestPriority Critical
1.1300 +//! @SYMTestExpectedResults Seek() returns KErrNone, step 6 returns "to pos here".
1.1301 +//!
1.1302 +//! @SYMTestType CIT
1.1303 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1304 + CREATE_OBJECT RFs RFs1
1.1305 + CREATE_OBJECT RFile file
1.1306 + COMMAND RFs1 new
1.1307 + COMMAND RFs1 Connect
1.1308 + COMMAND file new
1.1309 + COMMAND file Replace PBASE-F32-File-PublicApi-0125-001-Replace_command005
1.1310 + COMMAND file Write PBASE-F32-File-PublicApi-0125-001-Write_command006
1.1311 + COMMAND file Seek PBASE-F32-File-PublicApi-0125-001-Seek_command007
1.1312 + COMMAND file Read PBASE-F32-File-PublicApi-0125-001-Read_command008
1.1313 + COMMAND file Seek PBASE-F32-File-PublicApi-0125-001-Seek_command009
1.1314 + COMMAND file Read PBASE-F32-File-PublicApi-0125-001-Read_command010
1.1315 + COMMAND file Close
1.1316 + COMMAND file ~
1.1317 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0125-001-Delete_command014
1.1318 + COMMAND RFs1 ~
1.1319 +END_TEST_BLOCK
1.1320 +END_TESTCASE PBASE-F32-File-PublicApi-0125
1.1321 +
1.1322 +START_TESTCASE PBASE-F32-File-PublicApi-0026
1.1323 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0026
1.1324 +//! @SYMAPI RFile
1.1325 +//! @SYMTestCaseDesc Function Flush() test - open file, write to it and then flush.
1.1326 +//! Uses API elements: Open(), Flush(), Write().
1.1327 +//! @SYMTestActions 1. Create RFs session
1.1328 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0026.txt", EFileWrite.
1.1329 +//! 5. Call RFile::Write() passing "This data should be flushed".
1.1330 +//! 4. Call RFile::Flush();
1.1331 +//! 5. Close file.
1.1332 +//! 6. Close RFs.
1.1333 +//!
1.1334 +//! @SYMTestStatus Implemented
1.1335 +//! @SYMTestPriority Critical
1.1336 +//! @SYMTestExpectedResults RFile::Flush() returns KErrNone. File contains written data.
1.1337 +//!
1.1338 +//! @SYMTestType CIT
1.1339 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1340 + CREATE_OBJECT RFs RFs1
1.1341 + CREATE_OBJECT RFile file
1.1342 + COMMAND RFs1 new
1.1343 + COMMAND RFs1 Connect
1.1344 + COMMAND file new
1.1345 + COMMAND file Replace PBASE-F32-File-PublicApi-0026-001-Replace_command005
1.1346 + COMMAND file Write PBASE-F32-File-PublicApi-0026-001-Write_command006
1.1347 + COMMAND file Flush
1.1348 + COMMAND file Seek PBASE-F32-File-PublicApi-0026-001-Seek_command008
1.1349 + COMMAND file Read PBASE-F32-File-PublicApi-0026-001-Read_command009
1.1350 + COMMAND file Close
1.1351 + COMMAND file ~
1.1352 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0026-001-Delete_command011
1.1353 + COMMAND RFs1 ~
1.1354 +END_TEST_BLOCK
1.1355 +END_TESTCASE PBASE-F32-File-PublicApi-0026
1.1356 +
1.1357 +
1.1358 +START_TESTCASE PBASE-F32-File-PublicApi-0027
1.1359 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0027
1.1360 +//! @SYMAPI RFile
1.1361 +//! @SYMTestCaseDesc Asynchronous Flush() test - open file, write to it and then flush.
1.1362 +//! Uses API elements: Open(), Flush(), Write().
1.1363 +//! @SYMTestActions 1. Create RFs session.
1.1364 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0027.txt", EFileWrite.
1.1365 +//! 3. Call RFile::Write() passing literal "This data should be flushed".
1.1366 +//! 4. Call RFile::Flush() passing TRequestStatus.
1.1367 +//! 5. Wait for request to complete.
1.1368 +//! 6. Close RFile.
1.1369 +//! 7. Delete file.
1.1370 +//! 8. Close RFs.
1.1371 +//!
1.1372 +//! @SYMTestStatus Implemented
1.1373 +//! @SYMTestPriority Critical
1.1374 +//! @SYMTestExpectedResults TRequestStatus returns KErrNone. File contains written data.
1.1375 +//!
1.1376 +//! @SYMTestType CIT
1.1377 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1378 + CREATE_OBJECT RFs RFs1
1.1379 + CREATE_OBJECT RFile file
1.1380 + COMMAND RFs1 new
1.1381 + COMMAND RFs1 Connect
1.1382 + COMMAND file new
1.1383 + COMMAND file Replace PBASE-F32-File-PublicApi-0027-001-Replace_command005
1.1384 + COMMAND file Write PBASE-F32-File-PublicApi-0027-001-Write_command006
1.1385 + COMMAND file Flush PBASE-F32-File-PublicApi-0027-001-Flush_command007
1.1386 + OUTSTANDING
1.1387 + COMMAND file Seek PBASE-F32-File-PublicApi-0027-001-Seek_command008
1.1388 + COMMAND file Read PBASE-F32-File-PublicApi-0027-001-Read_command009
1.1389 + COMMAND file Close
1.1390 + COMMAND file ~
1.1391 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0027-001-Delete_command011
1.1392 + COMMAND RFs1 ~
1.1393 +END_TEST_BLOCK
1.1394 +END_TESTCASE PBASE-F32-File-PublicApi-0027
1.1395 +
1.1396 +
1.1397 +START_TESTCASE PBASE-F32-File-PublicApi-0028
1.1398 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0028
1.1399 +//! @SYMAPI RFile
1.1400 +//! @SYMTestCaseDesc Function SetSize, Size() test - open file and set it's size, then get it.
1.1401 +//! Uses API elements: Open(), Flush(), Write().
1.1402 +//! @SYMTestActions 1. Create RFs session.
1.1403 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0028.txt", EFileWrite.
1.1404 +//! 3. Write literal "Size test this text should be truncated" to file.
1.1405 +//! 4. Call RFile::SetSize() passing it 10 for size.
1.1406 +//! 5. Call RFile::Size.
1.1407 +//! 6. Close RFile.
1.1408 +//! 7. Delete file.
1.1409 +//! 8. Close RFs.
1.1410 +//!
1.1411 +//! @SYMTestStatus Implemented
1.1412 +//! @SYMTestPriority Critical
1.1413 +//! @SYMTestExpectedResults RFile::Size, RFile::SetSize returns KErrNone(). aSize equals with the size of file.
1.1414 +//!
1.1415 +//! @SYMTestType CIT
1.1416 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1417 + CREATE_OBJECT RFs RFs1
1.1418 + CREATE_OBJECT RFile file
1.1419 + COMMAND RFs1 new
1.1420 + COMMAND RFs1 Connect
1.1421 + COMMAND file new
1.1422 + COMMAND file Replace PBASE-F32-File-PublicApi-0028-001-Replace_command005
1.1423 + COMMAND file Write PBASE-F32-File-PublicApi-0028-001-Write_command006
1.1424 + COMMAND file SetSize PBASE-F32-File-PublicApi-0028-001-SetSize_command007
1.1425 + COMMAND file Size PBASE-F32-File-PublicApi-0028-001-Size_command008
1.1426 + COMMAND file Close
1.1427 + COMMAND file ~
1.1428 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0028-001-Delete_command012
1.1429 + COMMAND RFs1 ~
1.1430 +END_TEST_BLOCK
1.1431 +END_TESTCASE PBASE-F32-File-PublicApi-0028
1.1432 +
1.1433 +
1.1434 +START_TESTCASE PBASE-F32-File-PublicApi-0029
1.1435 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0029
1.1436 +//! @SYMAPI RFile
1.1437 +//! @SYMTestCaseDesc Function Att(), SetAtt test - open file and get it's attributes.
1.1438 +//! Uses API elements: Open(), Att().
1.1439 +//! @SYMTestActions 1. Create RFs session.
1.1440 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0029.txt", EFileWrite.
1.1441 +//! 3. Write "SetAtt test" to file.
1.1442 +//! 4. Call RFile::SetAtt, passing KEntryAttNormal, KEntryAttReadOnly
1.1443 +//! 5. Flush data to file.
1.1444 +//! 6. Close file.
1.1445 +//! 7. Open file.
1.1446 +//! 8. Call RFile::Att().
1.1447 +//! 9. Close RFile.
1.1448 +//! 10. Delete file.
1.1449 +//! 11. Close RFs.
1.1450 +//!
1.1451 +//! @SYMTestStatus Implemented
1.1452 +//! @SYMTestPriority Critical
1.1453 +//! @SYMTestExpectedResults RFile::Att(), RFile::SetAtt returns KErrNone, aAttValue & KEntryAttNormal equals KEntryAttNormal.
1.1454 +//!
1.1455 +//! @SYMTestType CIT
1.1456 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1457 + CREATE_OBJECT RFs RFs1
1.1458 + CREATE_OBJECT RFile file
1.1459 + COMMAND RFs1 new
1.1460 + COMMAND RFs1 Connect
1.1461 + COMMAND file new
1.1462 + COMMAND file Replace PBASE-F32-File-PublicApi-0029-001-Replace_command005
1.1463 + COMMAND file Write PBASE-F32-File-PublicApi-0029-001-Write_command006
1.1464 + COMMAND file SetAtt PBASE-F32-File-PublicApi-0029-001-SetAtt_command007
1.1465 + COMMAND file Flush
1.1466 + COMMAND file Close
1.1467 + COMMAND file Open PBASE-F32-File-PublicApi-0029-001-Open_command010
1.1468 + COMMAND file Att PBASE-F32-File-PublicApi-0029-001-Att_command011
1.1469 + COMMAND file Close
1.1470 + COMMAND file ~
1.1471 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0029-001-Delete_command015
1.1472 + COMMAND RFs1 ~
1.1473 +END_TEST_BLOCK
1.1474 +END_TESTCASE PBASE-F32-File-PublicApi-0029
1.1475 +
1.1476 +
1.1477 +START_TESTCASE PBASE-F32-File-PublicApi-0030
1.1478 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0030
1.1479 +//! @SYMAPI RFile
1.1480 +//! @SYMTestCaseDesc Function Modified(), SetModified test - open file and get/set it's modification time.
1.1481 +//! Uses API elements: Open(), Modified(), SetModified().
1.1482 +//! @SYMTestActions 1. Create RFs session.
1.1483 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0030.txt", EFileWrite.
1.1484 +//! 3. Call RFile::SetModified, passing 20070118:
1.1485 +//! 4. Close the file.
1.1486 +//! 5. Open the file.
1.1487 +//! 6. Call RFile::Modified().
1.1488 +//! 7. Close RFile.
1.1489 +//! 8. Delete file.
1.1490 +//! 9. Close RFs.
1.1491 +//!
1.1492 +//! @SYMTestStatus Implemented
1.1493 +//! @SYMTestPriority Critical
1.1494 +//! @SYMTestExpectedResults RFile::Modified(), RFile::SetModified returns KErrNone. Modified returns same date as was set with SetModified.
1.1495 +//!
1.1496 +//! @SYMTestType CIT
1.1497 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1498 + CREATE_OBJECT RFs RFs1
1.1499 + CREATE_OBJECT RFile file
1.1500 + COMMAND RFs1 new
1.1501 + COMMAND RFs1 Connect
1.1502 + COMMAND file new
1.1503 + COMMAND file Replace PBASE-F32-File-PublicApi-0030-001-Replace_command005
1.1504 + COMMAND file SetModified PBASE-F32-File-PublicApi-0030-001-SetModified_command006
1.1505 + COMMAND file Close
1.1506 + COMMAND file Open PBASE-F32-File-PublicApi-0030-001-Open_command008
1.1507 + COMMAND file Modified PBASE-F32-File-PublicApi-0030-001-Modified_command009
1.1508 + COMMAND file Close
1.1509 + COMMAND file ~
1.1510 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0030-001-Delete_command012
1.1511 + COMMAND RFs1 ~
1.1512 +END_TEST_BLOCK
1.1513 +END_TESTCASE PBASE-F32-File-PublicApi-0030
1.1514 +
1.1515 +
1.1516 +START_TESTCASE PBASE-F32-File-PublicApi-0031
1.1517 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0031
1.1518 +//! @SYMAPI RFile
1.1519 +//! @SYMTestCaseDesc Function Set() test - open file and set it's modification time and attributes.
1.1520 +//! Uses API elements: Open(), Set(), Modified(), Att().
1.1521 +//! @SYMTestActions 1. Create RFs session.
1.1522 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0031.txt", EFileShareAny.
1.1523 +//! 3. Call RFile::Set() passing it 20070118:, KEntryAttArchive, KEntryAttReadOnly.
1.1524 +//! 4. Call RFile::Modified() to validate modification date.
1.1525 +//! 5. Call RFile::Att() to validate attributes.
1.1526 +//! 6. Close RFile.
1.1527 +//! 7. Delete file.
1.1528 +//! 8. Close RFs.
1.1529 +//!
1.1530 +//! @SYMTestStatus Implemented
1.1531 +//! @SYMTestPriority Critical
1.1532 +//! @SYMTestExpectedResults RFile::Set() returns KErrNone. Data and attributes are validated.
1.1533 +//!
1.1534 +//! @SYMTestType CIT
1.1535 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1536 + CREATE_OBJECT RFs RFs1
1.1537 + CREATE_OBJECT RFile file
1.1538 + COMMAND RFs1 new
1.1539 + COMMAND RFs1 Connect
1.1540 + COMMAND file new
1.1541 + COMMAND file Replace PBASE-F32-File-PublicApi-0031-001-Replace_command005
1.1542 + COMMAND file Set PBASE-F32-File-PublicApi-0031-001-Set_command006
1.1543 + COMMAND file Att PBASE-F32-File-PublicApi-0031-001-Att_command007
1.1544 + COMMAND file Modified PBASE-F32-File-PublicApi-0031-001-Modified_command008
1.1545 + COMMAND file Close
1.1546 + COMMAND file ~
1.1547 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0031-001-Delete_command012
1.1548 + COMMAND RFs1 ~
1.1549 +END_TEST_BLOCK
1.1550 +END_TESTCASE PBASE-F32-File-PublicApi-0031
1.1551 +
1.1552 +
1.1553 +START_TESTCASE PBASE-F32-File-PublicApi-0032
1.1554 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0032
1.1555 +//! @SYMAPI RFile
1.1556 +//! @SYMTestCaseDesc Function ChangeMode() test - open file and change it's access mode.
1.1557 +//! Uses API elements: Open(), SetModified().
1.1558 +//! @SYMTestActions 1. Create RFs session.
1.1559 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0032.txt".
1.1560 +//! 3. Close file.
1.1561 +//! 4. open the file in EFileShareExclusive mode.
1.1562 +//! 5. Call RFile::ChangeMode() passing it EFileShareReadersOnly.
1.1563 +//! 6. Close RFile.
1.1564 +//! 7. Delete file.
1.1565 +//! 8. Close RFs.
1.1566 +//!
1.1567 +//! @SYMTestStatus Implemented
1.1568 +//! @SYMTestPriority Critical
1.1569 +//! @SYMTestExpectedResults RFile::ChangeMode() returns KErrNone. Filemode is EFileSareReadersOnly.
1.1570 +//!
1.1571 +//! @SYMTestType CIT
1.1572 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1573 + CREATE_OBJECT RFs RFs1
1.1574 + CREATE_OBJECT RFile file
1.1575 + COMMAND RFs1 new
1.1576 + COMMAND RFs1 Connect
1.1577 + COMMAND file new
1.1578 + COMMAND file Replace PBASE-F32-File-PublicApi-0032-001-Replace_command005
1.1579 + COMMAND file Close
1.1580 + COMMAND file Open PBASE-F32-File-PublicApi-0032-001-Open_command007
1.1581 + COMMAND file ChangeMode PBASE-F32-File-PublicApi-0032-001-ChangeMode_command008
1.1582 + COMMAND file Close
1.1583 + COMMAND file ~
1.1584 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0032-001-Delete_command012
1.1585 + COMMAND RFs1 ~
1.1586 +END_TEST_BLOCK
1.1587 +END_TESTCASE PBASE-F32-File-PublicApi-0032
1.1588 +
1.1589 +
1.1590 +START_TESTCASE PBASE-F32-File-PublicApi-0033
1.1591 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0033
1.1592 +//! @SYMAPI RFile
1.1593 +//! @SYMTestCaseDesc Function Rename() test - open file and rename it.
1.1594 +//! Uses API elements: Open(), RFile::Rename().
1.1595 +//! @SYMTestActions 1. Create RFs session.
1.1596 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0033.txt", EFileShareExclusive | EFileWrite.
1.1597 +//! 3. Call RFile::Rename() passing it string literal "test_renamed.txt".
1.1598 +//! 4. Call RFile::Name.
1.1599 +//! 5. rename the file back to tc0033.txt
1.1600 +//! 6. Delete file.
1.1601 +//! 7. Close resources.
1.1602 +//!
1.1603 +//! @SYMTestStatus Implemented
1.1604 +//! @SYMTestPriority Critical
1.1605 +//! @SYMTestExpectedResults RFile::Rename() returns KErrNone. File is renamed.
1.1606 +//!
1.1607 +//! @SYMTestType CIT
1.1608 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1609 + CREATE_OBJECT RFs RFs1
1.1610 + CREATE_OBJECT RFile file
1.1611 + COMMAND RFs1 new
1.1612 + COMMAND RFs1 Connect
1.1613 + COMMAND file new
1.1614 + COMMAND file Replace PBASE-F32-File-PublicApi-0033-001-Replace_command005
1.1615 + COMMAND file Rename PBASE-F32-File-PublicApi-0033-001-Rename_command006
1.1616 + COMMAND file Name
1.1617 + COMMAND file Rename PBASE-F32-File-PublicApi-0033-001-Rename_command008
1.1618 + COMMAND file Close
1.1619 + COMMAND file ~
1.1620 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0033-001-Delete_command012
1.1621 + COMMAND RFs1 ~
1.1622 +END_TEST_BLOCK
1.1623 +END_TESTCASE PBASE-F32-File-PublicApi-0033
1.1624 +
1.1625 +
1.1626 +START_TESTCASE PBASE-F32-File-PublicApi-0034
1.1627 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0034
1.1628 +//! @SYMAPI RFile
1.1629 +//! @SYMTestCaseDesc Function Drive() test - open file and get it's drive info.
1.1630 +//! Uses API elements: RFile::Drive().
1.1631 +//! @SYMTestActions 1. Create RFs session.
1.1632 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0034.txt", EFileShareAny.
1.1633 +//! 3. Call RFile::Drive().
1.1634 +//! 4. Close RFile.
1.1635 +//! 5. Delete file.
1.1636 +//! 6. Close RFs.
1.1637 +//!
1.1638 +//! @SYMTestStatus Implemented
1.1639 +//! @SYMTestPriority Critical
1.1640 +//! @SYMTestExpectedResults RFile::Drive() returns KErrNone.
1.1641 +//!
1.1642 +//! @SYMTestType CIT
1.1643 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1644 + CREATE_OBJECT RFs RFs1
1.1645 + CREATE_OBJECT RFile file
1.1646 + COMMAND RFs1 new
1.1647 + COMMAND RFs1 Connect
1.1648 + COMMAND file new
1.1649 + COMMAND file Replace PBASE-F32-File-PublicApi-0034-001-Replace_command005
1.1650 + COMMAND file Drive PBASE-F32-File-PublicApi-0034-001-Drive_command006
1.1651 + COMMAND file Close
1.1652 + COMMAND file ~
1.1653 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0034-001-Delete_command010
1.1654 + COMMAND RFs1 ~
1.1655 +END_TEST_BLOCK
1.1656 +END_TESTCASE PBASE-F32-File-PublicApi-0034
1.1657 +
1.1658 +
1.1659 +START_TESTCASE PBASE-F32-File-PublicApi-0039
1.1660 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0039
1.1661 +//! @SYMAPI RFile
1.1662 +//! @SYMTestCaseDesc Function Name() test. Open a file and get it's name.
1.1663 +//! Uses API elements: Name().
1.1664 +//! @SYMTestActions 1. Create RFs session
1.1665 +//! 2. Open file "{Drives, RAMDriveTestPath}file\tc0039.txt" as file1
1.1666 +//! 3. Call RFile::Name().
1.1667 +//! 4. Close file system.
1.1668 +//! 5. Delete file.
1.1669 +//! 6. Close file.
1.1670 +//!
1.1671 +//! @SYMTestStatus Implemented
1.1672 +//! @SYMTestPriority Critical
1.1673 +//! @SYMTestExpectedResults RFile::Name() returns KErrNone. File name is verified.
1.1674 +//!
1.1675 +//! @SYMTestType CIT
1.1676 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1677 + CREATE_OBJECT RFs RFs1
1.1678 + CREATE_OBJECT RFile file
1.1679 + COMMAND RFs1 new
1.1680 + COMMAND RFs1 Connect
1.1681 + COMMAND file new
1.1682 + COMMAND file Replace PBASE-F32-File-PublicApi-0039-001-Replace_command005
1.1683 + COMMAND file Name PBASE-F32-File-PublicApi-0039-001-Name_command006
1.1684 + COMMAND file Close
1.1685 + COMMAND file ~
1.1686 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0039-001-Delete_command010
1.1687 + COMMAND RFs1 ~
1.1688 +END_TEST_BLOCK
1.1689 +END_TESTCASE PBASE-F32-File-PublicApi-0039
1.1690 +
1.1691 +
1.1692 +START_TESTCASE PBASE-F32-File-PublicApi-0040
1.1693 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0040
1.1694 +//! @SYMAPI RFile
1.1695 +//! @SYMTestCaseDesc Function Duplicate() test. Duplicate a file and compare it size to original.
1.1696 +//! Uses API elements: Duplicate().
1.1697 +//! @SYMTestActions 1. Create RFs session
1.1698 +//! 2. Replace file "{Drives, RAMDriveTestPath}file\tc0040.txt" as file1, with EFileWrite permission
1.1699 +//! 3. Write "Duplicate Test" to file
1.1700 +//! 4. Create file2 by calling RFile::Duplicate(), passing reference to file1.
1.1701 +//! 5. Read from file2 to verify that file1 has been duplicated.
1.1702 +//! 6. Close file1.
1.1703 +//! 7. Close file2.
1.1704 +//! 8. Delete file1
1.1705 +//! 9. Close fs session.
1.1706 +//!
1.1707 +//! @SYMTestStatus Implemented
1.1708 +//! @SYMTestPriority Critical
1.1709 +//! @SYMTestExpectedResults RFile::Duplicate() returns KErrNone. The content of file1 and file2 is equal.
1.1710 +//!
1.1711 +//! @SYMTestType CIT
1.1712 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1713 + CREATE_OBJECT RFs RFs1
1.1714 + CREATE_OBJECT RFile file
1.1715 + CREATE_OBJECT RFile file2
1.1716 + COMMAND RFs1 new
1.1717 + COMMAND RFs1 Connect
1.1718 + COMMAND file new
1.1719 + COMMAND file Replace PBASE-F32-File-PublicApi-0040-001-Replace_command005
1.1720 + COMMAND file Write PBASE-F32-File-PublicApi-0040-001-Write_command006
1.1721 + COMMAND file Seek PBASE-F32-File-PublicApi-0040-001-Seek_command007
1.1722 + COMMAND file2 new
1.1723 + COMMAND file2 Duplicate PBASE-F32-File-PublicApi-0040-001-Duplicate_command010
1.1724 + COMMAND file2 Read PBASE-F32-File-PublicApi-0040-001-Read_command011
1.1725 + COMMAND file2 Close
1.1726 + COMMAND file2 ~
1.1727 + COMMAND file Close
1.1728 + COMMAND file ~
1.1729 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0040-001-Delete_command017
1.1730 + COMMAND RFs1 ~
1.1731 +END_TEST_BLOCK
1.1732 +END_TESTCASE PBASE-F32-File-PublicApi-0040
1.1733 +
1.1734 +
1.1735 +START_TESTCASE PBASE-F32-File-PublicApi-1040
1.1736 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1040
1.1737 +//! @SYMAPI RFile
1.1738 +//! @SYMTestCaseDesc Function Duplicate() with aType = EOwnerThread test. Duplicate file and compare it size to original.
1.1739 +//! Uses API elements: Duplicate().
1.1740 +//! @SYMTestActions 1. Create RFs session
1.1741 +//! 2. Replace file "{Drives, RAMDriveTestPath}file\tc1040.txt" as file1, with EFileWrite permission
1.1742 +//! 3. Write "Duplicate Test" to file
1.1743 +//! 4. Create file2 by calling RFile::Duplicate(), passing reference to file1.
1.1744 +//! 5. Read from file2 to verify that file1 has been duplicated.
1.1745 +//! 6. Close file1.
1.1746 +//! 7. Close file2.
1.1747 +//! 8. Delete file1.
1.1748 +//! 9. Close fs session.
1.1749 +//!
1.1750 +//! @SYMTestStatus Implemented
1.1751 +//! @SYMTestPriority Critical
1.1752 +//! @SYMTestExpectedResults RFile::Duplicate() returns KErrNone. The content of file1 and file2 is equal.
1.1753 +//!
1.1754 +//! @SYMTestType CIT
1.1755 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1756 + CREATE_OBJECT RFs RFs1
1.1757 + CREATE_OBJECT RFile file
1.1758 + CREATE_OBJECT RFile file2
1.1759 + COMMAND RFs1 new
1.1760 + COMMAND RFs1 Connect
1.1761 + COMMAND file new
1.1762 + COMMAND file Replace PBASE-F32-File-PublicApi-1040-001-Replace_command005
1.1763 + COMMAND file Write PBASE-F32-File-PublicApi-1040-001-Write_command006
1.1764 + COMMAND file Seek PBASE-F32-File-PublicApi-1040-001-Seek_command007
1.1765 + COMMAND file2 new
1.1766 + COMMAND file2 Duplicate PBASE-F32-File-PublicApi-1040-001-Duplicate_command010
1.1767 + COMMAND file2 Read PBASE-F32-File-PublicApi-1040-001-Read_command011
1.1768 + COMMAND file2 Close
1.1769 + COMMAND file2 ~
1.1770 + COMMAND file Close
1.1771 + COMMAND file ~
1.1772 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1040-001-Delete_command017
1.1773 + COMMAND RFs1 ~
1.1774 +END_TEST_BLOCK
1.1775 +END_TESTCASE PBASE-F32-File-PublicApi-1040
1.1776 +
1.1777 +
1.1778 +START_TESTCASE PBASE-F32-File-PublicApi-0041
1.1779 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0041
1.1780 +//! @SYMAPI RFile
1.1781 +//! @SYMTestCaseDesc Function FullName() test. Open a file and get it's full name.
1.1782 +//! Uses API elements: FullName().
1.1783 +//! @SYMTestActions 1. Create RFs session
1.1784 +//! 2. Replace file "{Drives, RAMDriveTestPath}file\tc0041.txt"
1.1785 +//! 3. Call FullName.
1.1786 +//! 4. Close file.
1.1787 +//! 5. Delete file.
1.1788 +//! 6. Close fs session.
1.1789 +//!
1.1790 +//!
1.1791 +//! @SYMTestStatus Implemented
1.1792 +//! @SYMTestPriority Critical
1.1793 +//! @SYMTestExpectedResults RFile::FullName returns KErrNone. Descriptor retrieved from FullName is equal to the path and name of the file.
1.1794 +//!
1.1795 +//! @SYMTestType CIT
1.1796 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1797 + CREATE_OBJECT RFs RFs1
1.1798 + CREATE_OBJECT RFile file
1.1799 + COMMAND RFs1 new
1.1800 + COMMAND RFs1 Connect
1.1801 + COMMAND file new
1.1802 + COMMAND file Replace PBASE-F32-File-PublicApi-0041-001-Replace_command005
1.1803 + COMMAND file FullName PBASE-F32-File-PublicApi-0041-001-FullName_command006
1.1804 + COMMAND file Close
1.1805 + COMMAND file ~
1.1806 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0041-001-Delete_command010
1.1807 + COMMAND RFs1 ~
1.1808 +END_TEST_BLOCK
1.1809 +END_TESTCASE PBASE-F32-File-PublicApi-0041
1.1810 +
1.1811 +
1.1812 +//////////////////////////////////////////////////////////////////////
1.1813 +//////////////////////////////////////////////////////////////////////
1.1814 +////// //////
1.1815 +////// /////////////////////////////////// //////
1.1816 +////// /// /// //////
1.1817 +////// /// NEGATIVE TESTS /// //////
1.1818 +////// /// /// //////
1.1819 +////// /////////////////////////////////// //////
1.1820 +////// //////
1.1821 +//////////////////////////////////////////////////////////////////////
1.1822 +//////////////////////////////////////////////////////////////////////
1.1823 +
1.1824 +
1.1825 +START_TESTCASE PBASE-F32-File-PublicApi-0101
1.1826 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0101
1.1827 +//! @SYMAPI RFile
1.1828 +//! @SYMTestCaseDesc Function Open() neg. test. Call open with invalid path.
1.1829 +//! Uses API elements: Open().
1.1830 +//! @SYMTestActions 1. Create RFs session
1.1831 +//! 2. Open file "{Drives, RAMDriveTestPath}file\base\chickenfarm\chicken.txt"
1.1832 +//! 3. Close fs.
1.1833 +//!
1.1834 +//! @SYMTestStatus Implemented
1.1835 +//! @SYMTestPriority Critical
1.1836 +//! @SYMTestExpectedResults open returns KErrPathNotFound! on step 2.
1.1837 +//!
1.1838 +//! @SYMTestType CIT
1.1839 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1840 + CREATE_OBJECT RFs RFs1
1.1841 + CREATE_OBJECT RFile file
1.1842 + COMMAND RFs1 new
1.1843 + COMMAND RFs1 Connect
1.1844 + COMMAND file new
1.1845 + COMMAND !Error=-12 file Open PBASE-F32-File-PublicApi-0101-001-Open_command005
1.1846 + COMMAND file ~
1.1847 + COMMAND RFs1 ~
1.1848 +END_TEST_BLOCK
1.1849 +END_TESTCASE PBASE-F32-File-PublicApi-0101
1.1850 +
1.1851 +
1.1852 +
1.1853 +
1.1854 +START_TESTCASE PBASE-F32-File-PublicApi-0103
1.1855 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0103
1.1856 +//! @SYMAPI RFile
1.1857 +//! @SYMTestCaseDesc Function Open() neg. test. Call open with invalid filemodes.
1.1858 +//! Uses API elements: Open().
1.1859 +//! @SYMTestActions 1. Create RFs session.
1.1860 +//! 2. Create file "{Drives, RAMDriveTestPath}file\tc0103.txt".
1.1861 +//! 3. Close file.
1.1862 +//! 4. Open file "{Drives, RAMDriveTestPath}file\tc0103.txt" with EFileShareReadersOnly | EFileWrite.
1.1863 +//! 5. Delete file.
1.1864 +//! 6. Close fs.
1.1865 +//!
1.1866 +//! @SYMTestStatus Implemented
1.1867 +//! @SYMTestPriority Critical
1.1868 +//! @SYMTestExpectedResults Open returns KErrArgument on step 2.
1.1869 +//!
1.1870 +//! @SYMTestType CIT
1.1871 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1872 + CREATE_OBJECT RFs RFs1
1.1873 + CREATE_OBJECT RFile file
1.1874 + COMMAND RFs1 new
1.1875 + COMMAND RFs1 Connect
1.1876 + COMMAND file new
1.1877 + COMMAND file Replace PBASE-F32-File-PublicApi-0103-001-Replace_command005
1.1878 + COMMAND file Close
1.1879 + COMMAND !Error=-6 file Open PBASE-F32-File-PublicApi-0103-001-Open_command007
1.1880 + COMMAND file ~
1.1881 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0103-001-Delete_command010
1.1882 + COMMAND RFs1 ~
1.1883 +END_TEST_BLOCK
1.1884 +END_TESTCASE PBASE-F32-File-PublicApi-0103
1.1885 +
1.1886 +
1.1887 +//
1.1888 +// Create
1.1889 +//
1.1890 +
1.1891 +
1.1892 +START_TESTCASE PBASE-F32-File-PublicApi-0201
1.1893 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0201
1.1894 +//! @SYMAPI RFile
1.1895 +//! @SYMTestCaseDesc Function Create() neg. test. Try to Create a file in nonexistant folder.
1.1896 +//! Uses API elements: Create().
1.1897 +//! @SYMTestActions 1. Create RFs session
1.1898 +//! 2. Call RFile::Create passing RFs, literal "{Drives, RAMDriveTestPath}file\base\chickenfarm\chicken.txt", EFileShareAny
1.1899 +//! 3. Close RFs.
1.1900 +//!
1.1901 +//! @SYMTestStatus Implemented
1.1902 +//! @SYMTestPriority Critical
1.1903 +//! @SYMTestExpectedResults RFile::Create() returns KErrPathNotFound on step 2.
1.1904 +//!
1.1905 +//! @SYMTestType CIT
1.1906 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1907 + CREATE_OBJECT RFs RFs1
1.1908 + CREATE_OBJECT RFile file
1.1909 + COMMAND RFs1 new
1.1910 + COMMAND RFs1 Connect
1.1911 + COMMAND file new
1.1912 + COMMAND !Error=-12 file Create PBASE-F32-File-PublicApi-0201-001-Create_command005
1.1913 + COMMAND file ~
1.1914 + COMMAND RFs1 ~
1.1915 +END_TEST_BLOCK
1.1916 +END_TESTCASE PBASE-F32-File-PublicApi-0201
1.1917 +
1.1918 +
1.1919 +START_TESTCASE PBASE-F32-File-PublicApi-0202
1.1920 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0202
1.1921 +//! @SYMAPI RFile
1.1922 +//! @SYMTestCaseDesc Function Create() neg. test. Try to Create a file which already exists.
1.1923 +//! Uses API elements: Create().
1.1924 +//! @SYMTestActions 1. Create RFs handle.
1.1925 +//! 2. Create a File, by calling RFile::Replace with "{Drives, RAMDriveTestPath}file\tc0202.txt", EFileWrite.
1.1926 +//! 3. Close file.
1.1927 +//! 4. Call RFile::Create passing "{Drives, RAMDriveTestPath}file\tc0202.txt", EFileWrite.
1.1928 +//! 5. Delete file.
1.1929 +//! 6. Close fs.
1.1930 +//!
1.1931 +//! @SYMTestStatus Implemented
1.1932 +//! @SYMTestPriority Critical
1.1933 +//! @SYMTestExpectedResults KErrAlreadyExists on step 3
1.1934 +//!
1.1935 +//! @SYMTestType CIT
1.1936 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1937 + CREATE_OBJECT RFs RFs1
1.1938 + CREATE_OBJECT RFile file
1.1939 + COMMAND RFs1 new
1.1940 + COMMAND RFs1 Connect
1.1941 + COMMAND file new
1.1942 + COMMAND file Replace PBASE-F32-File-PublicApi-0202-001-Replace_command005
1.1943 + COMMAND file Close
1.1944 + COMMAND !Error=-11 file Create PBASE-F32-File-PublicApi-0202-001-Create_command007
1.1945 + COMMAND file ~
1.1946 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0202-001-Delete_command010
1.1947 + COMMAND RFs1 ~
1.1948 +END_TEST_BLOCK
1.1949 +END_TESTCASE PBASE-F32-File-PublicApi-0202
1.1950 +
1.1951 +
1.1952 +START_TESTCASE PBASE-F32-File-PublicApi-0203
1.1953 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0203
1.1954 +//! @SYMAPI RFile
1.1955 +//! @SYMTestCaseDesc Function Create() neg. test. Try to Create a file with bizarre filemodes.
1.1956 +//! Uses API elements: Create().
1.1957 +//! @SYMTestActions 1. Create RFs session
1.1958 +//! 2. Replace file "{Drives, RAMDriveTestPath}file\tc0203.txt"
1.1959 +//! 3. Delete file "{Drives, RAMDriveTestPath}file\tc0203.txt"
1.1960 +//! 2. Create file "{Drives, RAMDriveTestPath}file\tc0203.txt" with EFileShareReadersOnly | EFileWrite
1.1961 +//! 3. Close session.
1.1962 +//!
1.1963 +//! @SYMTestStatus Implemented
1.1964 +//! @SYMTestPriority Critical
1.1965 +//! @SYMTestExpectedResults Create returns KErrArgument on step 2.
1.1966 +//!
1.1967 +//! @SYMTestType CIT
1.1968 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.1969 + CREATE_OBJECT RFs RFs1
1.1970 + CREATE_OBJECT RFile file
1.1971 + COMMAND RFs1 new
1.1972 + COMMAND RFs1 Connect
1.1973 + COMMAND file new
1.1974 + COMMAND file Replace PBASE-F32-File-PublicApi-0203-001-Replace_command001
1.1975 + COMMAND file Close
1.1976 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0203-001-Delete_command002
1.1977 + COMMAND !Error=-6 file Create PBASE-F32-File-PublicApi-0203-001-Create_command005
1.1978 + COMMAND file ~
1.1979 + COMMAND RFs1 ~
1.1980 +END_TEST_BLOCK
1.1981 +END_TESTCASE PBASE-F32-File-PublicApi-0203
1.1982 +
1.1983 +
1.1984 +//
1.1985 +// Replace
1.1986 +//
1.1987 +
1.1988 +
1.1989 +START_TESTCASE PBASE-F32-File-PublicApi-0301
1.1990 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0301
1.1991 +//! @SYMAPI RFile
1.1992 +//! @SYMTestCaseDesc Function Replace() neg. test. Replace a file with nonexistant path.
1.1993 +//! Uses API elements: Replace().
1.1994 +//! @SYMTestActions 1. Create RFs session
1.1995 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\base\chickenfarm\chicken.txt", EFileWrite
1.1996 +//! 3. Close RFs.
1.1997 +//!
1.1998 +//! @SYMTestStatus Implemented
1.1999 +//! @SYMTestPriority Critical
1.2000 +//! @SYMTestExpectedResults RFile::Replace() returns KErrPathNotFound on step 2.
1.2001 +//!
1.2002 +//! @SYMTestType CIT
1.2003 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2004 + CREATE_OBJECT RFs RFs1
1.2005 + CREATE_OBJECT RFile file
1.2006 + COMMAND RFs1 new
1.2007 + COMMAND RFs1 Connect
1.2008 + COMMAND file new
1.2009 + COMMAND !Error=-12 file Replace PBASE-F32-File-PublicApi-0301-001-Replace_command005
1.2010 + COMMAND file ~
1.2011 + COMMAND RFs1 ~
1.2012 +END_TEST_BLOCK
1.2013 +END_TESTCASE PBASE-F32-File-PublicApi-0301
1.2014 +
1.2015 +
1.2016 +START_TESTCASE PBASE-F32-File-PublicApi-0303
1.2017 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0303
1.2018 +//! @SYMAPI RFile
1.2019 +//! @SYMTestCaseDesc Function Replace() neg. test. Call Replace with bizarre filemodes.
1.2020 +//! Uses API elements: Replace().
1.2021 +//! @SYMTestActions 1. Create RFs session
1.2022 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0303.txt", EFileShareReadersOnly | EFileWrite
1.2023 +//! 3. Close RFs.
1.2024 +//!
1.2025 +//! @SYMTestStatus Implemented
1.2026 +//! @SYMTestPriority Critical
1.2027 +//! @SYMTestExpectedResults returns KErrArgument on step 2.
1.2028 +//!
1.2029 +//! @SYMTestType CIT
1.2030 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2031 + CREATE_OBJECT RFs RFs1
1.2032 + CREATE_OBJECT RFile file
1.2033 + COMMAND RFs1 new
1.2034 + COMMAND RFs1 Connect
1.2035 + COMMAND file new
1.2036 + COMMAND !Error=-6 file Replace PBASE-F32-File-PublicApi-0303-001-Replace_command005
1.2037 + COMMAND file ~
1.2038 + COMMAND RFs1 ~
1.2039 +END_TEST_BLOCK
1.2040 +END_TESTCASE PBASE-F32-File-PublicApi-0303
1.2041 +
1.2042 +//
1.2043 +// TEMP
1.2044 +//
1.2045 +
1.2046 +START_TESTCASE PBASE-F32-File-PublicApi-0401
1.2047 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0401
1.2048 +//! @SYMAPI RFile
1.2049 +//! @SYMTestCaseDesc Function Temp() neg. test. Try to create temporary file in nonexistant directory.
1.2050 +//! Uses API elements: Temp().
1.2051 +//! @SYMTestActions 1. Create RFs session
1.2052 +//! 2. Call RFile::Temp passing RFs, literal "{Drives, RAMDriveChar}:\base\chickenfarm\", TDesc&, EFileWrite
1.2053 +//! 3. Close RFs.
1.2054 +//!
1.2055 +//! @SYMTestStatus Implemented
1.2056 +//! @SYMTestPriority Critical
1.2057 +//! @SYMTestExpectedResults RFile::Temp() KErrPathNotFound on step 2.
1.2058 +//!
1.2059 +//! @SYMTestType CIT
1.2060 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2061 + CREATE_OBJECT RFs RFs1
1.2062 + CREATE_OBJECT RFile file
1.2063 + COMMAND RFs1 new
1.2064 + COMMAND RFs1 Connect
1.2065 + COMMAND file new
1.2066 + COMMAND !Error=-12 file Temp PBASE-F32-File-PublicApi-0401-001-Temp_command005
1.2067 + COMMAND file ~
1.2068 + COMMAND RFs1 ~
1.2069 +END_TEST_BLOCK
1.2070 +END_TESTCASE PBASE-F32-File-PublicApi-0401
1.2071 +
1.2072 +
1.2073 +START_TESTCASE PBASE-F32-File-PublicApi-0403
1.2074 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0403
1.2075 +//! @SYMAPI RFile
1.2076 +//! @SYMTestCaseDesc Function Temp() neg. test. Try to create a temporary file with obscure filemodes.
1.2077 +//! Uses API elements: Temp().
1.2078 +//! @SYMTestActions 1. Create RFs session
1.2079 +//! 2. Call RFile::Temp passing RFs, literal "{Drives, RAMDriveTestPath}file\", TDesc&, EFileShareReadersOnly | EFileWrite
1.2080 +//! 3. Close RFs.
1.2081 +//!
1.2082 +//! @SYMTestStatus Implemented
1.2083 +//! @SYMTestPriority Critical
1.2084 +//! @SYMTestExpectedResults RFile::Temp() returns KErrArgument on step 2.
1.2085 +//!
1.2086 +//! @SYMTestType CIT
1.2087 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2088 + CREATE_OBJECT RFs RFs1
1.2089 + CREATE_OBJECT RFile file
1.2090 + COMMAND RFs1 new
1.2091 + COMMAND RFs1 Connect
1.2092 + COMMAND file new
1.2093 + COMMAND !Error=-6 file Temp PBASE-F32-File-PublicApi-0403-001-Temp_command005
1.2094 + COMMAND file ~
1.2095 + COMMAND RFs1 ~
1.2096 +END_TEST_BLOCK
1.2097 +END_TESTCASE PBASE-F32-File-PublicApi-0403
1.2098 +
1.2099 +
1.2100 +//
1.2101 +// READ3
1.2102 +//
1.2103 +
1.2104 +
1.2105 +START_TESTCASE PBASE-F32-File-PublicApi-0701
1.2106 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0701
1.2107 +//! @SYMAPI RFile
1.2108 +//! @SYMTestCaseDesc Synchronous Read() neg. test - try to read negative length.
1.2109 +//! Uses API elements: Read().
1.2110 +//! @SYMTestActions 1. Create RFs session
1.2111 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\0701.txt", EFileWrite
1.2112 +//! 3. Write "test" to file
1.2113 +//! 4. Reset file position.
1.2114 +//! 5. Call RFile::Read() passing TDesC, -1 for the length
1.2115 +//! 6. Close RFile.
1.2116 +//! 7. Delete file.
1.2117 +//! 8. Close RFs.
1.2118 +//!
1.2119 +//! @SYMTestStatus Implemented
1.2120 +//! @SYMTestPriority Critical
1.2121 +//! @SYMTestExpectedResults RFile::Read() returns KErrArgument.
1.2122 +//!
1.2123 +//! @SYMTestType CIT
1.2124 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2125 + CREATE_OBJECT RFs RFs1
1.2126 + CREATE_OBJECT RFile file
1.2127 + COMMAND RFs1 new
1.2128 + COMMAND RFs1 Connect
1.2129 + COMMAND file new
1.2130 + COMMAND file Replace PBASE-F32-File-PublicApi-0701-001-Replace_command005
1.2131 + COMMAND file Write PBASE-F32-File-PublicApi-0701-001-Write_command006
1.2132 + COMMAND !Error=-6 file Read PBASE-F32-File-PublicApi-0701-001-Read_command007
1.2133 + COMMAND file Close
1.2134 + COMMAND file ~
1.2135 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0701-001-Delete_command011
1.2136 + COMMAND RFs1 ~
1.2137 +END_TEST_BLOCK
1.2138 +END_TESTCASE PBASE-F32-File-PublicApi-0701
1.2139 +
1.2140 +
1.2141 +START_TESTCASE PBASE-F32-File-PublicApi-0702
1.2142 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0702
1.2143 +//! @SYMAPI RFile
1.2144 +//! @SYMTestCaseDesc Synchronous Read() neg. test - Will open file and try to read more data from it, than the buffer length.
1.2145 +//! Uses API elements: Read().
1.2146 +//! @SYMTestActions 1. Create RFs session
1.2147 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0702.txt", EFileWrite
1.2148 +//! 3. Write "readtest" to file
1.2149 +//! 4. Reset file position.
1.2150 +//! 5. Create buffer descriptor with length 4.
1.2151 +//! 5. Call RFile::Read() passing buffer, 1000 for the length.
1.2152 +//! 6. Close RFile.
1.2153 +//! 7. Delete file.
1.2154 +//! 8. Close RFs.
1.2155 +//!
1.2156 +//! @SYMTestStatus Implemented
1.2157 +//! @SYMTestPriority Critical
1.2158 +//! @SYMTestExpectedResults RFile::Read() returns an KErrOverlow.
1.2159 +//!
1.2160 +//! @SYMTestType CIT
1.2161 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2162 + CREATE_OBJECT RFs RFs1
1.2163 + CREATE_OBJECT RFile file
1.2164 + COMMAND RFs1 new
1.2165 + COMMAND RFs1 Connect
1.2166 + COMMAND file new
1.2167 + COMMAND file Replace PBASE-F32-File-PublicApi-0702-001-Replace_command005
1.2168 + COMMAND file Write PBASE-F32-File-PublicApi-0702-001-Write_command006
1.2169 + COMMAND !Error=-9 file Read PBASE-F32-File-PublicApi-0702-001-Read_command007
1.2170 + COMMAND file Close
1.2171 + COMMAND file ~
1.2172 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0702-001-Delete_command011
1.2173 + COMMAND RFs1 ~
1.2174 +END_TEST_BLOCK
1.2175 +END_TESTCASE PBASE-F32-File-PublicApi-0702
1.2176 +
1.2177 +
1.2178 +START_TESTCASE PBASE-F32-File-PublicApi-0703
1.2179 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0703
1.2180 +//! @SYMAPI RFile
1.2181 +//! @SYMTestCaseDesc Synchronous Read(TDesC8& aData, TInt length) test. Pass 0 for length
1.2182 +//! Uses API elements: Read().
1.2183 +//! @SYMTestActions 1. Create RFs session
1.2184 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0703.txt", EFileWrite
1.2185 +//! 3. Write "readtest" to file
1.2186 +//! 4. Reset file position.
1.2187 +//! 5. Create buffer descriptor with length 4.
1.2188 +//! 5. Call RFile::Read() passing buffer, 0 for the length.
1.2189 +//! 6. Close RFile.
1.2190 +//! 7. Close RFs.
1.2191 +//!
1.2192 +//! @SYMTestStatus Implemented
1.2193 +//! @SYMTestPriority Critical
1.2194 +//! @SYMTestExpectedResults RFile::Read() returns empty descriptor
1.2195 +//!
1.2196 +//! @SYMTestType CIT
1.2197 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2198 + CREATE_OBJECT RFs RFs1
1.2199 + CREATE_OBJECT RFile file
1.2200 + COMMAND RFs1 new
1.2201 + COMMAND RFs1 Connect
1.2202 + COMMAND file new
1.2203 + COMMAND file Replace PBASE-F32-File-PublicApi-0703-001-Replace_command005
1.2204 + COMMAND file Write PBASE-F32-File-PublicApi-0703-001-Write_command006
1.2205 + COMMAND file Read PBASE-F32-File-PublicApi-0703-001-Read_command007
1.2206 + COMMAND file Close
1.2207 + COMMAND file ~
1.2208 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0703-001-Delete_command011
1.2209 + COMMAND RFs1 ~
1.2210 +END_TEST_BLOCK
1.2211 +END_TESTCASE PBASE-F32-File-PublicApi-0703
1.2212 +
1.2213 +
1.2214 +//
1.2215 +// READ4
1.2216 +//
1.2217 +
1.2218 +
1.2219 +START_TESTCASE PBASE-F32-File-PublicApi-0801
1.2220 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0801
1.2221 +//! @SYMAPI RFile
1.2222 +//! @SYMTestCaseDesc Asynchronous Read() neg. test - try to read negative length.
1.2223 +//! Uses API elements: Read().
1.2224 +//! @SYMTestActions 1. Create RFs session
1.2225 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0801.txt", EFileWrite
1.2226 +//! 3. Write "test" to file
1.2227 +//! 4. Reset file position.
1.2228 +//! 5. Call RFile::Read() passing TDesC, -1 for the length, TRequestStatus
1.2229 +//! 6. wait for request.
1.2230 +//! 7. Close RFile.
1.2231 +//! 8. Delete file.
1.2232 +//! 9. Close RFs.
1.2233 +//!
1.2234 +//! @SYMTestStatus Implemented
1.2235 +//! @SYMTestPriority Critical
1.2236 +//! @SYMTestExpectedResults RFile::Read() returns KErrArgument with TRequestStatus.
1.2237 +//!
1.2238 +//! @SYMTestType CIT
1.2239 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2240 + CREATE_OBJECT RFs RFs1
1.2241 + CREATE_OBJECT RFile file
1.2242 + COMMAND RFs1 new
1.2243 + COMMAND RFs1 Connect
1.2244 + COMMAND file new
1.2245 + COMMAND file Replace PBASE-F32-File-PublicApi-0801-001-Replace_command005
1.2246 + COMMAND file Write PBASE-F32-File-PublicApi-0801-001-Write_command006
1.2247 + COMMAND !AsyncError=-6 file Read PBASE-F32-File-PublicApi-0801-001-Read_command007
1.2248 + OUTSTANDING
1.2249 + COMMAND file Close
1.2250 + COMMAND file ~
1.2251 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0801-001-Delete_command011
1.2252 + COMMAND RFs1 ~
1.2253 +END_TEST_BLOCK
1.2254 +END_TESTCASE PBASE-F32-File-PublicApi-0801
1.2255 +
1.2256 +
1.2257 +START_TESTCASE PBASE-F32-File-PublicApi-0802
1.2258 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0802
1.2259 +//! @SYMAPI RFile
1.2260 +//! @SYMTestCaseDesc Asynchronous Read() neg. test - Will open file and try to read more data from it, than the buffer length.
1.2261 +//! Uses API elements: Read().
1.2262 +//! @SYMTestActions 1. Create RFs session
1.2263 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0802.txt", EFileWrite
1.2264 +//! 3. Write "readtest" to file
1.2265 +//! 4. Reset file position.
1.2266 +//! 5. Create buffer descriptor with length 4.
1.2267 +//! 6. Call RFile::Read() passing buffer, 1000 for the length, TRequestStatus
1.2268 +//! 7. Wait for status.
1.2269 +//! 8. Close RFile.
1.2270 +//! 9. Delete file.
1.2271 +//! 10. Close RFs.
1.2272 +//!
1.2273 +//! @SYMTestStatus Implemented
1.2274 +//! @SYMTestPriority Critical
1.2275 +//! @SYMTestExpectedResults RFile::Read() returns an KErrOverlow, with TRequestStatus.
1.2276 +//!
1.2277 +//! @SYMTestType CIT
1.2278 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2279 + CREATE_OBJECT RFs RFs1
1.2280 + CREATE_OBJECT RFile file
1.2281 + COMMAND RFs1 new
1.2282 + COMMAND RFs1 Connect
1.2283 + COMMAND file new
1.2284 + COMMAND file Replace PBASE-F32-File-PublicApi-0802-001-Replace_command005
1.2285 + COMMAND file Write PBASE-F32-File-PublicApi-0802-001-Write_command006
1.2286 + COMMAND !AsyncError=-9 file Read PBASE-F32-File-PublicApi-0802-001-Read_command007
1.2287 + OUTSTANDING
1.2288 + COMMAND file Close
1.2289 + COMMAND file ~
1.2290 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0802-001-Delete_command011
1.2291 + COMMAND RFs1 ~
1.2292 +END_TEST_BLOCK
1.2293 +END_TESTCASE PBASE-F32-File-PublicApi-0802
1.2294 +
1.2295 +
1.2296 +//
1.2297 +// READ5
1.2298 +//
1.2299 +
1.2300 +
1.2301 +START_TESTCASE PBASE-F32-File-PublicApi-0901
1.2302 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0901
1.2303 +//! @SYMAPI RFile
1.2304 +//! @SYMTestCaseDesc Synchronous Read() neg. test - try to read from negative position.
1.2305 +//! Uses API elements: Read().
1.2306 +//! @SYMTestActions 1. Create RFs session
1.2307 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0901.txt", EFileWrite
1.2308 +//! 3. Write "test" to file
1.2309 +//! 4. Reset file position.
1.2310 +//! 5. Call RFile::Read() passing -1 for position.
1.2311 +//! 6. Close file.
1.2312 +//! 7. Delete file.
1.2313 +//! 8. Close file server session.
1.2314 +//!
1.2315 +//! @SYMTestStatus Implemented
1.2316 +//! @SYMTestPriority Critical
1.2317 +//! @SYMTestExpectedResults Panic FSCLIENT:19 at step 5.
1.2318 +//!
1.2319 +//! @SYMTestType CIT
1.2320 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2321 + CREATE_OBJECT RFs RFs1
1.2322 + CREATE_OBJECT RFile file
1.2323 + COMMAND RFs1 new
1.2324 + COMMAND RFs1 Connect
1.2325 + COMMAND file new
1.2326 + COMMAND file Replace PBASE-F32-File-PublicApi-0901-001-Replace_command005
1.2327 + COMMAND file Write PBASE-F32-File-PublicApi-0901-001-Write_command006
1.2328 + COMMAND file Read PBASE-F32-File-PublicApi-0901-001-Read_command007
1.2329 + COMMAND file Close
1.2330 + COMMAND file ~
1.2331 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0901-001-Delete_command011
1.2332 + COMMAND RFs1 ~
1.2333 +END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
1.2334 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2335 + CREATE_OBJECT RFs RFs1
1.2336 + COMMAND RFs1 new
1.2337 + COMMAND RFs1 Connect
1.2338 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0901-001-Delete_command011
1.2339 + COMMAND RFs1 ~
1.2340 +END_TEST_BLOCK
1.2341 +END_TESTCASE PBASE-F32-File-PublicApi-0901
1.2342 +
1.2343 +
1.2344 +START_TESTCASE PBASE-F32-File-PublicApi-0902
1.2345 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-0902
1.2346 +//! @SYMAPI RFile
1.2347 +//! @SYMTestCaseDesc Synchronous Read() neg. test - try to read beyond file's length.
1.2348 +//! Uses API elements: Read().
1.2349 +//! @SYMTestActions 1. Create RFs session
1.2350 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc0902.txt", EFileWrite
1.2351 +//! 3. Write "test" to file
1.2352 +//! 4. Reset file position.
1.2353 +//! 5. Call RFile::Read() passing 100 for position.
1.2354 +//! 6. Close file.
1.2355 +//! 7. Delete file.
1.2356 +//! 8. Close file server session.
1.2357 +//!
1.2358 +//! @SYMTestStatus Implemented
1.2359 +//! @SYMTestPriority Critical
1.2360 +//! @SYMTestExpectedResults RFile::Read(data, position) returns zero length descriptor.
1.2361 +//!
1.2362 +//! @SYMTestType CIT
1.2363 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2364 + CREATE_OBJECT RFs RFs1
1.2365 + CREATE_OBJECT RFile file
1.2366 + COMMAND RFs1 new
1.2367 + COMMAND RFs1 Connect
1.2368 + COMMAND file new
1.2369 + COMMAND file Replace PBASE-F32-File-PublicApi-0902-001-Replace_command005
1.2370 + COMMAND file Write PBASE-F32-File-PublicApi-0902-001-Write_command006
1.2371 + COMMAND file Read PBASE-F32-File-PublicApi-0902-001-Read_command007
1.2372 + COMMAND file Close
1.2373 + COMMAND file ~
1.2374 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-0902-001-Delete_command011
1.2375 + COMMAND RFs1 ~
1.2376 +END_TEST_BLOCK
1.2377 +END_TESTCASE PBASE-F32-File-PublicApi-0902
1.2378 +
1.2379 +
1.2380 +//
1.2381 +// READ6
1.2382 +//
1.2383 +
1.2384 +
1.2385 +START_TESTCASE PBASE-F32-File-PublicApi-1001
1.2386 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1001
1.2387 +//! @SYMAPI RFile
1.2388 +//! @SYMTestCaseDesc Asynchronous Read() neg. test - try to read from negative position.
1.2389 +//! Uses API elements: Read().
1.2390 +//! @SYMTestActions 1. Create RFs session
1.2391 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1001.txt", EFileWrite
1.2392 +//! 3. Write "synchronous read with position test" to file
1.2393 +//! 4. Call RFile::Read() passing -1 for position, TRequestStatus.
1.2394 +//! 5. close file.
1.2395 +//! 6. Delete tc1001.txt
1.2396 +//! 7. Close file server session.
1.2397 +//!
1.2398 +//! @SYMTestStatus Implemented
1.2399 +//! @SYMTestPriority Critical
1.2400 +//! @SYMTestExpectedResults Panic FSCLIENT:19 at step 5.
1.2401 +//!
1.2402 +//! @SYMTestType CIT
1.2403 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2404 + CREATE_OBJECT RFs RFs1
1.2405 + CREATE_OBJECT RFile file
1.2406 + COMMAND RFs1 new
1.2407 + COMMAND RFs1 Connect
1.2408 + COMMAND file new
1.2409 + COMMAND file Replace PBASE-F32-File-PublicApi-1001-001-Replace_command005
1.2410 + COMMAND file Write PBASE-F32-File-PublicApi-1001-001-Write_command006
1.2411 + COMMAND file Read PBASE-F32-File-PublicApi-1001-001-Read_command007
1.2412 + OUTSTANDING
1.2413 + COMMAND file Close
1.2414 + COMMAND file ~
1.2415 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1001-001-Delete_command011
1.2416 + COMMAND RFs1 ~
1.2417 +END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
1.2418 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2419 + CREATE_OBJECT RFs RFs1
1.2420 + COMMAND RFs1 new
1.2421 + COMMAND RFs1 Connect
1.2422 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1001-001-Delete_command011
1.2423 + COMMAND RFs1 ~
1.2424 +END_TEST_BLOCK
1.2425 +END_TESTCASE PBASE-F32-File-PublicApi-1001
1.2426 +
1.2427 +
1.2428 +START_TESTCASE PBASE-F32-File-PublicApi-1002
1.2429 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1002
1.2430 +//! @SYMAPI RFile
1.2431 +//! @SYMTestCaseDesc Asynchronous Read() neg. test - try to read beyond files length.
1.2432 +//! Uses API elements: Read().
1.2433 +//! @SYMTestActions 1. Create RFs session
1.2434 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1002.txt", EFileWrite
1.2435 +//! 3. Write "test" to file
1.2436 +//! 4. Reset file position.
1.2437 +//! 5. Call RFile::Read() passing 100 for position, TRequestStatus.
1.2438 +//! 6. close file.
1.2439 +//! 7. Delete tc1002.txt
1.2440 +//! 8. Close file server session.
1.2441 +//!
1.2442 +//! @SYMTestStatus Implemented
1.2443 +//! @SYMTestPriority Critical
1.2444 +//! @SYMTestExpectedResults RFile::Read(data, position, status) returns zero length descriptor.
1.2445 +//!
1.2446 +//! @SYMTestType CIT
1.2447 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2448 + CREATE_OBJECT RFs RFs1
1.2449 + CREATE_OBJECT RFile file
1.2450 + COMMAND RFs1 new
1.2451 + COMMAND RFs1 Connect
1.2452 + COMMAND file new
1.2453 + COMMAND file Replace PBASE-F32-File-PublicApi-1002-001-Replace_command005
1.2454 + COMMAND file Write PBASE-F32-File-PublicApi-1002-001-Write_command006
1.2455 + COMMAND file Read PBASE-F32-File-PublicApi-1002-001-Read_command007
1.2456 + OUTSTANDING
1.2457 + COMMAND file Close
1.2458 + COMMAND file ~
1.2459 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1002-001-Delete_command011
1.2460 + COMMAND RFs1 ~
1.2461 +END_TEST_BLOCK
1.2462 +END_TESTCASE PBASE-F32-File-PublicApi-1002
1.2463 +
1.2464 +//
1.2465 +// READ7
1.2466 +//
1.2467 +
1.2468 +
1.2469 +START_TESTCASE PBASE-F32-File-PublicApi-1101
1.2470 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1101
1.2471 +//! @SYMAPI RFile
1.2472 +//! @SYMTestCaseDesc Synchronous Read() neg. test - Will try to read from negative position.
1.2473 +//! Uses API elements: Read().
1.2474 +//! @SYMTestActions 1. Create RFs session
1.2475 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1101.txt", EFileWrite
1.2476 +//! 3. Write "test" to file
1.2477 +//! 4. Reset file position.
1.2478 +//! 5. Call RFile::Read() passing 4 for length and -1 for position.
1.2479 +//!
1.2480 +//! @SYMTestStatus Implemented
1.2481 +//! @SYMTestPriority Critical
1.2482 +//! @SYMTestExpectedResults Panic FSCLIENT:19 at step 5.
1.2483 +//!
1.2484 +//! @SYMTestType CIT
1.2485 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2486 + CREATE_OBJECT RFs RFs1
1.2487 + CREATE_OBJECT RFile file
1.2488 + COMMAND RFs1 new
1.2489 + COMMAND RFs1 Connect
1.2490 + COMMAND file new
1.2491 + COMMAND file Replace PBASE-F32-File-PublicApi-1101-001-Replace_command005
1.2492 + COMMAND file Write PBASE-F32-File-PublicApi-1101-001-Write_command006
1.2493 + COMMAND file Read PBASE-F32-File-PublicApi-1101-001-Read_command007
1.2494 + COMMAND file Close
1.2495 + COMMAND file ~
1.2496 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1101-001-Delete_command011
1.2497 + COMMAND RFs1 ~
1.2498 +END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
1.2499 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2500 + CREATE_OBJECT RFs RFs1
1.2501 + COMMAND RFs1 new
1.2502 + COMMAND RFs1 Connect
1.2503 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1101-001-Delete_command011
1.2504 + COMMAND RFs1 ~
1.2505 +END_TEST_BLOCK
1.2506 +END_TESTCASE PBASE-F32-File-PublicApi-1101
1.2507 +
1.2508 +
1.2509 +START_TESTCASE PBASE-F32-File-PublicApi-1102
1.2510 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1102
1.2511 +//! @SYMAPI RFile
1.2512 +//! @SYMTestCaseDesc Synchronous Read() neg. test - will try to read negative length.
1.2513 +//! Uses API elements: Read().
1.2514 +//! @SYMTestActions 1. Create RFs session
1.2515 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1102.txt", EFileWrite
1.2516 +//! 3. Write "test" to file
1.2517 +//! 4. Reset file position.
1.2518 +//! 5. Call RFile::Read() passing -4 for length and 10 for position.
1.2519 +//! 6. Close RFile.
1.2520 +//! 7. Delete file.
1.2521 +//! 8. Close RFs.
1.2522 +//!
1.2523 +//! @SYMTestStatus Implemented
1.2524 +//! @SYMTestPriority Critical
1.2525 +//! @SYMTestExpectedResults RFile::Read() returns KErrArgument.
1.2526 +//!
1.2527 +//! @SYMTestType CIT
1.2528 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2529 + CREATE_OBJECT RFs RFs1
1.2530 + CREATE_OBJECT RFile file
1.2531 + COMMAND RFs1 new
1.2532 + COMMAND RFs1 Connect
1.2533 + COMMAND file new
1.2534 + COMMAND file Replace PBASE-F32-File-PublicApi-1102-001-Replace_command005
1.2535 + COMMAND file Write PBASE-F32-File-PublicApi-1102-001-Write_command006
1.2536 + COMMAND !Error=-6 file Read PBASE-F32-File-PublicApi-1102-001-Read_command007
1.2537 + COMMAND file Close
1.2538 + COMMAND file ~
1.2539 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1102-001-Delete_command011
1.2540 + COMMAND RFs1 ~
1.2541 +END_TEST_BLOCK
1.2542 +END_TESTCASE PBASE-F32-File-PublicApi-1102
1.2543 +
1.2544 +
1.2545 +START_TESTCASE PBASE-F32-File-PublicApi-1103
1.2546 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1103
1.2547 +//! @SYMAPI RFile
1.2548 +//! @SYMTestCaseDesc Synchronous Read() neg. test - Will try to read from position beyond file length.
1.2549 +//! Uses API elements: Read().
1.2550 +//! @SYMTestActions 1. Create RFs session
1.2551 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1103.txt", EFileWrite
1.2552 +//! 3. Write "test" to file
1.2553 +//! 4. Reset file position.
1.2554 +//! 5. Call RFile::Read() passing 4 for length and 10 for position (larger than file's content).
1.2555 +//! 6. Close RFile.
1.2556 +//! 7. Delete file.
1.2557 +//! 8. Close RFs.
1.2558 +//!
1.2559 +//! @SYMTestStatus Implemented
1.2560 +//! @SYMTestPriority Critical
1.2561 +//! @SYMTestExpectedResults RFile::Read() returns KErrNone. Length of data read is 0.
1.2562 +//!
1.2563 +//! @SYMTestType CIT
1.2564 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2565 + CREATE_OBJECT RFs RFs1
1.2566 + CREATE_OBJECT RFile file
1.2567 + COMMAND RFs1 new
1.2568 + COMMAND RFs1 Connect
1.2569 + COMMAND file new
1.2570 + COMMAND file Replace PBASE-F32-File-PublicApi-1103-001-Replace_command005
1.2571 + COMMAND file Write PBASE-F32-File-PublicApi-1103-001-Write_command006
1.2572 + COMMAND file Read PBASE-F32-File-PublicApi-1103-001-Read_command007
1.2573 + COMMAND file Close
1.2574 + COMMAND file ~
1.2575 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1103-001-Delete_command011
1.2576 + COMMAND RFs1 ~
1.2577 +END_TEST_BLOCK
1.2578 +END_TESTCASE PBASE-F32-File-PublicApi-1103
1.2579 +
1.2580 +
1.2581 +START_TESTCASE PBASE-F32-File-PublicApi-1104
1.2582 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1104
1.2583 +//! @SYMAPI RFile
1.2584 +//! @SYMTestCaseDesc Synchronous Read() neg. test - Read more from file than buffer's length.
1.2585 +//! Uses API elements: Read().
1.2586 +//! @SYMTestActions 1. Create RFs session
1.2587 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1104.txt", EFileRead
1.2588 +//! 3. Write "readtest" to file
1.2589 +//! 4. Reset file position.
1.2590 +//! 5. Call RFile::Read() passing buffer (with size 4) 1000 for length and 10 for position.
1.2591 +//! 6. Close RFile.
1.2592 +//! 7. Delete file.
1.2593 +//! 8. Close RFs.
1.2594 +//!
1.2595 +//! @SYMTestStatus Implemented
1.2596 +//! @SYMTestPriority Critical
1.2597 +//! @SYMTestExpectedResults RFile::Read() returns an KErrOverlow.
1.2598 +//!
1.2599 +//! @SYMTestType CIT
1.2600 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2601 + CREATE_OBJECT RFs RFs1
1.2602 + CREATE_OBJECT RFile file
1.2603 + COMMAND RFs1 new
1.2604 + COMMAND RFs1 Connect
1.2605 + COMMAND file new
1.2606 + COMMAND file Replace PBASE-F32-File-PublicApi-1104-001-Replace_command005
1.2607 + COMMAND file Write PBASE-F32-File-PublicApi-1104-001-Write_command006
1.2608 + COMMAND !Error=-9 file Read PBASE-F32-File-PublicApi-1104-001-Read_command007
1.2609 + COMMAND file Close
1.2610 + COMMAND file ~
1.2611 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1104-001-Delete_command011
1.2612 + COMMAND RFs1 ~
1.2613 +END_TEST_BLOCK
1.2614 +END_TESTCASE PBASE-F32-File-PublicApi-1104
1.2615 +
1.2616 +
1.2617 +//
1.2618 +// READ8
1.2619 +//
1.2620 +
1.2621 +
1.2622 +START_TESTCASE PBASE-F32-File-PublicApi-1201
1.2623 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1201
1.2624 +//! @SYMAPI RFile
1.2625 +//! @SYMTestCaseDesc Asynchronous Read() neg. test - Will try to read from negative position.
1.2626 +//! Uses API elements: Read().
1.2627 +//! @SYMTestActions 1. Create RFs session
1.2628 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1201.txt", EFileWrite
1.2629 +//! 3. Write "test" to file
1.2630 +//! 4. Reset file position.
1.2631 +//! 5. Call RFile::Read() passing 4 for length and -1 for position and TRequestStatus.
1.2632 +//!
1.2633 +//! @SYMTestStatus Implemented
1.2634 +//! @SYMTestPriority Critical
1.2635 +//! @SYMTestExpectedResults Panic FSCLIENT:19 at step 5.
1.2636 +//!
1.2637 +//! @SYMTestType CIT
1.2638 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2639 + CREATE_OBJECT RFs RFs1
1.2640 + CREATE_OBJECT RFile file
1.2641 + COMMAND RFs1 new
1.2642 + COMMAND RFs1 Connect
1.2643 + COMMAND file new
1.2644 + COMMAND file Replace PBASE-F32-File-PublicApi-1201-001-Replace_command005
1.2645 + COMMAND file Write PBASE-F32-File-PublicApi-1201-001-Write_command006
1.2646 + COMMAND file Read PBASE-F32-File-PublicApi-1201-001-Read_command007
1.2647 + OUTSTANDING
1.2648 + COMMAND file Close
1.2649 + COMMAND file ~
1.2650 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1201-001-Delete_command011
1.2651 + COMMAND RFs1 ~
1.2652 +END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
1.2653 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2654 + CREATE_OBJECT RFs RFs1
1.2655 + COMMAND RFs1 new
1.2656 + COMMAND RFs1 Connect
1.2657 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1201-001-Delete_command011
1.2658 + COMMAND RFs1 ~
1.2659 +END_TEST_BLOCK
1.2660 +END_TESTCASE PBASE-F32-File-PublicApi-1201
1.2661 +
1.2662 +
1.2663 +START_TESTCASE PBASE-F32-File-PublicApi-1202
1.2664 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1202
1.2665 +//! @SYMAPI RFile
1.2666 +//! @SYMTestCaseDesc Asynchronous Read() neg. test - will try to read negative length.
1.2667 +//! Uses API elements: Read().
1.2668 +//! @SYMTestActions 1. Create RFs session
1.2669 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1202.txt", EFileWrite
1.2670 +//! 3. Write "test" to file
1.2671 +//! 4. Reset file position.
1.2672 +//! 5. Call RFile::Read() passing -4 for length and 10 for position and TRequestStatus.
1.2673 +//! 6. wait for request to complete
1.2674 +//! 7. Close RFile.
1.2675 +//! 8. Delete file.
1.2676 +//! 9. Close RFs.
1.2677 +//!
1.2678 +//! @SYMTestStatus Implemented
1.2679 +//! @SYMTestPriority Critical
1.2680 +//! @SYMTestExpectedResults RFile::Read() returns KErrArgument.
1.2681 +//!
1.2682 +//! @SYMTestType CIT
1.2683 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2684 + CREATE_OBJECT RFs RFs1
1.2685 + CREATE_OBJECT RFile file
1.2686 + COMMAND RFs1 new
1.2687 + COMMAND RFs1 Connect
1.2688 + COMMAND file new
1.2689 + COMMAND file Replace PBASE-F32-File-PublicApi-1202-001-Replace_command005
1.2690 + COMMAND file Write PBASE-F32-File-PublicApi-1202-001-Write_command006
1.2691 + COMMAND !AsyncError=-6 file Read PBASE-F32-File-PublicApi-1202-001-Read_command007
1.2692 + OUTSTANDING
1.2693 + COMMAND file Close
1.2694 + COMMAND file ~
1.2695 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1202-001-Delete_command011
1.2696 + COMMAND RFs1 ~
1.2697 +END_TEST_BLOCK
1.2698 +END_TESTCASE PBASE-F32-File-PublicApi-1202
1.2699 +
1.2700 +
1.2701 +START_TESTCASE PBASE-F32-File-PublicApi-1203
1.2702 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1203
1.2703 +//! @SYMAPI RFile
1.2704 +//! @SYMTestCaseDesc Asynchronous Read() neg. test - Will try to read from position beyond file length.
1.2705 +//! Uses API elements: Read().
1.2706 +//! @SYMTestActions 1. Create RFs session
1.2707 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1203.txt", EFileWrite
1.2708 +//! 3. Write "test" to file
1.2709 +//! 4. Reset file position.
1.2710 +//! 5. Call RFile::Read(), 4 for length, 10 for position.
1.2711 +//! 6. Wait for request to complete.
1.2712 +//! 7. Close RFile.
1.2713 +//! 8. Delete file.
1.2714 +//! 9. Close RFs.
1.2715 +//!
1.2716 +//! @SYMTestStatus Implemented
1.2717 +//! @SYMTestPriority Critical
1.2718 +//! @SYMTestExpectedResults RFile::Read() returns KErrNone. Length of data read is 0.
1.2719 +//!
1.2720 +//! @SYMTestType CIT
1.2721 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2722 + CREATE_OBJECT RFs RFs1
1.2723 + CREATE_OBJECT RFile file
1.2724 + COMMAND RFs1 new
1.2725 + COMMAND RFs1 Connect
1.2726 + COMMAND file new
1.2727 + COMMAND file Replace PBASE-F32-File-PublicApi-1203-001-Replace_command005
1.2728 + COMMAND file Write PBASE-F32-File-PublicApi-1203-001-Write_command006
1.2729 + COMMAND file Read PBASE-F32-File-PublicApi-1203-001-Read_command007
1.2730 + OUTSTANDING
1.2731 + COMMAND file Close
1.2732 + COMMAND file ~
1.2733 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1203-001-Delete_command011
1.2734 + COMMAND RFs1 ~
1.2735 +END_TEST_BLOCK
1.2736 +END_TESTCASE PBASE-F32-File-PublicApi-1203
1.2737 +
1.2738 +
1.2739 +START_TESTCASE PBASE-F32-File-PublicApi-1204
1.2740 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1204
1.2741 +//! @SYMAPI RFile
1.2742 +//! @SYMTestCaseDesc Synchronous Read() neg. test - Read more from file than buffer's length.
1.2743 +//! Uses API elements: Read().
1.2744 +//! @SYMTestActions 1. Create RFs session
1.2745 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1204.txt", EFileWrite
1.2746 +//! 3. Write "synchronous read with length and position test" to file
1.2747 +//! 4. Reset file position.
1.2748 +//! 5. Call RFile::Read() passing buffer (buffer size 4) 1000 for length and for position 10, TRequestStatus.
1.2749 +//! 6. Wait for request.
1.2750 +//! 7. Close RFile.
1.2751 +//! 8. Delete file.
1.2752 +//! 9. Close RFs.
1.2753 +//!
1.2754 +//! @SYMTestStatus Implemented
1.2755 +//! @SYMTestPriority Critical
1.2756 +//! @SYMTestExpectedResults RFile::Read() returns an KErrOverlow.
1.2757 +//!
1.2758 +//! @SYMTestType CIT
1.2759 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2760 + CREATE_OBJECT RFs RFs1
1.2761 + CREATE_OBJECT RFile file
1.2762 + COMMAND RFs1 new
1.2763 + COMMAND RFs1 Connect
1.2764 + COMMAND file new
1.2765 + COMMAND file Replace PBASE-F32-File-PublicApi-1204-001-Replace_command005
1.2766 + COMMAND file Write PBASE-F32-File-PublicApi-1204-001-Write_command006
1.2767 + COMMAND !AsyncError=-9 file Read PBASE-F32-File-PublicApi-1204-001-Read_command007
1.2768 + OUTSTANDING
1.2769 + COMMAND file Close
1.2770 + COMMAND file ~
1.2771 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1204-001-Delete_command011
1.2772 + COMMAND RFs1 ~
1.2773 +END_TEST_BLOCK
1.2774 +END_TESTCASE PBASE-F32-File-PublicApi-1204
1.2775 +
1.2776 +//
1.2777 +// Write
1.2778 +//
1.2779 +
1.2780 +START_TESTCASE PBASE-F32-File-PublicApi-1301
1.2781 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1301
1.2782 +//! @SYMAPI RFile
1.2783 +//! @SYMTestCaseDesc Function Write(const TDesC8 &aDes) test - write an emptry buffer to file.
1.2784 +//!
1.2785 +//! @SYMTestActions 1. Create RFs session.
1.2786 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1301.txt", EFileWrite.
1.2787 +//! 3. Call Write, passing "" and descriptor with length 0.
1.2788 +//! 4. Close file
1.2789 +//! 5. Close RFile.
1.2790 +//! 6. Delete file
1.2791 +//! 7. Close RFs.
1.2792 +//!
1.2793 +//! @SYMTestStatus Implemented
1.2794 +//! @SYMTestPriority Critical
1.2795 +//! @SYMTestExpectedResults No panic is raised, or error returned.
1.2796 +//!
1.2797 +//! @SYMTestType CIT
1.2798 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2799 + CREATE_OBJECT RFs RFs1
1.2800 + CREATE_OBJECT RFile file
1.2801 + COMMAND RFs1 new
1.2802 + COMMAND RFs1 Connect
1.2803 + COMMAND file new
1.2804 + COMMAND file Replace PBASE-F32-File-PublicApi-1301-001-Replace_command005
1.2805 + COMMAND file Write PBASE-F32-File-PublicApi-1301-001-Write_command006
1.2806 + COMMAND file Close
1.2807 + COMMAND file ~
1.2808 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1301-001-Delete_command010
1.2809 + COMMAND RFs1 ~
1.2810 + END_TEST_BLOCK
1.2811 +END_TESTCASE PBASE-F32-File-PublicApi-1301
1.2812 +
1.2813 +//
1.2814 +// Write2
1.2815 +//
1.2816 +
1.2817 +START_TESTCASE PBASE-F32-File-PublicApi-1401
1.2818 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1401
1.2819 +//! @SYMAPI RFile
1.2820 +//! @SYMTestCaseDesc Function WWrite(const TDesC8 &aDes, TRequestStatus &aStatus) test - write an emptry buffer to file.
1.2821 +//!
1.2822 +//! @SYMTestActions 1. Create RFs session.
1.2823 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc.txt", EFileWrite.
1.2824 +//! 3. Call Write, passing "" and descriptor with length 0.
1.2825 +//! 4. Close file
1.2826 +//! 5. Close RFile.
1.2827 +//! 6. Delete file
1.2828 +//! 7. Close RFs.
1.2829 +//!
1.2830 +//! @SYMTestStatus Implemented
1.2831 +//! @SYMTestPriority Critical
1.2832 +//! @SYMTestExpectedResults No panic is raised, or error returned.
1.2833 +//!
1.2834 +//! @SYMTestType CIT
1.2835 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2836 + CREATE_OBJECT RFs RFs1
1.2837 + CREATE_OBJECT RFile file
1.2838 + COMMAND RFs1 new
1.2839 + COMMAND RFs1 Connect
1.2840 + COMMAND file new
1.2841 + COMMAND file Replace PBASE-F32-File-PublicApi-1401-001-Replace_command005
1.2842 + COMMAND file Write PBASE-F32-File-PublicApi-1401-001-Write_command006
1.2843 + OUTSTANDING
1.2844 + COMMAND file Close
1.2845 + COMMAND file ~
1.2846 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1401-001-Delete_command010
1.2847 + COMMAND RFs1 ~
1.2848 + END_TEST_BLOCK
1.2849 +END_TESTCASE PBASE-F32-File-PublicApi-1401
1.2850 +
1.2851 +
1.2852 +//
1.2853 +// Write3
1.2854 +//
1.2855 +
1.2856 +
1.2857 +START_TESTCASE PBASE-F32-File-PublicApi-1602
1.2858 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1602
1.2859 +//! @SYMAPI RFile
1.2860 +//! @SYMTestCaseDesc Function write neg. test - pass negative number for length.
1.2861 +//!
1.2862 +//! @SYMTestActions 1. Create RFs session.
1.2863 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1602.txt", EFileWrite.
1.2864 +//! 3. Call Write, pass message "short data" and -1 length.
1.2865 +//! 4. Close file
1.2866 +//! 5. Close RFile.
1.2867 +//! 6. Delete file
1.2868 +//! 7. Close RFs.
1.2869 +//!
1.2870 +//! @SYMTestStatus Implemented
1.2871 +//! @SYMTestPriority Critical
1.2872 +//! @SYMTestExpectedResults Write() returns KErrArgument.
1.2873 +//!
1.2874 +//! @SYMTestType CIT
1.2875 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2876 + CREATE_OBJECT RFs RFs1
1.2877 + CREATE_OBJECT RFile file
1.2878 + COMMAND RFs1 new
1.2879 + COMMAND RFs1 Connect
1.2880 + COMMAND file new
1.2881 + COMMAND file Replace PBASE-F32-File-PublicApi-1602-001-Replace_command005
1.2882 + COMMAND !Error=-6 file Write PBASE-F32-File-PublicApi-1602-001-Write_command006
1.2883 + COMMAND file Close
1.2884 + COMMAND file ~
1.2885 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1602-001-Delete_command010
1.2886 + COMMAND RFs1 ~
1.2887 +END_TEST_BLOCK
1.2888 +END_TESTCASE PBASE-F32-File-PublicApi-1602
1.2889 +
1.2890 +
1.2891 +START_TESTCASE PBASE-F32-File-PublicApi-1603
1.2892 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1603
1.2893 +//! @SYMAPI RFile
1.2894 +//! @SYMTestCaseDesc Function write neg. test - pass 0 number for length.
1.2895 +//!
1.2896 +//! @SYMTestActions 1. Create RFs session.
1.2897 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1603.txt", EFileWrite.
1.2898 +//! 3. Call Write, pass message "short data" and 0.
1.2899 +//! 4. Close file
1.2900 +//! 5. Close RFile.
1.2901 +//! 6. Delete file.
1.2902 +//! 7. Close RFs.
1.2903 +//!
1.2904 +//! @SYMTestStatus Implemented
1.2905 +//! @SYMTestPriority Critical
1.2906 +//! @SYMTestExpectedResults Write() returns KErrNone.
1.2907 +//!
1.2908 +//! @SYMTestType CIT
1.2909 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2910 + CREATE_OBJECT RFs RFs1
1.2911 + CREATE_OBJECT RFile file
1.2912 + COMMAND RFs1 new
1.2913 + COMMAND RFs1 Connect
1.2914 + COMMAND file new
1.2915 + COMMAND file Replace PBASE-F32-File-PublicApi-1603-001-Replace_command005
1.2916 + COMMAND file Write PBASE-F32-File-PublicApi-1603-001-Write_command006
1.2917 + COMMAND file Close
1.2918 + COMMAND file ~
1.2919 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1603-001-Delete_command010
1.2920 + COMMAND RFs1 ~
1.2921 +END_TEST_BLOCK
1.2922 +END_TESTCASE PBASE-F32-File-PublicApi-1603
1.2923 +
1.2924 +
1.2925 +//
1.2926 +// Write4
1.2927 +//
1.2928 +
1.2929 +START_TESTCASE PBASE-F32-File-PublicApi-1701
1.2930 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1701
1.2931 +//! @SYMAPI RFile
1.2932 +//! @SYMTestCaseDesc Asynchronous function write neg. test - pass negative number for length.
1.2933 +//!
1.2934 +//! @SYMTestActions 1. Create RFs session.
1.2935 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1701.txt", EFileWrite.
1.2936 +//! 3. Call Write passing literal "test", -1 for length and TRequestStatus.
1.2937 +//! 4. Close RFile.
1.2938 +//! 5. Delete file.
1.2939 +//! 6. Close RFs.
1.2940 +//!
1.2941 +//! @SYMTestStatus Implemented
1.2942 +//! @SYMTestPriority Critical
1.2943 +//! @SYMTestExpectedResults Write() returns KErrArgument.
1.2944 +//!
1.2945 +//! @SYMTestType CIT
1.2946 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2947 + CREATE_OBJECT RFs RFs1
1.2948 + CREATE_OBJECT RFile file
1.2949 + COMMAND RFs1 new
1.2950 + COMMAND RFs1 Connect
1.2951 + COMMAND file new
1.2952 + COMMAND file Replace PBASE-F32-File-PublicApi-1701-001-Replace_command005
1.2953 + COMMAND !AsyncError=-6 file Write PBASE-F32-File-PublicApi-1701-001-Write_command006
1.2954 + OUTSTANDING
1.2955 + COMMAND file Close
1.2956 + COMMAND file ~
1.2957 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1701-001-Delete_command010
1.2958 + COMMAND RFs1 ~
1.2959 +END_TEST_BLOCK
1.2960 +END_TESTCASE PBASE-F32-File-PublicApi-1701
1.2961 +
1.2962 +START_TESTCASE PBASE-F32-File-PublicApi-1702
1.2963 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1702
1.2964 +//! @SYMAPI RFile
1.2965 +//! @SYMTestCaseDesc Asynchronous function write test - pass 0 for length.
1.2966 +//!
1.2967 +//! @SYMTestActions 1. Create RFs session.
1.2968 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1702.txt", EFileWrite.
1.2969 +//! 3. Call Write passing literal "test", 0 for length and TRequestStatus.
1.2970 +//! 4. Close RFile.
1.2971 +//! 5. Delete file.
1.2972 +//! 6. Close RFs.
1.2973 +//!
1.2974 +//! @SYMTestStatus Implemented
1.2975 +//! @SYMTestPriority Critical
1.2976 +//! @SYMTestExpectedResults No panics raised or errors returned.
1.2977 +//!
1.2978 +//! @SYMTestType CIT
1.2979 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.2980 + CREATE_OBJECT RFs RFs1
1.2981 + CREATE_OBJECT RFile file
1.2982 + COMMAND RFs1 new
1.2983 + COMMAND RFs1 Connect
1.2984 + COMMAND file new
1.2985 + COMMAND file Replace PBASE-F32-File-PublicApi-1702-001-Replace_command005
1.2986 + COMMAND file Write PBASE-F32-File-PublicApi-1702-001-Write_command006
1.2987 + OUTSTANDING
1.2988 + COMMAND file Close
1.2989 + COMMAND file ~
1.2990 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1702-001-Delete_command010
1.2991 + COMMAND RFs1 ~
1.2992 + END_TEST_BLOCK
1.2993 +END_TESTCASE PBASE-F32-File-PublicApi-1702
1.2994 +
1.2995 +
1.2996 +//
1.2997 +// Write5
1.2998 +//
1.2999 +
1.3000 +
1.3001 +START_TESTCASE PBASE-F32-File-PublicApi-1801
1.3002 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1801
1.3003 +//! @SYMAPI RFile
1.3004 +//! @SYMTestCaseDesc Function write neg. test. Write to negative position.
1.3005 +//! Uses API elements:.
1.3006 +//! @SYMTestActions 1. Create RFs session.
1.3007 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1801.txt", EFileWrite.
1.3008 +//! 3. Call Write passing "test" and -1 for position.
1.3009 +//!
1.3010 +//!
1.3011 +//! @SYMTestStatus Implemented
1.3012 +//! @SYMTestPriority Critical
1.3013 +//! @SYMTestExpectedResults Panic FSCLIENT:19.
1.3014 +//!
1.3015 +//! @SYMTestType CIT
1.3016 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3017 + CREATE_OBJECT RFs RFs1
1.3018 + CREATE_OBJECT RFile file
1.3019 + COMMAND RFs1 new
1.3020 + COMMAND RFs1 Connect
1.3021 + COMMAND file new
1.3022 + COMMAND file Replace PBASE-F32-File-PublicApi-1801-001-Replace_command005
1.3023 + COMMAND file Write PBASE-F32-File-PublicApi-1801-001-Write_command006
1.3024 + COMMAND file Close
1.3025 + COMMAND file ~
1.3026 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1801-001-Delete_command010
1.3027 + COMMAND RFs1 ~
1.3028 +END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
1.3029 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3030 + CREATE_OBJECT RFs RFs1
1.3031 + COMMAND RFs1 new
1.3032 + COMMAND RFs1 Connect
1.3033 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1801-001-Delete_command010
1.3034 + COMMAND RFs1 ~
1.3035 +END_TEST_BLOCK
1.3036 +END_TESTCASE PBASE-F32-File-PublicApi-1801
1.3037 +
1.3038 +
1.3039 +START_TESTCASE PBASE-F32-File-PublicApi-1802
1.3040 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1802
1.3041 +//! @SYMAPI RFile
1.3042 +//! @SYMTestCaseDesc Synchronous function write test. Pass a 0 length descriptor to RFile::Write().
1.3043 +//! Uses API elements: void Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus).
1.3044 +//! @SYMTestActions 1. Create RFs session.
1.3045 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1802.txt", EFileWrite.
1.3046 +//! 3. Call Write passing "" and 1 for position.
1.3047 +//!
1.3048 +//!
1.3049 +//! @SYMTestStatus Implemented
1.3050 +//! @SYMTestPriority Critical
1.3051 +//! @SYMTestExpectedResults No error is returned or panic raised.
1.3052 +//!
1.3053 +//! @SYMTestType CIT
1.3054 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3055 + CREATE_OBJECT RFs RFs1
1.3056 + CREATE_OBJECT RFile file
1.3057 + COMMAND RFs1 new
1.3058 + COMMAND RFs1 Connect
1.3059 + COMMAND file new
1.3060 + COMMAND file Replace PBASE-F32-File-PublicApi-1802-001-Replace_command005
1.3061 + COMMAND file Write PBASE-F32-File-PublicApi-1802-001-Write_command006
1.3062 + COMMAND file Close
1.3063 + COMMAND file ~
1.3064 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1802-001-Delete_command010
1.3065 + COMMAND RFs1 ~
1.3066 + END_TEST_BLOCK
1.3067 +END_TESTCASE PBASE-F32-File-PublicApi-1802
1.3068 +
1.3069 +
1.3070 +//
1.3071 +// Write6
1.3072 +//
1.3073 +
1.3074 +
1.3075 +START_TESTCASE PBASE-F32-File-PublicApi-1901
1.3076 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1901
1.3077 +//! @SYMAPI RFile
1.3078 +//! @SYMTestCaseDesc Asynchronous function write neg. test. Pass a negative number for position to RFile::Write().
1.3079 +//! Uses API elements: void Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus).
1.3080 +//! @SYMTestActions 1. Create RFs session.
1.3081 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1901.txt", EFileWrite.
1.3082 +//! 3. Call Write passing "test" and -1 for position.
1.3083 +//!
1.3084 +//!
1.3085 +//! @SYMTestStatus Implemented
1.3086 +//! @SYMTestPriority Critical
1.3087 +//! @SYMTestExpectedResults Panic FSCLIENT:19.
1.3088 +//!
1.3089 +//! @SYMTestType CIT
1.3090 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3091 + CREATE_OBJECT RFs RFs1
1.3092 + CREATE_OBJECT RFile file
1.3093 + COMMAND RFs1 new
1.3094 + COMMAND RFs1 Connect
1.3095 + COMMAND file new
1.3096 + COMMAND file Replace PBASE-F32-File-PublicApi-1901-001-Replace_command005
1.3097 + COMMAND file Write PBASE-F32-File-PublicApi-1901-001-Write_command006
1.3098 + OUTSTANDING
1.3099 + COMMAND file Close
1.3100 + COMMAND file ~
1.3101 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1901-001-Delete_command010
1.3102 + COMMAND RFs1 ~
1.3103 +END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
1.3104 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3105 + CREATE_OBJECT RFs RFs1
1.3106 + COMMAND RFs1 new
1.3107 + COMMAND RFs1 Connect
1.3108 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1901-001-Delete_command010
1.3109 + COMMAND RFs1 ~
1.3110 +END_TEST_BLOCK
1.3111 +END_TESTCASE PBASE-F32-File-PublicApi-1901
1.3112 +
1.3113 +
1.3114 +START_TESTCASE PBASE-F32-File-PublicApi-1902
1.3115 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-1902
1.3116 +//! @SYMAPI RFile
1.3117 +//! @SYMTestCaseDesc Asynchronous function write test. Pass a 0 length descriptor to RFile::Write().
1.3118 +//! Uses API elements: void Write(TInt aPos, const TDesC8 &aDes, TRequestStatus &aStatus).
1.3119 +//! @SYMTestActions 1. Create RFs session.
1.3120 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc1902.txt", EFileWrite.
1.3121 +//! 3. Call Write passing descriptor with length 0 and 1 for position.
1.3122 +//!
1.3123 +//!
1.3124 +//! @SYMTestStatus Implemented
1.3125 +//! @SYMTestPriority Critical
1.3126 +//! @SYMTestExpectedResults No error is returned or panic raised.
1.3127 +//!
1.3128 +//! @SYMTestType CIT
1.3129 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3130 + CREATE_OBJECT RFs RFs1
1.3131 + CREATE_OBJECT RFile file
1.3132 + COMMAND RFs1 new
1.3133 + COMMAND RFs1 Connect
1.3134 + COMMAND file new
1.3135 + COMMAND file Replace PBASE-F32-File-PublicApi-1902-001-Replace_command005
1.3136 + COMMAND file Write PBASE-F32-File-PublicApi-1902-001-Write_command006
1.3137 + OUTSTANDING
1.3138 + COMMAND file Close
1.3139 + COMMAND file ~
1.3140 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-1902-001-Delete_command010
1.3141 + COMMAND RFs1 ~
1.3142 + END_TEST_BLOCK
1.3143 +END_TESTCASE PBASE-F32-File-PublicApi-1902
1.3144 +
1.3145 +
1.3146 +//
1.3147 +// Write7
1.3148 +//
1.3149 +
1.3150 +
1.3151 +START_TESTCASE PBASE-F32-File-PublicApi-2001
1.3152 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2001
1.3153 +//! @SYMAPI RFile
1.3154 +//! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) neg. test. Pass a negative position and negative length.
1.3155 +//! Uses API elements: Write().
1.3156 +//! @SYMTestActions 1. Create RFs session.
1.3157 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2001.txt", EFileWrite.
1.3158 +//! 3. call write, pass "test", -1 for length, -1 for position.
1.3159 +//!
1.3160 +//!
1.3161 +//! @SYMTestStatus Implemented
1.3162 +//! @SYMTestPriority Critical
1.3163 +//! @SYMTestExpectedResults Panic, FSCLIENT:19
1.3164 +//!
1.3165 +//! @SYMTestType CIT
1.3166 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3167 + CREATE_OBJECT RFs RFs1
1.3168 + CREATE_OBJECT RFile file
1.3169 + COMMAND RFs1 new
1.3170 + COMMAND RFs1 Connect
1.3171 + COMMAND file new
1.3172 + COMMAND file Replace PBASE-F32-File-PublicApi-2001-001-Replace_command005
1.3173 + COMMAND file Write PBASE-F32-File-PublicApi-2001-001-Write_command006
1.3174 + COMMAND file Close
1.3175 + COMMAND file ~
1.3176 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2001-001-Delete_command010
1.3177 + COMMAND RFs1 ~
1.3178 +END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
1.3179 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3180 + CREATE_OBJECT RFs RFs1
1.3181 + COMMAND RFs1 new
1.3182 + COMMAND RFs1 Connect
1.3183 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2001-001-Delete_command010
1.3184 + COMMAND RFs1 ~
1.3185 +END_TEST_BLOCK
1.3186 +END_TESTCASE PBASE-F32-File-PublicApi-2001
1.3187 +
1.3188 +
1.3189 +START_TESTCASE PBASE-F32-File-PublicApi-2002
1.3190 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2002
1.3191 +//! @SYMAPI RFile
1.3192 +//! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test. Pass 0 for length.
1.3193 +//! Uses API elements: Write().
1.3194 +//! @SYMTestActions 1. Create RFs session.
1.3195 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2002.txt", EFileWrite.
1.3196 +//! 3. call write, pass "test", 0 for length, 0 for position.
1.3197 +//!
1.3198 +//!
1.3199 +//! @SYMTestStatus Implemented
1.3200 +//! @SYMTestPriority Critical
1.3201 +//! @SYMTestExpectedResults No panic is raised and no error is returned
1.3202 +//!
1.3203 +//! @SYMTestType CIT
1.3204 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3205 + CREATE_OBJECT RFs RFs1
1.3206 + CREATE_OBJECT RFile file
1.3207 + COMMAND RFs1 new
1.3208 + COMMAND RFs1 Connect
1.3209 + COMMAND file new
1.3210 + COMMAND file Replace PBASE-F32-File-PublicApi-2002-001-Replace_command005
1.3211 + COMMAND file Write PBASE-F32-File-PublicApi-2002-001-Write_command006
1.3212 + COMMAND file Close
1.3213 + COMMAND file ~
1.3214 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2002-001-Delete_command010
1.3215 + COMMAND RFs1 ~
1.3216 +END_TEST_BLOCK
1.3217 +END_TESTCASE PBASE-F32-File-PublicApi-2002
1.3218 +
1.3219 +
1.3220 +START_TESTCASE PBASE-F32-File-PublicApi-2003
1.3221 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2003
1.3222 +//! @SYMAPI RFile
1.3223 +//! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test. Pass -1 for length.
1.3224 +//! Uses API elements: Write().
1.3225 +//! @SYMTestActions 1. Create RFs session.
1.3226 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2003.txt", EFileWrite.
1.3227 +//! 3. call write, pass "test", -1 for length, 0 for position.
1.3228 +//!
1.3229 +//!
1.3230 +//! @SYMTestStatus Implemented
1.3231 +//! @SYMTestPriority Critical
1.3232 +//! @SYMTestExpectedResults RFile::Write returns KerrArgument
1.3233 +//!
1.3234 +//! @SYMTestType CIT
1.3235 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3236 + CREATE_OBJECT RFs RFs1
1.3237 + CREATE_OBJECT RFile file
1.3238 + COMMAND RFs1 new
1.3239 + COMMAND RFs1 Connect
1.3240 + COMMAND file new
1.3241 + COMMAND file Replace PBASE-F32-File-PublicApi-2003-001-Replace_command005
1.3242 + COMMAND !Error=-6 file Write PBASE-F32-File-PublicApi-2003-001-Write_command006
1.3243 + COMMAND file Close
1.3244 + COMMAND file ~
1.3245 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2003-001-Delete_command010
1.3246 + COMMAND RFs1 ~
1.3247 +END_TEST_BLOCK
1.3248 +END_TESTCASE PBASE-F32-File-PublicApi-2003
1.3249 +
1.3250 +
1.3251 +//
1.3252 +// Write8
1.3253 +//
1.3254 +
1.3255 +
1.3256 +START_TESTCASE PBASE-F32-File-PublicApi-2101
1.3257 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2101
1.3258 +//! @SYMAPI RFile
1.3259 +//! @SYMTestCaseDesc Asynchronous function write test. Pass a negative position and negative length.
1.3260 +//! Uses API elements: Write().
1.3261 +//! @SYMTestActions 1. Create RFs session.
1.3262 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2101.txt", EFileWrite.
1.3263 +//! 3. call write, pass literal "negative write test", -1 for length, -1 for negative, TRequestStatus.
1.3264 +//!
1.3265 +//!
1.3266 +//! @SYMTestStatus Implemented
1.3267 +//! @SYMTestPriority Critical
1.3268 +//! @SYMTestExpectedResults Panic, FSCLIENT:19
1.3269 +//!
1.3270 +//! @SYMTestType CIT
1.3271 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3272 + CREATE_OBJECT RFs RFs1
1.3273 + CREATE_OBJECT RFile file
1.3274 + COMMAND RFs1 new
1.3275 + COMMAND RFs1 Connect
1.3276 + COMMAND file new
1.3277 + COMMAND file Replace PBASE-F32-File-PublicApi-2101-001-Replace_command005
1.3278 + COMMAND file Write PBASE-F32-File-PublicApi-2101-001-Write_command006
1.3279 + OUTSTANDING
1.3280 + COMMAND file Close
1.3281 + COMMAND file ~
1.3282 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2101-001-Delete_command010
1.3283 + COMMAND RFs1 ~
1.3284 +END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
1.3285 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3286 + CREATE_OBJECT RFs RFs1
1.3287 + COMMAND RFs1 new
1.3288 + COMMAND RFs1 Connect
1.3289 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2101-001-Delete_command010
1.3290 + COMMAND RFs1 ~
1.3291 +END_TEST_BLOCK
1.3292 +END_TESTCASE PBASE-F32-File-PublicApi-2101
1.3293 +
1.3294 +
1.3295 +START_TESTCASE PBASE-F32-File-PublicApi-2102
1.3296 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2102
1.3297 +//! @SYMAPI RFile
1.3298 +//! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test. Pass 0 for length.
1.3299 +//! Uses API elements: Write().
1.3300 +//! @SYMTestActions 1. Create RFs session.
1.3301 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2102.txt", EFileWrite.
1.3302 +//! 3. call write, pass "test", 0 for length, 0 for position.
1.3303 +//!
1.3304 +//!
1.3305 +//! @SYMTestStatus Implemented
1.3306 +//! @SYMTestPriority Critical
1.3307 +//! @SYMTestExpectedResults No panic is raised and no error is returned
1.3308 +//!
1.3309 +//! @SYMTestType CIT
1.3310 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3311 + CREATE_OBJECT RFs RFs1
1.3312 + CREATE_OBJECT RFile file
1.3313 + COMMAND RFs1 new
1.3314 + COMMAND RFs1 Connect
1.3315 + COMMAND file new
1.3316 + COMMAND file Replace PBASE-F32-File-PublicApi-2102-001-Replace_command005
1.3317 + COMMAND file Write PBASE-F32-File-PublicApi-2102-001-Write_command006
1.3318 + OUTSTANDING
1.3319 + COMMAND file Close
1.3320 + COMMAND file ~
1.3321 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2102-001-Delete_command010
1.3322 + COMMAND RFs1 ~
1.3323 +END_TEST_BLOCK
1.3324 +END_TESTCASE PBASE-F32-File-PublicApi-2102
1.3325 +
1.3326 +
1.3327 +START_TESTCASE PBASE-F32-File-PublicApi-2103
1.3328 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2103
1.3329 +//! @SYMAPI RFile
1.3330 +//! @SYMTestCaseDesc Function Write(TInt aPos, const TDesC8 &aDes, TInt aLength) test. Pass a negative length.
1.3331 +//! Uses API elements: Write().
1.3332 +//! @SYMTestActions 1. Create RFs session.
1.3333 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2103.txt", EFileWrite.
1.3334 +//! 3. call write, pass "test", -1 for length, 0 for position.
1.3335 +//!
1.3336 +//!
1.3337 +//! @SYMTestStatus Implemented
1.3338 +//! @SYMTestPriority Critical
1.3339 +//! @SYMTestExpectedResults RFile::Write returns KerrArgument
1.3340 +//!
1.3341 +//! @SYMTestType CIT
1.3342 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3343 + CREATE_OBJECT RFs RFs1
1.3344 + CREATE_OBJECT RFile file
1.3345 + COMMAND RFs1 new
1.3346 + COMMAND RFs1 Connect
1.3347 + COMMAND file new
1.3348 + COMMAND file Replace PBASE-F32-File-PublicApi-2103-001-Replace_command005
1.3349 + COMMAND !AsyncError=-6 file Write PBASE-F32-File-PublicApi-2103-001-Write_command006
1.3350 + OUTSTANDING
1.3351 + COMMAND file Close
1.3352 + COMMAND file ~
1.3353 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2103-001-Delete_command010
1.3354 + COMMAND RFs1 ~
1.3355 +END_TEST_BLOCK
1.3356 +END_TESTCASE PBASE-F32-File-PublicApi-2103
1.3357 +
1.3358 +
1.3359 +//
1.3360 +// Lock
1.3361 +//
1.3362 +
1.3363 +
1.3364 +START_TESTCASE PBASE-F32-File-PublicApi-2201
1.3365 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2201
1.3366 +//! @SYMAPI RFile
1.3367 +//! @SYMTestCaseDesc Function Lock() neg. test - open a file and try to lock zero bytes.
1.3368 +//! Uses API elements: Lock(), Unlock(), Read().
1.3369 +//! @SYMTestActions 1. Create RFs session
1.3370 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2201.txt", EFileRead.
1.3371 +//! 3. Write "test" to file.
1.3372 +//! 4. Lock the file by Calling Lock(), passing pos 0, len 0.
1.3373 +//! 5. Close file.
1.3374 +//! 6. Close fs session.
1.3375 +//!
1.3376 +//!
1.3377 +//! @SYMTestStatus Implemented
1.3378 +//! @SYMTestPriority Critical
1.3379 +//! @SYMTestExpectedResults Panic - FSCLIENT:17
1.3380 +//!
1.3381 +//! @SYMTestType CIT
1.3382 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3383 + CREATE_OBJECT RFs RFs1
1.3384 + CREATE_OBJECT RFile file
1.3385 + COMMAND RFs1 new
1.3386 + COMMAND RFs1 Connect
1.3387 + COMMAND file new
1.3388 + COMMAND file Replace PBASE-F32-File-PublicApi-2201-001-Replace_command005
1.3389 + COMMAND file Write PBASE-F32-File-PublicApi-2201-001-Write_command006
1.3390 + COMMAND file Lock PBASE-F32-File-PublicApi-2201-001-Lock_command007
1.3391 + COMMAND file Close
1.3392 + COMMAND file ~
1.3393 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2201-001-Delete_command011
1.3394 + COMMAND RFs1 ~
1.3395 +END_TEST_BLOCK !PanicCode=17 !PanicString="FSCLIENT"
1.3396 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3397 + CREATE_OBJECT RFs RFs1
1.3398 + COMMAND RFs1 new
1.3399 + COMMAND RFs1 Connect
1.3400 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2201-001-Delete_command011
1.3401 + COMMAND RFs1 ~
1.3402 +END_TEST_BLOCK
1.3403 +END_TESTCASE PBASE-F32-File-PublicApi-2201
1.3404 +
1.3405 +
1.3406 +START_TESTCASE PBASE-F32-File-PublicApi-2202
1.3407 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2202
1.3408 +//! @SYMAPI RFile
1.3409 +//! @SYMTestCaseDesc Function Lock() neg. test - open same file with two handles, try to lock the same region twice.
1.3410 +//! Uses API elements: Lock(), Unlock(), Read().
1.3411 +//! @SYMTestActions 1. Create RFs session
1.3412 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2202.txt", EFileWrite, open file as fileOne.
1.3413 +//! 3. Lock the file by Calling Lock().
1.3414 +//! 4. Open "{Drives, RAMDriveTestPath}file\tc2202.txt" as fileTwo.
1.3415 +//! 5. lock the file 2 at the same position and length as fileOne.
1.3416 +//! 6. Close fileOne.
1.3417 +//! 7. Close fileTwo
1.3418 +//! 8. Delete file
1.3419 +//! 9. Close first RFs.
1.3420 +//!
1.3421 +//! @SYMTestStatus Implemented
1.3422 +//! @SYMTestPriority Critical
1.3423 +//! @SYMTestExpectedResults Lock() returns KErrLocked at step 5.
1.3424 +//!
1.3425 +//! @SYMTestType CIT
1.3426 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3427 + CREATE_OBJECT RFs RFs1
1.3428 + CREATE_OBJECT RFile file
1.3429 + CREATE_OBJECT RFile file2
1.3430 + COMMAND RFs1 new
1.3431 + COMMAND RFs1 Connect
1.3432 + COMMAND file new
1.3433 + COMMAND file Replace PBASE-F32-File-PublicApi-2202-001-Replace_command005
1.3434 + COMMAND file Write PBASE-F32-File-PublicApi-2202-001-Write_command006
1.3435 + COMMAND file Lock PBASE-F32-File-PublicApi-2202-001-Lock_command007
1.3436 + COMMAND file2 new
1.3437 + COMMAND file2 Open PBASE-F32-File-PublicApi-2202-001-Open_command010
1.3438 + COMMAND !Error=-22 file2 Lock PBASE-F32-File-PublicApi-2202-001-Lock_command011
1.3439 + COMMAND file2 Close
1.3440 + COMMAND file2 ~
1.3441 + COMMAND file Close
1.3442 + COMMAND file ~
1.3443 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2202-001-Delete_command017
1.3444 + COMMAND RFs1 ~
1.3445 +END_TEST_BLOCK
1.3446 +END_TESTCASE PBASE-F32-File-PublicApi-2202
1.3447 +
1.3448 +
1.3449 +START_TESTCASE PBASE-F32-File-PublicApi-2203
1.3450 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2203
1.3451 +//! @SYMAPI RFile
1.3452 +//! @SYMTestCaseDesc Function Lock() neg. test - try to lock negative length.
1.3453 +//! Uses API elements: Lock(), Unlock(), Read().
1.3454 +//! @SYMTestActions 1. Create RFs session
1.3455 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2203.txt", EFileWrite, open file as fileOne.
1.3456 +//! 3. Lock the file by Calling Lock() with 0 for pos and -1 for length.
1.3457 +//!
1.3458 +//! @SYMTestStatus Implemented
1.3459 +//! @SYMTestPriority Critical
1.3460 +//! @SYMTestExpectedResults Lock() returns panic.
1.3461 +//!
1.3462 +//! @SYMTestType CIT
1.3463 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3464 + CREATE_OBJECT RFs RFs1
1.3465 + CREATE_OBJECT RFile file
1.3466 + COMMAND RFs1 new
1.3467 + COMMAND RFs1 Connect
1.3468 + COMMAND file new
1.3469 + COMMAND file Replace PBASE-F32-File-PublicApi-2203-001-Replace_command005
1.3470 + COMMAND file Write PBASE-F32-File-PublicApi-2203-001-Write_command006
1.3471 + COMMAND file Lock PBASE-F32-File-PublicApi-2203-001-Lock_command007
1.3472 +END_TEST_BLOCK !PanicCode=17 !PanicString="FSCLIENT"
1.3473 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3474 + CREATE_OBJECT RFs RFs1
1.3475 + COMMAND RFs1 new
1.3476 + COMMAND RFs1 Connect
1.3477 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2203-001-Delete_command011
1.3478 + COMMAND RFs1 ~
1.3479 +END_TEST_BLOCK
1.3480 +END_TESTCASE PBASE-F32-File-PublicApi-2203
1.3481 +
1.3482 +
1.3483 +START_TESTCASE PBASE-F32-File-PublicApi-2204
1.3484 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2204
1.3485 +//! @SYMAPI RFile
1.3486 +//! @SYMTestCaseDesc Function Lock() neg. test - try to lock negative position.
1.3487 +//! Uses API elements: Lock(), Unlock(), Read().
1.3488 +//! @SYMTestActions 1. Create RFs session
1.3489 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2204.txt", EFileWrite, open file as fileOne.
1.3490 +//! 3. Lock the file by Calling Lock() with -1 for pos and 1 for length.
1.3491 +//! 4. Close file.
1.3492 +//! 5. Delete file.
1.3493 +//! 6. Close RFs.
1.3494 +//!
1.3495 +//! @SYMTestStatus Implemented
1.3496 +//! @SYMTestPriority Critical
1.3497 +//! @SYMTestExpectedResults No error returned or panic raised.
1.3498 +//!
1.3499 +//! @SYMTestType CIT
1.3500 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3501 + CREATE_OBJECT RFs RFs1
1.3502 + CREATE_OBJECT RFile file
1.3503 + COMMAND RFs1 new
1.3504 + COMMAND RFs1 Connect
1.3505 + COMMAND file new
1.3506 + COMMAND file Replace PBASE-F32-File-PublicApi-2204-001-Replace_command005
1.3507 + COMMAND file Write PBASE-F32-File-PublicApi-2204-001-Write_command006
1.3508 + COMMAND file Lock PBASE-F32-File-PublicApi-2204-001-Lock_command007
1.3509 +END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
1.3510 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3511 + CREATE_OBJECT RFs RFs1
1.3512 + COMMAND RFs1 new
1.3513 + COMMAND RFs1 Connect
1.3514 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2204-001-Delete_command010
1.3515 + COMMAND RFs1 ~
1.3516 +END_TEST_BLOCK
1.3517 +END_TESTCASE PBASE-F32-File-PublicApi-2204
1.3518 +
1.3519 +START_TESTCASE PBASE-F32-File-PublicApi-2205
1.3520 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2205
1.3521 +//! @SYMAPI RFile
1.3522 +//! @SYMTestCaseDesc Function Lock() neg. test - try to write to locked file.
1.3523 +//! Uses API elements: Lock(), Unlock(), Read().
1.3524 +//! @SYMTestActions 1. Create RFs session
1.3525 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2205.txt", EFileWrite, open file as file1.
1.3526 +//! 3. Call RFile::Open passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2205.txt", EFileWrite | EFileShareAny, open file as file2.
1.3527 +//! 4. Write "test" to file through file1.
1.3528 +//! 5. Lock the file by Calling Lock() with 6 for pos and 4 for length, through file1
1.3529 +//! 6. Write "Trying to write to locked region" through new handle
1.3530 +//! 7. Close file.
1.3531 +//! 8. Close second handle
1.3532 +//! 9. Delete file.
1.3533 +//! 10. Close RFs.
1.3534 +//!
1.3535 +//! @SYMTestStatus Implemented
1.3536 +//! @SYMTestPriority Critical
1.3537 +//! @SYMTestExpectedResults trying to write to locked file returns KErrLocked
1.3538 +//!
1.3539 +//! @SYMTestType CIT
1.3540 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3541 + CREATE_OBJECT RFs RFs1
1.3542 + CREATE_OBJECT RFile file
1.3543 + CREATE_OBJECT RFile file2
1.3544 + COMMAND RFs1 new
1.3545 + COMMAND RFs1 Connect
1.3546 + COMMAND file new
1.3547 + COMMAND file Replace PBASE-F32-File-PublicApi-2205-001-Replace_command005
1.3548 + COMMAND file2 new
1.3549 + COMMAND file2 Open PBASE-F32-File-PublicApi-2205-001-Open_command008
1.3550 + COMMAND file Write PBASE-F32-File-PublicApi-2205-001-Write_command010
1.3551 + COMMAND file Lock PBASE-F32-File-PublicApi-2205-001-Lock_command011
1.3552 + COMMAND !Error=-22 file2 Write PBASE-F32-File-PublicApi-2205-001-Write_command013
1.3553 + COMMAND file2 Close
1.3554 + COMMAND file2 ~
1.3555 + COMMAND file Close
1.3556 + COMMAND file ~
1.3557 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2205-001-Delete_command020
1.3558 + COMMAND RFs1 ~
1.3559 +END_TEST_BLOCK
1.3560 +END_TESTCASE PBASE-F32-File-PublicApi-2205
1.3561 +
1.3562 +//
1.3563 +// UnLock
1.3564 +//
1.3565 +
1.3566 +
1.3567 +START_TESTCASE PBASE-F32-File-PublicApi-2301
1.3568 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2301
1.3569 +//! @SYMAPI RFile
1.3570 +//! @SYMTestCaseDesc Function UnLock() neg. test - open a file try to unlock a region that has not been locked.
1.3571 +//!
1.3572 +//! @SYMTestActions 1. Create RFs session
1.3573 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2301.txt", EFileWrite.
1.3574 +//! 3. write "test data" to file.
1.3575 +//! 4. call UnLock with position 2 and with length 4
1.3576 +//! 5. close file
1.3577 +//! 6. Delete file.
1.3578 +//! 7. close fs.
1.3579 +//!
1.3580 +//! @SYMTestStatus Implemented
1.3581 +//! @SYMTestPriority Critical
1.3582 +//! @SYMTestExpectedResults UnLock() returns KErrNotFound.
1.3583 +//!
1.3584 +//! @SYMTestType CIT
1.3585 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3586 + CREATE_OBJECT RFs RFs1
1.3587 + CREATE_OBJECT RFile file
1.3588 + COMMAND RFs1 new
1.3589 + COMMAND RFs1 Connect
1.3590 + COMMAND file new
1.3591 + COMMAND file Replace PBASE-F32-File-PublicApi-2301-001-Replace_command005
1.3592 + COMMAND file Write PBASE-F32-File-PublicApi-2301-001-Write_command006
1.3593 + COMMAND !Error=-1 file UnLock PBASE-F32-File-PublicApi-2301-001-UnLock_command007
1.3594 + COMMAND file Close
1.3595 + COMMAND file ~
1.3596 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2301-001-Delete_command011
1.3597 + COMMAND RFs1 ~
1.3598 +END_TEST_BLOCK
1.3599 +END_TESTCASE PBASE-F32-File-PublicApi-2301
1.3600 +
1.3601 +
1.3602 +START_TESTCASE PBASE-F32-File-PublicApi-2302
1.3603 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2302
1.3604 +//! @SYMAPI RFile
1.3605 +//! @SYMTestCaseDesc Function UnLock() neg. test - open a file lock some part, try to unlock a portion of the locked region.
1.3606 +//!
1.3607 +//! @SYMTestActions 1. Create RFs session
1.3608 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2302.txt", EFileWrite.
1.3609 +//! 3. Write some data to file.
1.3610 +//! 4. Lock the file by Calling Lock() with pos 0 and length 2.
1.3611 +//! 5. UnLock a portion of that file with posi 0 and length 1.
1.3612 +//! 6. Close that file.
1.3613 +//! 7. Delete file.
1.3614 +//! 8. close fs session.
1.3615 +//!
1.3616 +//! @SYMTestStatus Implemented
1.3617 +//! @SYMTestPriority Critical
1.3618 +//! @SYMTestExpectedResults UnLock() returns KErrNotFound.
1.3619 +//!
1.3620 +//! @SYMTestType CIT
1.3621 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3622 + CREATE_OBJECT RFs RFs1
1.3623 + CREATE_OBJECT RFile file
1.3624 + COMMAND RFs1 new
1.3625 + COMMAND RFs1 Connect
1.3626 + COMMAND file new
1.3627 + COMMAND file Replace PBASE-F32-File-PublicApi-2302-001-Replace_command005
1.3628 + COMMAND file Write PBASE-F32-File-PublicApi-2302-001-Write_command006
1.3629 + COMMAND file Lock PBASE-F32-File-PublicApi-2302-001-Lock_command007
1.3630 + COMMAND !Error=-1 file UnLock PBASE-F32-File-PublicApi-2302-001-Close_command008
1.3631 + COMMAND file Close
1.3632 + COMMAND file ~
1.3633 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2302-001-Delete_command014
1.3634 + COMMAND RFs1 ~
1.3635 +END_TEST_BLOCK
1.3636 +END_TESTCASE PBASE-F32-File-PublicApi-2302
1.3637 +
1.3638 +
1.3639 +START_TESTCASE PBASE-F32-File-PublicApi-2303
1.3640 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2303
1.3641 +//! @SYMAPI RFile
1.3642 +//! @SYMTestCaseDesc Function UnLock() neg. test - UnLock a region with negative length
1.3643 +//!
1.3644 +//! @SYMTestActions 1. Create RFs session
1.3645 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2303.txt", EFileWrite.
1.3646 +//! 3. Write some data to file.
1.3647 +//! 4. Call Lock with pos 2, length 2.
1.3648 +//! 5. UnLock by calling 2 for position -2 for length.
1.3649 +//!
1.3650 +//! @SYMTestStatus Implemented
1.3651 +//! @SYMTestPriority Critical
1.3652 +//! @SYMTestExpectedResults UnLock() causes FSCLIENT:18.
1.3653 +//!
1.3654 +//! @SYMTestType CIT
1.3655 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3656 + CREATE_OBJECT RFs RFs1
1.3657 + CREATE_OBJECT RFile file
1.3658 + COMMAND RFs1 new
1.3659 + COMMAND RFs1 Connect
1.3660 + COMMAND file new
1.3661 + COMMAND file Replace PBASE-F32-File-PublicApi-2303-001-Replace_command005
1.3662 + COMMAND file Write PBASE-F32-File-PublicApi-2303-001-Write_command006
1.3663 + COMMAND file Lock PBASE-F32-File-PublicApi-2303-001-Lock_command007
1.3664 + COMMAND file UnLock PBASE-F32-File-PublicApi-2303-001-UnLock_command008
1.3665 +END_TEST_BLOCK !PanicCode=18 !PanicString="FSCLIENT"
1.3666 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3667 + CREATE_OBJECT RFs RFs1
1.3668 + COMMAND RFs1 new
1.3669 + COMMAND RFs1 Connect
1.3670 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2303-001-Delete_command011
1.3671 + COMMAND RFs1 ~
1.3672 +END_TEST_BLOCK
1.3673 +END_TESTCASE PBASE-F32-File-PublicApi-2303
1.3674 +
1.3675 +
1.3676 +START_TESTCASE PBASE-F32-File-PublicApi-2304
1.3677 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2304
1.3678 +//! @SYMAPI RFile
1.3679 +//! @SYMTestCaseDesc Function UnLock() neg. test - UnLock a region with negative position
1.3680 +//!
1.3681 +//! @SYMTestActions 1. Create RFs session
1.3682 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2304.txt", EFileWrite.
1.3683 +//! 3. Write some data to file.
1.3684 +//! 4. Call Lock with pos 2, length 2.
1.3685 +//! 5. UnLock by calling -2 for position 2 for length.
1.3686 +//! 6. Close that file.
1.3687 +//! 7. Delete file.
1.3688 +//! 8. close fs session.
1.3689 +//!
1.3690 +//! @SYMTestStatus Implemented
1.3691 +//! @SYMTestPriority Critical
1.3692 +//! @SYMTestExpectedResults RFile::UnLock() causes FSCLIENT:19.
1.3693 +//!
1.3694 +//! @SYMTestType CIT
1.3695 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3696 + CREATE_OBJECT RFs RFs1
1.3697 + CREATE_OBJECT RFile file
1.3698 + COMMAND RFs1 new
1.3699 + COMMAND RFs1 Connect
1.3700 + COMMAND file new
1.3701 + COMMAND file Replace PBASE-F32-File-PublicApi-2304-001-Replace_command005
1.3702 + COMMAND file Write PBASE-F32-File-PublicApi-2304-001-Write_command006
1.3703 + COMMAND file Lock PBASE-F32-File-PublicApi-2304-001-Lock_command007
1.3704 + COMMAND file UnLock PBASE-F32-File-PublicApi-2304-001-UnLock_command008
1.3705 +END_TEST_BLOCK !PanicCode=19 !PanicString="FSCLIENT panic"
1.3706 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3707 + CREATE_OBJECT RFs RFs1
1.3708 + COMMAND RFs1 new
1.3709 + COMMAND RFs1 Connect
1.3710 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2304-001-Delete_command012
1.3711 + COMMAND RFs1 ~
1.3712 +END_TEST_BLOCK
1.3713 +END_TESTCASE PBASE-F32-File-PublicApi-2304
1.3714 +
1.3715 +
1.3716 +//
1.3717 +// Seek
1.3718 +//
1.3719 +
1.3720 +
1.3721 +START_TESTCASE PBASE-F32-File-PublicApi-2401
1.3722 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2401
1.3723 +//! @SYMAPI RFile
1.3724 +//! @SYMTestCaseDesc Function Seek() neg. test - try to seek to negative position.
1.3725 +//!
1.3726 +//! @SYMTestActions 1. Create RFs session
1.3727 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2401.txt", EFileWrite.
1.3728 +//! 3. Write "Seek test" to file.
1.3729 +//! 4. Call RFile::Seek() passing ESeekStart, -10.
1.3730 +//! 5. Close file.
1.3731 +//! 6. Delete file.
1.3732 +//! 7. Close fs session.
1.3733 +//!
1.3734 +//! @SYMTestStatus Implemented
1.3735 +//! @SYMTestPriority Critical
1.3736 +//! @SYMTestExpectedResults Seek returns KErrArgument.
1.3737 +//!
1.3738 +//! @SYMTestType CIT
1.3739 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3740 + CREATE_OBJECT RFs RFs1
1.3741 + CREATE_OBJECT RFile file
1.3742 + COMMAND RFs1 new
1.3743 + COMMAND RFs1 Connect
1.3744 + COMMAND file new
1.3745 + COMMAND file Replace PBASE-F32-File-PublicApi-2401-001-Replace_command005
1.3746 + COMMAND file Write PBASE-F32-File-PublicApi-2401-001-Write_command006
1.3747 + COMMAND !Error=-6 file Seek PBASE-F32-File-PublicApi-2401-001-Seek_command007
1.3748 + COMMAND file Close
1.3749 + COMMAND file ~
1.3750 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2401-001-Delete_command011
1.3751 + COMMAND RFs1 ~
1.3752 +END_TEST_BLOCK
1.3753 +END_TESTCASE PBASE-F32-File-PublicApi-2401
1.3754 +
1.3755 +
1.3756 +//
1.3757 +// Flush
1.3758 +//
1.3759 +
1.3760 +
1.3761 +
1.3762 +
1.3763 +//
1.3764 +// Size
1.3765 +//
1.3766 +
1.3767 +
1.3768 +
1.3769 +
1.3770 +//
1.3771 +// SetSize
1.3772 +//
1.3773 +
1.3774 +
1.3775 +START_TESTCASE PBASE-F32-File-PublicApi-2701
1.3776 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2701
1.3777 +//! @SYMAPI RFile
1.3778 +//! @SYMTestCaseDesc Function SetSize() neg test - try to pass a negative size.
1.3779 +//!
1.3780 +//! @SYMTestActions 1. Create RFs session.
1.3781 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2701.txt", EFileWrite.
1.3782 +//! 3. Write "test" to file.
1.3783 +//! 3. Call SetSize with -2.
1.3784 +//!
1.3785 +//! @SYMTestStatus Implemented
1.3786 +//! @SYMTestPriority Critical
1.3787 +//! @SYMTestExpectedResults Panic - FSCLIENT:20
1.3788 +//!
1.3789 +//! @SYMTestType CIT
1.3790 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3791 + CREATE_OBJECT RFs RFs1
1.3792 + CREATE_OBJECT RFile file
1.3793 + COMMAND RFs1 new
1.3794 + COMMAND RFs1 Connect
1.3795 + COMMAND file new
1.3796 + COMMAND file Replace PBASE-F32-File-PublicApi-2701-001-Replace_command005
1.3797 + COMMAND file Write PBASE-F32-File-PublicApi-2701-001-Write_command006
1.3798 + COMMAND file SetSize PBASE-F32-File-PublicApi-2701-001-SetSize_command007
1.3799 + COMMAND file Close
1.3800 + COMMAND file ~
1.3801 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2701-001-Delete_command011
1.3802 + COMMAND RFs1 ~
1.3803 +END_TEST_BLOCK !PanicCode=20 !PanicString="FSCLIENT"
1.3804 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3805 + CREATE_OBJECT RFs RFs1
1.3806 + COMMAND RFs1 new
1.3807 + COMMAND RFs1 Connect
1.3808 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2701-001-Delete_command011
1.3809 + COMMAND RFs1 ~
1.3810 +END_TEST_BLOCK
1.3811 +END_TESTCASE PBASE-F32-File-PublicApi-2701
1.3812 +
1.3813 +
1.3814 +//
1.3815 +// Att
1.3816 +//
1.3817 +
1.3818 +
1.3819 +
1.3820 +//
1.3821 +// SetAtt
1.3822 +//
1.3823 +
1.3824 +
1.3825 +START_TESTCASE PBASE-F32-File-PublicApi-2901
1.3826 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-2901
1.3827 +//! @SYMAPI RFile
1.3828 +//! @SYMTestCaseDesc Function SetAtt neg. test - set same attribute on both bitmasks.
1.3829 +//! Uses API elements: Att().
1.3830 +//! @SYMTestActions 1. Create RFs session.
1.3831 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc2901.txt", EFileWrite.
1.3832 +//! 3. Write "test" to file.
1.3833 +//! 4. Call RFile::SetAtt, passing KEntryAttNormal, KEntryAttNormal
1.3834 +//!
1.3835 +//!
1.3836 +//! @SYMTestStatus Implemented
1.3837 +//! @SYMTestPriority Critical
1.3838 +//! @SYMTestExpectedResults Panic FSCLIENT:21 at step 3.
1.3839 +//!
1.3840 +//! @SYMTestType CIT
1.3841 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3842 + CREATE_OBJECT RFs RFs1
1.3843 + CREATE_OBJECT RFile file
1.3844 + COMMAND RFs1 new
1.3845 + COMMAND RFs1 Connect
1.3846 + COMMAND file new
1.3847 + COMMAND file Replace PBASE-F32-File-PublicApi-2901-001-Replace_command005
1.3848 + COMMAND file Write PBASE-F32-File-PublicApi-2901-001-Write_command006
1.3849 + COMMAND file SetAtt PBASE-F32-File-PublicApi-2901-001-SetAtt_command007
1.3850 + COMMAND file Close
1.3851 + COMMAND file ~
1.3852 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2901-001-Delete_command011
1.3853 + COMMAND RFs1 ~
1.3854 +END_TEST_BLOCK !PanicCode=21 !PanicString="FSCLIENT panic"
1.3855 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3856 + CREATE_OBJECT RFs RFs1
1.3857 + COMMAND RFs1 new
1.3858 + COMMAND RFs1 Connect
1.3859 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-2901-001-Delete_command011
1.3860 + COMMAND RFs1 ~
1.3861 +END_TEST_BLOCK
1.3862 +END_TESTCASE PBASE-F32-File-PublicApi-2901
1.3863 +
1.3864 +
1.3865 +//
1.3866 +// Modified
1.3867 +//
1.3868 +
1.3869 +
1.3870 +
1.3871 +//
1.3872 +// SetModified
1.3873 +//
1.3874 +
1.3875 +
1.3876 +START_TESTCASE PBASE-F32-File-PublicApi-3101
1.3877 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-3101
1.3878 +//! @SYMAPI RFile
1.3879 +//! @SYMTestCaseDesc Function SetModified neg. test - open file for reading and set it's date.
1.3880 +//! Uses API elements: Modified(), SetModified().
1.3881 +//! @SYMTestActions 1. Create RFs session.
1.3882 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3101.txt", EFileWrite.
1.3883 +//! 3. Write "test" to file
1.3884 +//! 4. Call RFile::SetModified.
1.3885 +//! 5. Close file.
1.3886 +//! 6. Delete file.
1.3887 +//! 7. Close fs.
1.3888 +//!
1.3889 +//! @SYMTestStatus Implemented
1.3890 +//! @SYMTestPriority Critical
1.3891 +//! @SYMTestExpectedResults RFile::SetModified returns KErrAccessDenied.
1.3892 +//!
1.3893 +//! @SYMTestType CIT
1.3894 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3895 + CREATE_OBJECT RFs RFs1
1.3896 + CREATE_OBJECT RFile file
1.3897 + COMMAND RFs1 new
1.3898 + COMMAND RFs1 Connect
1.3899 + COMMAND file new
1.3900 + COMMAND file Replace PBASE-F32-File-PublicApi-3101-001-Replace_command005
1.3901 + COMMAND file Write PBASE-F32-File-PublicApi-3101-001-Write_command006
1.3902 + COMMAND file Close
1.3903 + COMMAND file Open PBASE-F32-File-PublicApi-3101-001-Open_command008
1.3904 + COMMAND !Error=-21 file SetModified PBASE-F32-File-PublicApi-3101-001-SetModified_command009
1.3905 + COMMAND file Close
1.3906 + COMMAND file ~
1.3907 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3101-001-Delete_command013
1.3908 + COMMAND RFs1 ~
1.3909 +END_TEST_BLOCK
1.3910 +END_TESTCASE PBASE-F32-File-PublicApi-3101
1.3911 +
1.3912 +
1.3913 +//
1.3914 +// ChangeMode
1.3915 +//
1.3916 +
1.3917 +
1.3918 +START_TESTCASE PBASE-F32-File-PublicApi-5501
1.3919 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-5501
1.3920 +//! @SYMAPI RFile
1.3921 +//! @SYMTestCaseDesc Function ChangeMode() neg. test - call ChangeMode with value outside of set (EFileShareExclusive, EFileShareReadersOnly).
1.3922 +//! Uses API elements: SetModified().
1.3923 +//! @SYMTestActions 1. Create RFs session.
1.3924 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc5501.txt", EFileShareExclusive.
1.3925 +//! 3. Write "test" to file.
1.3926 +//! 4. Call RFile::ChangeMode() passing it EFileWrite.
1.3927 +//! 5. Close RFile.
1.3928 +//! 6. Delete file.
1.3929 +//! 7. Close RFs.
1.3930 +//!
1.3931 +//! @SYMTestStatus Implemented
1.3932 +//! @SYMTestPriority Critical
1.3933 +//! @SYMTestExpectedResults RFile::ChangeMode() returns KErrArgument.
1.3934 +//!
1.3935 +//! @SYMTestType CIT
1.3936 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3937 + CREATE_OBJECT RFs RFs1
1.3938 + CREATE_OBJECT RFile file
1.3939 + COMMAND RFs1 new
1.3940 + COMMAND RFs1 Connect
1.3941 + COMMAND file new
1.3942 + COMMAND file Replace PBASE-F32-File-PublicApi-5501-001-Replace_command005
1.3943 + COMMAND file Write PBASE-F32-File-PublicApi-5501-001-Write_command006
1.3944 + COMMAND !Error=-6 file ChangeMode PBASE-F32-File-PublicApi-5501-001-ChangeMode_command007
1.3945 + COMMAND file Close
1.3946 + COMMAND file ~
1.3947 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-5501-001-Delete_command011
1.3948 + COMMAND RFs1 ~
1.3949 +END_TEST_BLOCK
1.3950 +END_TESTCASE PBASE-F32-File-PublicApi-5501
1.3951 +
1.3952 +//
1.3953 +// Set
1.3954 +//
1.3955 +
1.3956 +
1.3957 +START_TESTCASE PBASE-F32-File-PublicApi-3201
1.3958 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-3201
1.3959 +//! @SYMAPI RFile
1.3960 +//! @SYMTestCaseDesc Function Set() neg. test - try to clear and set the same attribute.
1.3961 +//! Uses API elements: Set(), Modified(), Att().
1.3962 +//! @SYMTestActions 1. Create RFs session.
1.3963 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3201.txt", EFileShareAny.
1.3964 +//! 3. Call RFile::Set() passing it 20070118:, KEntryAttReadOnly, KEntryAttReadOnly.
1.3965 +//! 4. Close file
1.3966 +//! 5. Delete file.
1.3967 +//! 6. Close Fs session
1.3968 +//!
1.3969 +//! @SYMTestStatus Implemented
1.3970 +//! @SYMTestPriority Critical
1.3971 +//! @SYMTestExpectedResults Panic - FSCLIENT:21.
1.3972 +//!
1.3973 +//! @SYMTestType CIT
1.3974 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3975 + CREATE_OBJECT RFs RFs1
1.3976 + CREATE_OBJECT RFile file
1.3977 + COMMAND RFs1 new
1.3978 + COMMAND RFs1 Connect
1.3979 + COMMAND file new
1.3980 + COMMAND file Replace PBASE-F32-File-PublicApi-3201-001-Replace_command005
1.3981 + COMMAND file Write PBASE-F32-File-PublicApi-3201-001-Write_command006
1.3982 + COMMAND file Set PBASE-F32-File-PublicApi-3201-001-Set_command007
1.3983 + COMMAND file Close
1.3984 + COMMAND file ~
1.3985 + COMMAND RFs1 ~
1.3986 +END_TEST_BLOCK !PanicCode=21 !PanicString="FSCLIENT panic"
1.3987 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.3988 + CREATE_OBJECT RFs RFs1
1.3989 + COMMAND RFs1 new
1.3990 + COMMAND RFs1 Connect
1.3991 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3201-001-Delete_command011
1.3992 + COMMAND RFs1 ~
1.3993 +END_TEST_BLOCK
1.3994 +END_TESTCASE PBASE-F32-File-PublicApi-3201
1.3995 +
1.3996 +
1.3997 +
1.3998 +//
1.3999 +// Rename
1.4000 +//
1.4001 +
1.4002 +
1.4003 +START_TESTCASE PBASE-F32-File-PublicApi-3401
1.4004 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-3401
1.4005 +//! @SYMAPI RFile
1.4006 +//! @SYMTestCaseDesc Function Rename() neg. test - open file in read mode and try to rename it.
1.4007 +//! Uses API elements: RFile::Rename().
1.4008 +//! @SYMTestActions 1. Create RFs session.
1.4009 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3401.txt", EFileRead.
1.4010 +//! 3. Write "test" to file.
1.4011 +//! 4. Call RFile::Rename() passing it string literal "test_renamed.txt".
1.4012 +//! 5. Close RFile.
1.4013 +//! 6. Delete file.
1.4014 +//! 7. Close RFs.
1.4015 +//!
1.4016 +//! @SYMTestStatus Implemented
1.4017 +//! @SYMTestPriority Critical
1.4018 +//! @SYMTestExpectedResults RFile::Rename() returns KErrAccessDenied.
1.4019 +//!
1.4020 +//! @SYMTestType CIT
1.4021 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.4022 + CREATE_OBJECT RFs RFs1
1.4023 + CREATE_OBJECT RFile file
1.4024 + COMMAND RFs1 new
1.4025 + COMMAND RFs1 Connect
1.4026 + COMMAND file new
1.4027 + COMMAND file Replace PBASE-F32-File-PublicApi-3401-001-Replace_command005
1.4028 + COMMAND file Write PBASE-F32-File-PublicApi-3401-001-Write_command006
1.4029 + COMMAND file Close
1.4030 + COMMAND file Open PBASE-F32-File-PublicApi-3401-001-Open_command008
1.4031 + COMMAND !Error=-21 file Rename PBASE-F32-File-PublicApi-3401-001-Rename_command009
1.4032 + COMMAND file Close
1.4033 + COMMAND file ~
1.4034 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3401-001-Delete_command12
1.4035 + COMMAND RFs1 ~
1.4036 + END_TEST_BLOCK
1.4037 +
1.4038 +END_TESTCASE PBASE-F32-File-PublicApi-3401
1.4039 +
1.4040 +
1.4041 +
1.4042 +START_TESTCASE PBASE-F32-File-PublicApi-3402
1.4043 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-3402
1.4044 +//! @SYMAPI RFile
1.4045 +//! @SYMTestCaseDesc Function BlockMap() negative test, replace a file and then call BlockMap on it.
1.4046 +//! Uses API elements: Open(), BlockMap().
1.4047 +//! @SYMTestActions 1. Create RFs session.
1.4048 +//! 2. Call RFile::Replace() passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3402.txt", EFileRead.
1.4049 +//! 4. Call RFile::BlockMap().
1.4050 +//! 5. Close RFile.
1.4051 +//! 6. Delete file.
1.4052 +//! 7. Close RFs.
1.4053 +//!
1.4054 +//! @SYMTestStatus Implemented
1.4055 +//! @SYMTestPriority Critical
1.4056 +//! @SYMTestExpectedResults BlockMap returns KErrNotSupported.
1.4057 +//!
1.4058 +//! @SYMTestType CIT
1.4059 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.4060 + CREATE_OBJECT RFs RFs1
1.4061 + CREATE_OBJECT RFile file
1.4062 + COMMAND RFs1 new
1.4063 + COMMAND RFs1 Connect
1.4064 + COMMAND file new
1.4065 + COMMAND file Replace PBASE-F32-File-PublicApi-3402-001-Replace_command003
1.4066 + COMMAND !Error=-5 file BlockMap
1.4067 + COMMAND file Close
1.4068 + COMMAND file ~
1.4069 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3402-001-Delete_command007
1.4070 + COMMAND RFs1 ~
1.4071 + END_TEST_BLOCK
1.4072 +END_TESTCASE PBASE-F32-File-PublicApi-3402
1.4073 +
1.4074 +
1.4075 +START_TESTCASE PBASE-F32-File-PublicApi-3403
1.4076 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-3403
1.4077 +//! @SYMAPI RFile
1.4078 +//! @SYMTestCaseDesc Function BlockMap() negative test. Call BlockMap with Usage ETestDebug
1.4079 +//! Uses API elements: Open(), BlockMap().
1.4080 +//! @SYMTestActions 1. Create RFs session.
1.4081 +//! 2. Call RFile::Replace() to create file tc3403 with EFileWrite
1.4082 +//! 4. Call RFile::BlockMap() passing ETestDebug for usage, 0 for startPos.
1.4083 +//! 5. Close RFile.
1.4084 +//! 6. Delete file.
1.4085 +//! 7. Close RFs.
1.4086 +//!
1.4087 +//! @SYMTestStatus Implemented
1.4088 +//! @SYMTestPriority Critical
1.4089 +//! @SYMTestExpectedResults BlockMap returns KErrNotSupported.
1.4090 +//!
1.4091 +//! @SYMTestType CIT
1.4092 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.4093 + CREATE_OBJECT RFs RFs1
1.4094 + CREATE_OBJECT RFile file
1.4095 + COMMAND RFs1 new
1.4096 + COMMAND RFs1 Connect
1.4097 + COMMAND file new
1.4098 + COMMAND file Replace PBASE-F32-File-PublicApi-3403-001-Replace_command003
1.4099 + COMMAND !Error=-5 file BlockMap PBASE-F32-File-PublicApi-3403-001-BlockMap_command004
1.4100 + COMMAND file Close
1.4101 + COMMAND file ~
1.4102 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3403-001-Delete_command007
1.4103 + COMMAND RFs1 ~
1.4104 + END_TEST_BLOCK
1.4105 +END_TESTCASE PBASE-F32-File-PublicApi-3403
1.4106 +
1.4107 +
1.4108 +START_TESTCASE PBASE-F32-File-PublicApi-3501
1.4109 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-3501
1.4110 +//! @SYMAPI RFile
1.4111 +//! @SYMTestCaseDesc Asynchronous Read(TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) test. Pass 0 for length.
1.4112 +//! Uses API elements: Read().
1.4113 +//! @SYMTestActions 1. Create RFs session.
1.4114 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3501.txt", EFileWrite.
1.4115 +//! 3. Call RFile::Write passing literal "Asynchronous read with length test"
1.4116 +//! 4. Reset file position
1.4117 +//! 4. Create TRequestStatus variable.
1.4118 +//! 5. Call RFile::Read() passing TRequestStatus and 0 for length.
1.4119 +//! 6. Wait until asynchronous call completes
1.4120 +//! 7. Close RFile.
1.4121 +//! 8. Delete file.
1.4122 +//! 9. Close RFs.
1.4123 +//!
1.4124 +//! @SYMTestStatus Implemented
1.4125 +//! @SYMTestPriority Critical
1.4126 +//! @SYMTestExpectedResults RFile::Read() returns empty descriptor
1.4127 +//!
1.4128 +//! @SYMTestType CIT
1.4129 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.4130 + CREATE_OBJECT RFs RFs1
1.4131 + CREATE_OBJECT RFile file
1.4132 + COMMAND RFs1 new
1.4133 + COMMAND RFs1 Connect
1.4134 + COMMAND file new
1.4135 + COMMAND file Replace PBASE-F32-File-PublicApi-3501-001-Replace_command005
1.4136 + COMMAND file Write PBASE-F32-File-PublicApi-3501-001-Write_command006
1.4137 + COMMAND file Seek PBASE-F32-File-PublicApi-3501-001-Seek_command007
1.4138 + COMMAND file Read PBASE-F32-File-PublicApi-3501-001-Read_command008
1.4139 + OUTSTANDING
1.4140 + COMMAND file Close
1.4141 + COMMAND file ~
1.4142 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3501-001-Delete_command012
1.4143 + COMMAND RFs1 ~
1.4144 +END_TEST_BLOCK
1.4145 +END_TESTCASE PBASE-F32-File-PublicApi-3501
1.4146 +
1.4147 +
1.4148 +START_TESTCASE PBASE-F32-File-PublicApi-3502
1.4149 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-3502
1.4150 +//! @SYMAPI RFile
1.4151 +//! @SYMTestCaseDesc Synchronous Read(TInt aPos, TDes8 &aDes, TInt aLength) test. Pass 0 for length.
1.4152 +//! Uses API elements: Read().
1.4153 +//! @SYMTestActions 1. Create RFs session
1.4154 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3502.txt", EFileWrite
1.4155 +//! 3. Write "synchronous read with length and position test" to file
1.4156 +//! 4. Reset file position.
1.4157 +//! 5. Call RFile::Read() passing 0 for length and 5 for position.
1.4158 +//! 6. Close RFile.
1.4159 +//! 7. Delete file.
1.4160 +//! 8. Close RFs.
1.4161 +//!
1.4162 +//! @SYMTestStatus Implemented
1.4163 +//! @SYMTestPriority Critical
1.4164 +//! @SYMTestExpectedResults RFile::Read() returns empty descriptor
1.4165 +//!
1.4166 +//! @SYMTestType CIT
1.4167 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.4168 + CREATE_OBJECT RFs RFs1
1.4169 + CREATE_OBJECT RFile file
1.4170 + COMMAND RFs1 new
1.4171 + COMMAND RFs1 Connect
1.4172 + COMMAND file new
1.4173 + COMMAND file Replace PBASE-F32-File-PublicApi-3502-001-Replace_command005
1.4174 + COMMAND file Write PBASE-F32-File-PublicApi-3502-001-Write_command006
1.4175 + COMMAND file Seek PBASE-F32-File-PublicApi-3502-001-Seek_command007
1.4176 + COMMAND file Read PBASE-F32-File-PublicApi-3502-001-Read_command008
1.4177 + COMMAND file Close
1.4178 + COMMAND file ~
1.4179 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3502-001-Delete_command012
1.4180 + COMMAND RFs1 ~
1.4181 +END_TEST_BLOCK
1.4182 +END_TESTCASE PBASE-F32-File-PublicApi-3502
1.4183 +
1.4184 +
1.4185 +START_TESTCASE PBASE-F32-File-PublicApi-3503
1.4186 +//! @SYMTestCaseID PBASE-F32-File-PublicApi-3503
1.4187 +//! @SYMAPI RFile
1.4188 +//! @SYMTestCaseDesc Asynchronous Read(TInt aPos, TDes8 &aDes, TInt aLength, TRequestStatus &aStatus) test. Pass 0 for length.
1.4189 +//! Uses API elements: Read().
1.4190 +//! @SYMTestActions 1. Create RFs session.
1.4191 +//! 2. Call RFile::Replace passing RFs, literal "{Drives, RAMDriveTestPath}file\tc3503.txt", EFileWrite.
1.4192 +//! 3. Call RFile::Write passing literal "asynchronous read with length and position test"
1.4193 +//! 4. Reset file position
1.4194 +//! 5. Call RFile::Read() passing TRequestStatus, 0 for length and 5 for position.
1.4195 +//! 6. Wait until asynchronous call completes
1.4196 +//! 7. Close RFile.
1.4197 +//! 8. Delete file.
1.4198 +//! 9. Close RFs.
1.4199 +//!
1.4200 +//! @SYMTestStatus Implemented
1.4201 +//! @SYMTestPriority Critical
1.4202 +//! @SYMTestExpectedResults RFile::Read() returns empty descriptor
1.4203 +//!
1.4204 +//! @SYMTestType CIT
1.4205 +START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.4206 + CREATE_OBJECT RFs RFs1
1.4207 + CREATE_OBJECT RFile file
1.4208 + COMMAND RFs1 new
1.4209 + COMMAND RFs1 Connect
1.4210 + COMMAND file new
1.4211 + COMMAND file Replace PBASE-F32-File-PublicApi-3503-001-Replace_command005
1.4212 + COMMAND file Write PBASE-F32-File-PublicApi-3503-001-Write_command006
1.4213 + COMMAND file Seek PBASE-F32-File-PublicApi-3503-001-Seek_command007
1.4214 + COMMAND file Read PBASE-F32-File-PublicApi-3503-001-Read_command008
1.4215 + OUTSTANDING
1.4216 + COMMAND file Close
1.4217 + COMMAND file ~
1.4218 + COMMAND RFs1 Delete PBASE-F32-File-PublicApi-3503-001-Delete_command011
1.4219 + COMMAND RFs1 ~
1.4220 +END_TEST_BLOCK
1.4221 +END_TESTCASE PBASE-F32-File-PublicApi-3503
1.4222 +
1.4223 +START_TESTCASE PBASE-F32-File-Uninstall
1.4224 +//! @SYMTestCaseID PBASE-F32-File-Uninstall
1.4225 +//! @SYMAPI RFile
1.4226 +//! @SYMTestCaseDesc Cleanup the directories created to test RFile
1.4227 +//! @SYMTestActions 1. Create RFs Session.
1.4228 +//! 2. Remove the directories created using Rfs::RmDir().
1.4229 +//! @SYMTestStatus Implemented
1.4230 +//! @SYMTestPriority Critical
1.4231 +//! @SYMTestExpectedResults Removes the directory created and keeps the environment clean.
1.4232 +//!
1.4233 +//! @SYMTestType CIT
1.4234 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-File-PublicApi.ini
1.4235 + CREATE_OBJECT RFs RFs1
1.4236 + COMMAND RFs1 new
1.4237 + COMMAND RFs1 Connect
1.4238 + COMMAND RFs1 RmDir PBASE-F32-File-PublicApi-Unistall
1.4239 + COMMAND RFs1 ~
1.4240 + END_TEST_BLOCK
1.4241 +END_TESTCASE PBASE-F32-File-Uninstall