baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-ParsePtrC-PublicApi-ANY.script
changeset 0 a41df078684a
child 2 4122176ea935
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 //
       
     2 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of the License "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 //
       
    16 //!	@file
       
    17 //!	@SYMTestSuiteName		pbase-f32-sfsrv-publicapi-any
       
    18 //!	@SYMScriptTestEnvironment	This test script requires a basic ROM.
       
    19 //!	@SYMScriptAuthor 		Dmitri Trofimov, Sergei Tveritin.
       
    20 //!	@SYMCreationDate		11/11/2007 
       
    21 //!	@SYMScriptDescription		The test script contains API tests for the following functions of TParsePtrC class:
       
    22 //!	TParsePtrC(TDes &aName);
       
    23 //!	TDes &NameBuf();
       
    24 //!	const TDesC &NameBufC() const;
       
    25 
       
    26 
       
    27 LOAD_SUITE	T_SfSrv
       
    28 //DELAY		5000
       
    29 
       
    30 
       
    31 START_TESTCASE 			PBASE-F32-ParsePtrC-PublicApi-0047
       
    32 //! @SYMTestCaseID		PBASE-F32-ParsePtrC-PublicApi-0047
       
    33 //! @SYMAPI			TParsePtrC
       
    34 //! @SYMTestCaseDesc		TParsePtrC() test.
       
    35 //!				Uses API elements: TParsePtrC()
       
    36 //! @SYMTestActions		1. Create TParsePtrC object passing a reference to a TDes file name as a parameter.
       
    37 //!				2. Delete TParsePtrC object.
       
    38 //!
       
    39 //! @SYMTestStatus		Implemented
       
    40 //! @SYMTestPriority		Critical
       
    41 //! @SYMTestExpectedResults	Function does not leave nor panic.
       
    42 //! @SYMTestType		CIT
       
    43 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-ParsePtrC-PublicApi.ini
       
    44 			CREATE_OBJECT	TParsePtrC	TParsePtrC1	
       
    45 			COMMAND		TParsePtrC1	new		PBASE-F32-ParsePtrC-PublicApi-0001command1new
       
    46 			COMMAND		TParsePtrC1	~		
       
    47 	END_TEST_BLOCK
       
    48 END_TESTCASE			PBASE-F32-ParsePtrC-PublicApi-0047
       
    49 
       
    50 
       
    51 START_TESTCASE 			PBASE-F32-ParsePtrC-PublicApi-0048
       
    52 //! @SYMTestCaseID		PBASE-F32-ParsePtrC-PublicApi-0048
       
    53 //! @SYMAPI			TParsePtrC
       
    54 //! @SYMTestCaseDesc		TParsePtrC() test, where name passed in constructor are NUUL.
       
    55 //!				Uses API elements: TParsePtrC()
       
    56 //! @SYMTestActions		1. Create TParsePtrC object passing "0" as parameter.
       
    57 //!				2. Delete TParsePtrC object.
       
    58 //!
       
    59 //! @SYMTestStatus		Implemented
       
    60 //! @SYMTestPriority		Critical
       
    61 //! @SYMTestExpectedResults	Function does not leave nor panic.
       
    62 //! @SYMTestType		CIT
       
    63 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-ParsePtrC-PublicApi.ini
       
    64 			CREATE_OBJECT	TParsePtrC	TParsePtrC1	
       
    65 			COMMAND		TParsePtrC1	new		PBASE-F32-ParsePtrC-PublicApi-0002command1new
       
    66 			COMMAND		TParsePtrC1	~		
       
    67 	END_TEST_BLOCK
       
    68 END_TESTCASE			PBASE-F32-ParsePtrC-PublicApi-0048
       
    69 
       
    70 
       
    71 START_TESTCASE 			PBASE-F32-ParsePtrC-PublicApi-0049
       
    72 //! @SYMTestCaseID		PBASE-F32-ParsePtrC-PublicApi-0049
       
    73 //! @SYMAPI			TParsePtrC
       
    74 //! @SYMTestCaseDesc		TParsePtrC() negative test, where name passed in constructor contain illegal path construction.
       
    75 //!				Uses API elements: TParsePtrC()
       
    76 //! @SYMTestActions		1. Create TParsePtrC object passing "c::\file.ext" as parameter.
       
    77 //!				2. Delete TParsePtrC object.
       
    78 //!
       
    79 //! @SYMTestStatus		Implemented
       
    80 //! @SYMTestPriority		Critical
       
    81 //! @SYMTestExpectedResults	Function return panic code FSCLIENT=24.
       
    82 //! @SYMTestType		CIT
       
    83 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-ParsePtrC-PublicApi.ini
       
    84 			CREATE_OBJECT	TParsePtrC	TParsePtrC1	
       
    85 			COMMAND		TParsePtrC1	new		PBASE-F32-ParsePtrC-PublicApi-0003command1new
       
    86 			COMMAND		TParsePtrC1	~		
       
    87 	END_TEST_BLOCK	!PanicCode=24 !PanicString="FSCLIENT panic"
       
    88 END_TESTCASE			PBASE-F32-ParsePtrC-PublicApi-0049
       
    89 
       
    90 
       
    91 START_TESTCASE 			PBASE-F32-ParsePtrC-PublicApi-0050
       
    92 //! @SYMTestCaseID		PBASE-F32-ParsePtrC-PublicApi-0050
       
    93 //! @SYMAPI			TParsePtrC
       
    94 //! @SYMTestCaseDesc		TParsePtrC() test, where name passed in constructor contain wildcards.
       
    95 //!				Uses API elements: TParsePtrC()
       
    96 //! @SYMTestActions		1. Create TParsePtrC object passing "c:\file?.*" as parameter.
       
    97 //!				2. Delete TParsePtrC object.
       
    98 //!
       
    99 //! @SYMTestStatus		Implemented
       
   100 //! @SYMTestPriority		Critical
       
   101 //! @SYMTestExpectedResults	Function does not leave nor panic.
       
   102 //! @SYMTestType		CIT
       
   103 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-ParsePtrC-PublicApi.ini
       
   104 			CREATE_OBJECT	TParsePtrC	TParsePtrC1	
       
   105 			COMMAND		TParsePtrC1	new		PBASE-F32-ParsePtrC-PublicApi-0004command1new
       
   106 			COMMAND		TParsePtrC1	~		
       
   107 	END_TEST_BLOCK
       
   108 END_TESTCASE			PBASE-F32-ParsePtrC-PublicApi-0050
       
   109 
       
   110 
       
   111 START_TESTCASE 			PBASE-F32-ParsePtrC-PublicApi-0051
       
   112 //! @SYMTestCaseID		PBASE-F32-ParsePtrC-PublicApi-0051
       
   113 //! @SYMAPI			TParsePtrC
       
   114 //! @SYMTestCaseDesc		TParsePtrC() negative test, where calls the function of base class  AddDir().
       
   115 //!				Uses API elements: TParsePtrC()
       
   116 //! @SYMTestActions		1. Create TParsePtrC object passing "c:\file.txt" as parameter.
       
   117 //!				2. Call AddDir() and passsing "dir" as name of directory to be added.
       
   118 //!				3. Delete TParsePtrC object.
       
   119 //!
       
   120 //! @SYMTestStatus		Implemented
       
   121 //! @SYMTestPriority		Critical
       
   122 //! @SYMTestExpectedResults	Function return FSCLIENT panic Code = 26.
       
   123 //! @SYMTestType		CIT
       
   124 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-ParsePtrC-PublicApi.ini
       
   125 			CREATE_OBJECT	TParsePtrC	TParsePtrC1	
       
   126 			COMMAND		TParsePtrC1	new		PBASE-F32-ParsePtrC-PublicApi-0005command1new
       
   127 			COMMAND		TParsePtrC1	AddDir		PBASE-F32-ParsePtrC-PublicApi-0005command2AddDir
       
   128 			COMMAND		TParsePtrC1	~		
       
   129 	END_TEST_BLOCK	!PanicCode=26 !PanicString="FSCLIENT panic"
       
   130 END_TESTCASE			PBASE-F32-ParsePtrC-PublicApi-0051
       
   131 
       
   132 START_TESTCASE 			PBASE-F32-ParsePtrC-PublicApi-0052
       
   133 //! @SYMTestCaseID		PBASE-F32-ParsePtrC-PublicApi-0052
       
   134 //! @SYMAPI			TParsePtrC
       
   135 //! @SYMTestCaseDesc		TParsePtrC() negative test, where calls the function of base class  AddDir() and pass empty parameter.
       
   136 //!				Uses API elements: TParsePtrC()
       
   137 //! @SYMTestActions		1. Create TParsePtrC object passing "c:\file.txt" as parameter.
       
   138 //!				2. Call AddDir() and passsing empty string as name of directory to be added.
       
   139 //!				3. Delete TParsePtrC object.
       
   140 //!
       
   141 //! @SYMTestStatus		Implemented
       
   142 //! @SYMTestPriority		Critical
       
   143 //! @SYMTestExpectedResults	Function does not leave nor panic.
       
   144 //! @SYMTestType		CIT
       
   145 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-ParsePtrC-PublicApi.ini
       
   146 			CREATE_OBJECT	TParsePtrC	TParsePtrC1	
       
   147 			COMMAND		TParsePtrC1	new		PBASE-F32-ParsePtrC-PublicApi-0006command1new
       
   148 			COMMAND		TParsePtrC1	AddDir		PBASE-F32-ParsePtrC-PublicApi-0006command2AddDir
       
   149 			COMMAND		TParsePtrC1	~		
       
   150 	END_TEST_BLOCK
       
   151 END_TESTCASE			PBASE-F32-ParsePtrC-PublicApi-0052
       
   152 
       
   153 START_TESTCASE 			PBASE-F32-ParsePtrC-PublicApi-0053
       
   154 //! @SYMTestCaseID		PBASE-F32-ParsePtrC-PublicApi-0053
       
   155 //! @SYMAPI			TParsePtrC
       
   156 //! @SYMTestCaseDesc		TParsePtrC() negative test, where calls the function of base class  AddDir() and pass illegal characters.
       
   157 //!				Uses API elements: TParsePtrC()
       
   158 //! @SYMTestActions		1. Create TParsePtrC object passing "c:\file.txt" as parameter.
       
   159 //!				2. Call AddDir() and passsing "$%#" as name of directory to be added.
       
   160 //!				3. Delete TParsePtrC object.
       
   161 //!
       
   162 //! @SYMTestStatus		Implemented
       
   163 //! @SYMTestPriority		Critical
       
   164 //! @SYMTestExpectedResults	Function return FSCLIENT panic Code = 26. 
       
   165 //! @SYMTestType		CIT
       
   166 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-ParsePtrC-PublicApi.ini
       
   167 			CREATE_OBJECT	TParsePtrC	TParsePtrC1	
       
   168 			COMMAND		TParsePtrC1	new		PBASE-F32-ParsePtrC-PublicApi-0007command1new
       
   169 			COMMAND		TParsePtrC1	AddDir		PBASE-F32-ParsePtrC-PublicApi-0007command2AddDir
       
   170 			COMMAND		TParsePtrC1	~		
       
   171 	END_TEST_BLOCK	!PanicCode=26 !PanicString="FSCLIENT panic"
       
   172 END_TESTCASE			PBASE-F32-ParsePtrC-PublicApi-0053
       
   173 
       
   174 START_TESTCASE 			PBASE-F32-ParsePtrC-PublicApi-0054
       
   175 //! @SYMTestCaseID		PBASE-F32-ParsePtrC-PublicApi-0054
       
   176 //! @SYMAPI			TParsePtrC
       
   177 //! @SYMTestCaseDesc		TParsePtrC() negative test, where calls the function of base class  PopDir(), where filename contains only root directory.
       
   178 //!				Uses API elements: TParsePtrC()
       
   179 //! @SYMTestActions		1. Create TParsePtrC object passing "c:\file.txt" as parameter.
       
   180 //!				2. Call PopDir().
       
   181 //!				3. Delete TParsePtrC object.
       
   182 //!
       
   183 //! @SYMTestStatus		Implemented
       
   184 //! @SYMTestPriority		Critical
       
   185 //! @SYMTestExpectedResults	Function PopDir() return error code KErrGeneral.
       
   186 //! @SYMTestType		CIT
       
   187 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-ParsePtrC-PublicApi.ini
       
   188 			CREATE_OBJECT		TParsePtrC	TParsePtrC1	
       
   189 			COMMAND			TParsePtrC1	new		PBASE-F32-ParsePtrC-PublicApi-0008command1new
       
   190 			COMMAND	!Error=-2	TParsePtrC1	PopDir		
       
   191 			COMMAND			TParsePtrC1	~		
       
   192 	END_TEST_BLOCK
       
   193 END_TESTCASE			PBASE-F32-ParsePtrC-PublicApi-0054
       
   194 
       
   195 START_TESTCASE 			PBASE-F32-ParsePtrC-PublicApi-0055
       
   196 //! @SYMTestCaseID		PBASE-F32-ParsePtrC-PublicApi-0055
       
   197 //! @SYMAPI			TParsePtrC
       
   198 //! @SYMTestCaseDesc		TParsePtrC() negative test, where calls the function of base class  PopDir(), where filename contains subdirectory.
       
   199 //!				Uses API elements: TParsePtrC()
       
   200 //! @SYMTestActions		1. Create TParsePtrC object passing "c:\base\file.txt" as parameter.
       
   201 //!				2. Call PopDir().
       
   202 //!				3. Delete TParsePtrC object.
       
   203 //!
       
   204 //! @SYMTestStatus		Implemented
       
   205 //! @SYMTestPriority		Critical
       
   206 //! @SYMTestExpectedResults	Function PopDir() FSCLIENT panic Code = 26.
       
   207 //! @SYMTestType		CIT
       
   208 	START_TEST_BLOCK	100	T_SfSrv	\base\PBASE-F32-ParsePtrC-PublicApi.ini
       
   209 			CREATE_OBJECT		TParsePtrC	TParsePtrC1	
       
   210 			COMMAND			TParsePtrC1	new		PBASE-F32-ParsePtrC-PublicApi-0009command1new
       
   211 			COMMAND			TParsePtrC1	PopDir		
       
   212 			COMMAND			TParsePtrC1	~		
       
   213 	END_TEST_BLOCK !PanicCode=26 !PanicString="FSCLIENT panic"
       
   214 END_TESTCASE			PBASE-F32-ParsePtrC-PublicApi-0055