os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-Parse-PublicApi-ANY.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-Parse-PublicApi-ANY.script Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,389 @@
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-any
1.21 +//! @SYMScriptTestEnvironment This test script requires a basic ANY.
1.22 +//! @SYMScriptAuthor Dmitri Trofimov
1.23 +//! @SYMCreationDate 10/04/2007
1.24 +//! @SYMScriptDescription The test script contains API tests for the following functions of TParse class:
1.25 +//! TParse();
1.26 +//! TInt Set(const TDesC &aName, const TDesC *aRelated, const TDesC *aDefault);
1.27 +//! TInt SetNoWild(const TDesC &aName, const TDesC *aRelated, const TDesC *aDefault);
1.28 +//! TDes &NameBuf();
1.29 +//! const TDesC &NameBufC() const;
1.30 +
1.31 +
1.32 +LOAD_SUITE T_SfSrv
1.33 +//DELAY 5000
1.34 +
1.35 +
1.36 +START_TESTCASE PBASE-F32-Parse-PublicApi-0047
1.37 +//! @SYMTestCaseID PBASE-F32-Parse-PublicApi-0047
1.38 +//! @SYMAPI TParse
1.39 +//! @SYMTestCaseDesc TParse() test or successful object creation.
1.40 +//! Uses API elements: TParse()
1.41 +//! @SYMTestActions 1. Create TParse object.
1.42 +//! 2. Delete TParse object.
1.43 +//!
1.44 +//! @SYMTestStatus Implemented
1.45 +//! @SYMTestPriority Critical
1.46 +//! @SYMTestExpectedResults Function does not leave nor panic.
1.47 +//! @SYMTestType CIT
1.48 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-Parse-PublicApi.ini
1.49 + CREATE_OBJECT TParse TParse1
1.50 + COMMAND TParse1 new
1.51 + COMMAND TParse1 ~
1.52 + END_TEST_BLOCK
1.53 +END_TESTCASE PBASE-F32-Parse-PublicApi-0047
1.54 +
1.55 +
1.56 +START_TESTCASE PBASE-F32-Parse-PublicApi-0048
1.57 +//! @SYMTestCaseID PBASE-F32-Parse-PublicApi-0048
1.58 +//! @SYMAPI TParse
1.59 +//! @SYMTestCaseDesc Set() test for successful setting up the TParse object.
1.60 +//! Uses API elements: TParse(), Set()
1.61 +//! @SYMTestActions 1. Create TParse object.
1.62 +//! 2. Call Set() passing "test.txt" The file specification to be parsed.
1.63 +//! 3. Delete TParse object.
1.64 +//!
1.65 +//! @SYMTestStatus Implemented
1.66 +//! @SYMTestPriority Critical
1.67 +//! @SYMTestExpectedResults Set() returns KErrNone.
1.68 +//! @SYMTestType CIT
1.69 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-Parse-PublicApi.ini
1.70 + CREATE_OBJECT TParse TParse1
1.71 + COMMAND TParse1 new
1.72 + COMMAND TParse1 Set PBASE-F32-Parse-PublicApi-0002command2Set
1.73 + COMMAND TParse1 ~
1.74 + END_TEST_BLOCK
1.75 +END_TESTCASE PBASE-F32-Parse-PublicApi-0048
1.76 +
1.77 +
1.78 +START_TESTCASE PBASE-F32-Parse-PublicApi-0049
1.79 +//! @SYMTestCaseID PBASE-F32-Parse-PublicApi-0049
1.80 +//! @SYMAPI TParse
1.81 +//! @SYMTestCaseDesc Set() test for setting up the TParse object with wildcard in filename.
1.82 +//! Uses API elements: TParse(), Set()
1.83 +//! @SYMTestActions 1. Create TParse object.
1.84 +//! 2. Call Set() passing "test.*" The file specification to be parsed.
1.85 +//! 3. Delete TParse object.
1.86 +//!
1.87 +//! @SYMTestStatus Implemented
1.88 +//! @SYMTestPriority Critical
1.89 +//! @SYMTestExpectedResults Set() returns KErrNone.
1.90 +//! @SYMTestType CIT
1.91 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-Parse-PublicApi.ini
1.92 + CREATE_OBJECT TParse TParse1
1.93 + COMMAND TParse1 new
1.94 + COMMAND TParse1 Set PBASE-F32-Parse-PublicApi-0003command2Set
1.95 + COMMAND TParse1 ~
1.96 + END_TEST_BLOCK
1.97 +END_TESTCASE PBASE-F32-Parse-PublicApi-0049
1.98 +
1.99 +
1.100 +START_TESTCASE PBASE-F32-Parse-PublicApi-0050
1.101 +//! @SYMTestCaseID PBASE-F32-Parse-PublicApi-0050
1.102 +//! @SYMAPI TParse
1.103 +//! @SYMTestCaseDesc Set() test for setting up the TParse object with wildcard in filename.
1.104 +//! Uses API elements: TParse(), Set()
1.105 +//! @SYMTestActions 1. Create TParse object.
1.106 +//! 2. Call Set() passing "test.???" The file specification to be parsed.
1.107 +//! 3. Delete TParse object.
1.108 +//!
1.109 +//! @SYMTestStatus Implemented
1.110 +//! @SYMTestPriority Critical
1.111 +//! @SYMTestExpectedResults Set() returns KErrNone.
1.112 +//! @SYMTestType CIT
1.113 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-Parse-PublicApi.ini
1.114 + CREATE_OBJECT TParse TParse1
1.115 + COMMAND TParse1 new
1.116 + COMMAND TParse1 Set PBASE-F32-Parse-PublicApi-0004command2Set
1.117 + COMMAND TParse1 ~
1.118 + END_TEST_BLOCK
1.119 +END_TESTCASE PBASE-F32-Parse-PublicApi-0050
1.120 +
1.121 +
1.122 +START_TESTCASE PBASE-F32-Parse-PublicApi-0051
1.123 +//! @SYMTestCaseID PBASE-F32-Parse-PublicApi-0051
1.124 +//! @SYMAPI TParse
1.125 +//! @SYMTestCaseDesc SetNoWild() test for successful setting up the TParse object.
1.126 +//! Uses API elements: SetNoWild()
1.127 +//! @SYMTestActions 1. Create TParse object.
1.128 +//! 2. Call SetNoWild() passing "test.txt" as name, "b:\rel" as related file specification, "c:\def\test.txt" as default file specification.
1.129 +//! 3. Delete TParse object.
1.130 +//!
1.131 +//! @SYMTestStatus Implemented
1.132 +//! @SYMTestPriority Critical
1.133 +//! @SYMTestExpectedResults SetNoWild() returns KErrNone.
1.134 +//! @SYMTestType CIT
1.135 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-Parse-PublicApi.ini
1.136 + CREATE_OBJECT TParse TParse1
1.137 + COMMAND TParse1 new
1.138 + COMMAND TParse1 SetNoWild PBASE-F32-Parse-PublicApi-0005command2SetNoWild
1.139 + COMMAND TParse1 ~
1.140 + END_TEST_BLOCK
1.141 +END_TESTCASE PBASE-F32-Parse-PublicApi-0051
1.142 +
1.143 +
1.144 +START_TESTCASE PBASE-F32-Parse-PublicApi-0052
1.145 +//! @SYMTestCaseID PBASE-F32-Parse-PublicApi-0052
1.146 +//! @SYMAPI TParse
1.147 +//! @SYMTestCaseDesc SetNoWild() negative test where file specification to be parsed contain wildcard.
1.148 +//! Uses API elements: SetNoWild()
1.149 +//! @SYMTestActions 1. Create TParse object.
1.150 +//! 2. Call SetNoWild() passing "c:\base\file.*" as parameter of file specification and check that the function return KErrBadName.
1.151 +//! 3. Delete TParse object.
1.152 +//!
1.153 +//! @SYMTestStatus Implemented
1.154 +//! @SYMTestPriority Critical
1.155 +//! @SYMTestExpectedResults SetNoWild() returns KErrBadName.
1.156 +//! @SYMTestType CIT
1.157 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-Parse-PublicApi.ini
1.158 + CREATE_OBJECT TParse TParse1
1.159 + COMMAND TParse1 new
1.160 + COMMAND !Error=-28 TParse1 SetNoWild PBASE-F32-Parse-PublicApi-0006command2SetNoWild
1.161 + COMMAND TParse1 ~
1.162 + END_TEST_BLOCK
1.163 +END_TESTCASE PBASE-F32-Parse-PublicApi-0052
1.164 +
1.165 +
1.166 +START_TESTCASE PBASE-F32-Parse-PublicApi-0053
1.167 +//! @SYMTestCaseID PBASE-F32-Parse-PublicApi-0053
1.168 +//! @SYMAPI TParse
1.169 +//! @SYMTestCaseDesc SetNoWild() negative test where file specification to be parsed contain wildcard.
1.170 +//! Uses API elements: SetNoWild()
1.171 +//! @SYMTestActions 1. Create TParse object.
1.172 +//! 2. Call SetNoWild() passing "c:\base\file.tx?" as parameter of file specification and check that ne function eturn KErrBadName
1.173 +//! 3. Delete TParse object.
1.174 +//!
1.175 +//! @SYMTestStatus Implemented
1.176 +//! @SYMTestPriority Critical
1.177 +//! @SYMTestExpectedResults SetNoWild() returns KErrBadName.
1.178 +//! @SYMTestType CIT
1.179 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-Parse-PublicApi.ini
1.180 + CREATE_OBJECT TParse TParse1
1.181 + COMMAND TParse1 new
1.182 + COMMAND !Error=-28 TParse1 SetNoWild PBASE-F32-Parse-PublicApi-0007command2SetNoWild
1.183 + COMMAND TParse1 ~
1.184 + END_TEST_BLOCK
1.185 +END_TESTCASE PBASE-F32-Parse-PublicApi-0053
1.186 +
1.187 +
1.188 +START_TESTCASE PBASE-F32-Parse-PublicApi-0054
1.189 +//! @SYMTestCaseID PBASE-F32-Parse-PublicApi-0054
1.190 +//! @SYMAPI TParse
1.191 +//! @SYMTestCaseDesc SetNoWild() negative test where related file name specification to be parsed contain wildcard.
1.192 +//! Uses API elements: SetNoWild()
1.193 +//! @SYMTestActions 1. Create TParse object.
1.194 +//! 2. Call SetNoWild() passing "c:file" as name, "c:\base\file.*" as related file specification.
1.195 +//! 3. Delete TParse object.
1.196 +//!
1.197 +//! @SYMTestStatus Implemented
1.198 +//! @SYMTestPriority Critical
1.199 +//! @SYMTestExpectedResults SetNoWild() returns KErrBadName.
1.200 +//! @SYMTestType CIT
1.201 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-Parse-PublicApi.ini
1.202 + CREATE_OBJECT TParse TParse1
1.203 + COMMAND TParse1 new
1.204 + COMMAND !Error=-28 TParse1 SetNoWild PBASE-F32-Parse-PublicApi-0008command2SetNoWild
1.205 + COMMAND TParse1 ~
1.206 + END_TEST_BLOCK
1.207 +END_TESTCASE PBASE-F32-Parse-PublicApi-0054
1.208 +
1.209 +
1.210 +START_TESTCASE PBASE-F32-Parse-PublicApi-0055
1.211 +//! @SYMTestCaseID PBASE-F32-Parse-PublicApi-0055
1.212 +//! @SYMAPI TParse
1.213 +//! @SYMTestCaseDesc SetNoWild() negative test where related file name specification to be parsed contain wildcard.
1.214 +//! Uses API elements: SetNoWild()
1.215 +//! @SYMTestActions 1. Create TParse object.
1.216 +//! 2. Call SetNoWild() passing "c:file" as name, "c:\base\file.ex?" as related file specification.
1.217 +//! 3. Delete TParse object.
1.218 +//!
1.219 +//! @SYMTestStatus Implemented
1.220 +//! @SYMTestPriority Critical
1.221 +//! @SYMTestExpectedResults SetNoWild() returns KErrBadName.
1.222 +//! @SYMTestType CIT
1.223 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-Parse-PublicApi.ini
1.224 + CREATE_OBJECT TParse TParse1
1.225 + COMMAND TParse1 new
1.226 + COMMAND !Error=-28 TParse1 SetNoWild PBASE-F32-Parse-PublicApi-0009command2SetNoWild
1.227 + COMMAND TParse1 ~
1.228 + END_TEST_BLOCK
1.229 +END_TESTCASE PBASE-F32-Parse-PublicApi-0055
1.230 +
1.231 +
1.232 +START_TESTCASE PBASE-F32-Parse-PublicApi-0056
1.233 +//! @SYMTestCaseID PBASE-F32-Parse-PublicApi-0056
1.234 +//! @SYMAPI TParse
1.235 +//! @SYMTestCaseDesc SetNoWild() negative test where default file name specification to be parsed contain wildcard.
1.236 +//! Uses API elements: SetNoWild()
1.237 +//! @SYMTestActions 1. Create TParse object.
1.238 +//! 2. Call SetNoWild() passing "c:file" as name, "c:\base\file.*" as default file specification.
1.239 +//! 3. Delete TParse object.
1.240 +//!
1.241 +//! @SYMTestStatus Implemented
1.242 +//! @SYMTestPriority Critical
1.243 +//! @SYMTestExpectedResults SetNoWild() returns KErrBadName.
1.244 +//! @SYMTestType CIT
1.245 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-Parse-PublicApi.ini
1.246 + CREATE_OBJECT TParse TParse1
1.247 + COMMAND TParse1 new
1.248 + COMMAND !Error=-28 TParse1 SetNoWild PBASE-F32-Parse-PublicApi-0010command2SetNoWild
1.249 + COMMAND TParse1 ~
1.250 + END_TEST_BLOCK
1.251 +END_TESTCASE PBASE-F32-Parse-PublicApi-0056
1.252 +
1.253 +
1.254 +START_TESTCASE PBASE-F32-Parse-PublicApi-0057
1.255 +//! @SYMTestCaseID PBASE-F32-Parse-PublicApi-0057
1.256 +//! @SYMAPI TParse
1.257 +//! @SYMTestCaseDesc SetNoWild() negative test where default file name specification to be parsed contain wildcard.
1.258 +//! Uses API elements: SetNoWild()
1.259 +//! @SYMTestActions 1. Create TParse object.
1.260 +//! 2. Call SetNoWild() passing "c:file" as name, "c:\base\file.ex?" as default file specification.
1.261 +//! 3. Delete TParse object.
1.262 +//!
1.263 +//! @SYMTestStatus Implemented
1.264 +//! @SYMTestPriority Critical
1.265 +//! @SYMTestExpectedResults SetNoWild() returns KErrBadName.
1.266 +//! @SYMTestType CIT
1.267 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-Parse-PublicApi.ini
1.268 + CREATE_OBJECT TParse TParse1
1.269 + COMMAND TParse1 new
1.270 + COMMAND !Error=-28 TParse1 SetNoWild PBASE-F32-Parse-PublicApi-0011command2SetNoWild
1.271 + COMMAND TParse1 ~
1.272 + END_TEST_BLOCK
1.273 +END_TESTCASE PBASE-F32-Parse-PublicApi-0057
1.274 +
1.275 +
1.276 +START_TESTCASE PBASE-F32-Parse-PublicApi-0058
1.277 +//! @SYMTestCaseID PBASE-F32-Parse-PublicApi-0058
1.278 +//! @SYMAPI TParse
1.279 +//! @SYMTestCaseDesc PopDir() test. This test for successful removal of the last directory from the path.
1.280 +//! Uses API elements: PopDir()
1.281 +//! @SYMTestActions 1. Create TParse object '.
1.282 +//! 2. Call Set() for setting up the following path name: "c\dir1\dir2\filename.ext"
1.283 +//! 3. Call PopDir().
1.284 +//! 4. Call FullName(). Expecting 'c:\dir1\filename.ext'
1.285 +//!
1.286 +//! @SYMTestStatus Implemented
1.287 +//! @SYMTestPriority Critical
1.288 +//! @SYMTestExpectedResults PopDir() returns KErrNone. The value returned by FullName() is the same as expected.
1.289 +//! @SYMTestType CIT
1.290 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-Parse-PublicApi.ini
1.291 + CREATE_OBJECT TParse TParse1
1.292 + COMMAND TParse1 new
1.293 + COMMAND TParse1 Set PBASE-F32-Parse-PublicApi-0012command2Set
1.294 + COMMAND TParse1 PopDir
1.295 + COMMAND TParse1 FullName PBASE-F32-Parse-PublicApi-0012command4FullName
1.296 + COMMAND TParse1 ~
1.297 + END_TEST_BLOCK
1.298 +END_TESTCASE PBASE-F32-Parse-PublicApi-0058
1.299 +
1.300 +
1.301 +START_TESTCASE PBASE-F32-Parse-PublicApi-0059
1.302 +//! @SYMTestCaseID PBASE-F32-Parse-PublicApi-0059
1.303 +//! @SYMAPI TParse
1.304 +//! @SYMTestCaseDesc AddDir() test. This tests for successful adding of directory to the end of path.
1.305 +//! Uses API elements: AddDir()
1.306 +//! @SYMTestActions 1. Create TParse object.
1.307 +//! 2. Call Set() setting path to "c:\dir1\filename.ext"
1.308 +//! 3. Call AddDir() passing "dir2" string.
1.309 +//! 4. Call FullName(). Expecting 'c:\dir1\dir2\filename.ext'
1.310 +//!
1.311 +//! @SYMTestStatus Implemented
1.312 +//! @SYMTestPriority Critical
1.313 +//! @SYMTestExpectedResults AddDir() returns KErrNone. The value returned by FullName() is the same as expected.
1.314 +//! @SYMTestType CIT
1.315 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-Parse-PublicApi.ini
1.316 + CREATE_OBJECT TParse TParse1
1.317 + COMMAND TParse1 new
1.318 + COMMAND TParse1 Set PBASE-F32-Parse-PublicApi-0013command2Set
1.319 + COMMAND TParse1 AddDir PBASE-F32-Parse-PublicApi-0013command3AddDir
1.320 + COMMAND TParse1 FullName PBASE-F32-Parse-PublicApi-0013command4FullName
1.321 + COMMAND TParse1 ~
1.322 + END_TEST_BLOCK
1.323 +END_TESTCASE PBASE-F32-Parse-PublicApi-0059
1.324 +
1.325 +
1.326 +START_TESTCASE PBASE-F32-Parse-PublicApi-0060
1.327 +//! @SYMTestCaseID PBASE-F32-Parse-PublicApi-0060
1.328 +//! @SYMAPI TParse
1.329 +//! @SYMTestCaseDesc AddDir() negative test. This tests for the function to return error KErrBadName in case the directory to add begins with slash "\".
1.330 +//! ses API elements: AddDir()
1.331 +//! @SYMTestActions 1. Create TParse object.
1.332 +//! 2. Call Set() setting path to "c:\dir1\dir2\filename.ext"
1.333 +//! 3. Call AddDir() passing "\dir3" string.
1.334 +//!
1.335 +//! @SYMTestStatus Implemented
1.336 +//! @SYMTestPriority Critical
1.337 +//! @SYMTestExpectedResults AddDir() returns KErrBadName.
1.338 +//! @SYMTestType CIT
1.339 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-Parse-PublicApi.ini
1.340 + CREATE_OBJECT TParse TParse1
1.341 + COMMAND TParse1 new
1.342 + COMMAND TParse1 Set PBASE-F32-Parse-PublicApi-0014command2Set
1.343 + COMMAND !Error=-28 TParse1 AddDir PBASE-F32-Parse-PublicApi-0014command3AddDir
1.344 + COMMAND TParse1 ~
1.345 + END_TEST_BLOCK
1.346 +END_TESTCASE PBASE-F32-Parse-PublicApi-0060
1.347 +
1.348 +
1.349 +START_TESTCASE PBASE-F32-Parse-PublicApi-0061
1.350 +//! @SYMTestCaseID PBASE-F32-Parse-PublicApi-0061
1.351 +//! @SYMAPI TParse
1.352 +//! @SYMTestCaseDesc AddDir() test, where name of directory contains the wildcard.
1.353 +//! Uses API elements: AddDir()
1.354 +//! @SYMTestActions 1. Create TParse object.
1.355 +//! 2. Call Set() setting path to "c:\dir1\dir2\filename.ext"
1.356 +//! 3. Call AddDir() passing a "dir*" string.
1.357 +//!
1.358 +//! @SYMTestStatus Implemented
1.359 +//! @SYMTestPriority Critical
1.360 +//! @SYMTestExpectedResults AddDir() returns KErrNone.
1.361 +//! @SYMTestType CIT
1.362 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-Parse-PublicApi.ini
1.363 + CREATE_OBJECT TParse TParse1
1.364 + COMMAND TParse1 new
1.365 + COMMAND TParse1 Set PBASE-F32-Parse-PublicApi-0015command2Set
1.366 + COMMAND TParse1 AddDir PBASE-F32-Parse-PublicApi-0015command3AddDir
1.367 + COMMAND TParse1 ~
1.368 + END_TEST_BLOCK
1.369 +END_TESTCASE PBASE-F32-Parse-PublicApi-0061
1.370 +
1.371 +
1.372 +START_TESTCASE PBASE-F32-Parse-PublicApi-0062
1.373 +//! @SYMTestCaseID PBASE-F32-Parse-PublicApi-0062
1.374 +//! @SYMAPI TParse
1.375 +//! @SYMTestCaseDesc AddDir() negative test, where name of directory ended with a "\".
1.376 +//! Uses API elements: AddDir()
1.377 +//! @SYMTestActions 1. Create TParse object.
1.378 +//! 2. Call Set() setting path to "c:\dir1\dir2\filename.ext"
1.379 +//! 3. Call AddDir() passing name of directory ended with a "dir\".
1.380 +//!
1.381 +//! @SYMTestStatus Implemented
1.382 +//! @SYMTestPriority Critical
1.383 +//! @SYMTestExpectedResults AddDir() returns KErrBadName.
1.384 +//! @SYMTestType CIT
1.385 + START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-Parse-PublicApi.ini
1.386 + CREATE_OBJECT TParse TParse1
1.387 + COMMAND TParse1 new
1.388 + COMMAND TParse1 Set PBASE-F32-Parse-PublicApi-0016command2Set
1.389 + COMMAND !Error=-28 TParse1 AddDir PBASE-F32-Parse-PublicApi-0016command3AddDir
1.390 + COMMAND TParse1 ~
1.391 + END_TEST_BLOCK
1.392 +END_TESTCASE PBASE-F32-Parse-PublicApi-0062