|
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 TParsePtr class: |
|
22 //! TParsePtr(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-ParsePtr-PublicApi-0047 |
|
32 //! @SYMTestCaseID PBASE-F32-ParsePtr-PublicApi-0047 |
|
33 //! @SYMAPI TParsePtr |
|
34 //! @SYMTestCaseDesc TParsePtr() test. |
|
35 //! Uses API elements: TParsePtr() |
|
36 //! @SYMTestActions 1. Create TParsePtr object passing "c:\path1\path2\file.ext" as parameter. |
|
37 //! 2. Delete TParsePtr 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-ParsePtr-PublicApi.ini |
|
44 CREATE_OBJECT TParsePtr TParsePtr1 |
|
45 COMMAND TParsePtr1 new PBASE-F32-ParsePtr-PublicApi-0001command1new |
|
46 COMMAND TParsePtr1 ~ |
|
47 END_TEST_BLOCK |
|
48 END_TESTCASE PBASE-F32-ParsePtr-PublicApi-0047 |
|
49 |
|
50 |
|
51 START_TESTCASE PBASE-F32-ParsePtr-PublicApi-0048 |
|
52 //! @SYMTestCaseID PBASE-F32-ParsePtr-PublicApi-0048 |
|
53 //! @SYMAPI TParsePtr |
|
54 //! @SYMTestCaseDesc TParsePtr() test, where name passed in constructor are NUUL. |
|
55 //! Uses API elements: TParsePtr() |
|
56 //! @SYMTestActions 1. Create TParsePtr object passing "0" as parameter. |
|
57 //! 2. Delete TParsePtr 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-ParsePtr-PublicApi.ini |
|
64 CREATE_OBJECT TParsePtr TParsePtr1 |
|
65 COMMAND TParsePtr1 new PBASE-F32-ParsePtr-PublicApi-0002command1new |
|
66 COMMAND TParsePtr1 ~ |
|
67 END_TEST_BLOCK |
|
68 END_TESTCASE PBASE-F32-ParsePtr-PublicApi-0048 |
|
69 |
|
70 |
|
71 START_TESTCASE PBASE-F32-ParsePtr-PublicApi-0049 |
|
72 //! @SYMTestCaseID PBASE-F32-ParsePtr-PublicApi-0049 |
|
73 //! @SYMAPI TParsePtr |
|
74 //! @SYMTestCaseDesc TParsePtr() negative test, where name passed in constructor contain illegal path construction. |
|
75 //! Uses API elements: TParsePtr() |
|
76 //! @SYMTestActions 1. Create TParsePtr object passing "c::\file.ext" as parameter. |
|
77 //! 2. Delete TParsePtr 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-ParsePtr-PublicApi.ini |
|
84 CREATE_OBJECT TParsePtr TParsePtr1 |
|
85 COMMAND TParsePtr1 new PBASE-F32-ParsePtr-PublicApi-0003command1new |
|
86 COMMAND TParsePtr1 ~ |
|
87 END_TEST_BLOCK !PanicCode=24 !PanicString="FSCLIENT panic" |
|
88 END_TESTCASE PBASE-F32-ParsePtr-PublicApi-0049 |
|
89 |
|
90 |
|
91 START_TESTCASE PBASE-F32-ParsePtr-PublicApi-0050 |
|
92 //! @SYMTestCaseID PBASE-F32-ParsePtr-PublicApi-0050 |
|
93 //! @SYMAPI TParsePtr |
|
94 //! @SYMTestCaseDesc TParsePtr() test, where name passed in constructor contain wildcards. |
|
95 //! Uses API elements: TParsePtr() |
|
96 //! @SYMTestActions 1. Create TParsePtr object passing "c:\file?.*" as parameter. |
|
97 //! 2. Delete TParsePtr 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-ParsePtr-PublicApi.ini |
|
104 CREATE_OBJECT TParsePtr TParsePtr1 |
|
105 COMMAND TParsePtr1 new PBASE-F32-ParsePtr-PublicApi-0004command1new |
|
106 COMMAND TParsePtr1 ~ |
|
107 END_TEST_BLOCK |
|
108 END_TESTCASE PBASE-F32-ParsePtr-PublicApi-0050 |
|
109 |
|
110 START_TESTCASE PBASE-F32-ParsePtr-PublicApi-0051 |
|
111 //! @SYMTestCaseID PBASE-F32-ParsePtr-PublicApi-0051 |
|
112 //! @SYMAPI TParsePtr |
|
113 //! @SYMTestCaseDesc PopDir() test. This test for successful removal of the last directory from the path. |
|
114 //! Uses API elements: PopDir() |
|
115 //! @SYMTestActions 1. Create TParsePtr object setting up the following path name: "c\dir\filename.ext". |
|
116 //! 2. Call PopDir(). |
|
117 //! 3. Call FullName(). Expecting 'c:\dir1\filename.ext' |
|
118 //! |
|
119 //! @SYMTestStatus Implemented |
|
120 //! @SYMTestPriority Critical |
|
121 //! @SYMTestExpectedResults PopDir() returns KErrNone. The value returned by FullName() is the same as expected. |
|
122 //! @SYMTestType CIT |
|
123 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-ParsePtr-PublicApi.ini |
|
124 CREATE_OBJECT TParsePtr TParsePtr1 |
|
125 COMMAND TParsePtr1 new PBASE-F32-ParsePtr-PublicApi-0005command2Set |
|
126 COMMAND TParsePtr1 PopDir |
|
127 COMMAND TParsePtr1 FullName PBASE-F32-ParsePtr-PublicApi-0005command4FullName |
|
128 COMMAND TParsePtr1 ~ |
|
129 END_TEST_BLOCK |
|
130 END_TESTCASE PBASE-F32-ParsePtr-PublicApi-0051 |
|
131 |
|
132 |
|
133 START_TESTCASE PBASE-F32-ParsePtr-PublicApi-0052 |
|
134 //! @SYMTestCaseID PBASE-F32-ParsePtr-PublicApi-0052 |
|
135 //! @SYMAPI TParsePtr |
|
136 //! @SYMTestCaseDesc AddDir() test. This tests for successful adding of directory to the end of path. |
|
137 //! Uses API elements: AddDir() |
|
138 //! @SYMTestActions 1. Create TParsePtr object setting path to "c:\dir1\dir2\filename.ext". |
|
139 //! 2. Call AddDir() passing "dir3" string. |
|
140 //! 3. Call FullName(). Expecting 'c:\dir1\dir2\dir3\filename.ext' |
|
141 //! |
|
142 //! @SYMTestStatus Implemented |
|
143 //! @SYMTestPriority Critical |
|
144 //! @SYMTestExpectedResults AddDir() returns KErrNone. The value returned by FullName() is the same as expected. |
|
145 //! @SYMTestType CIT |
|
146 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-ParsePtr-PublicApi.ini |
|
147 CREATE_OBJECT TParsePtr TParsePtr1 |
|
148 COMMAND TParsePtr1 new PBASE-F32-ParsePtr-PublicApi-0006command2Set |
|
149 COMMAND TParsePtr1 AddDir PBASE-F32-ParsePtr-PublicApi-0006command3AddDir |
|
150 COMMAND TParsePtr1 FullName PBASE-F32-ParsePtr-PublicApi-0006command4FullName |
|
151 COMMAND TParsePtr1 ~ |
|
152 END_TEST_BLOCK |
|
153 END_TESTCASE PBASE-F32-ParsePtr-PublicApi-0052 |
|
154 |
|
155 |
|
156 START_TESTCASE PBASE-F32-ParsePtr-PublicApi-0053 |
|
157 //! @SYMTestCaseID PBASE-F32-ParsePtr-PublicApi-0053 |
|
158 //! @SYMAPI TParsePtr |
|
159 //! @SYMTestCaseDesc AddDir() negative test. This tests for the function to return error KErrBadName in case the directory to add begins with slash "\". |
|
160 //! ses API elements: AddDir() |
|
161 //! @SYMTestActions 1. Create TParsePtr object setting path to "c:\dir1\dir2\filename.ext". |
|
162 //! 2. Call AddDir() passing "\dir3" string. |
|
163 //! |
|
164 //! @SYMTestStatus Implemented |
|
165 //! @SYMTestPriority Critical |
|
166 //! @SYMTestExpectedResults AddDir() returns KErrBadName. |
|
167 //! @SYMTestType CIT |
|
168 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-ParsePtr-PublicApi.ini |
|
169 CREATE_OBJECT TParsePtr TParsePtr1 |
|
170 COMMAND TParsePtr1 new PBASE-F32-ParsePtr-PublicApi-0007command2Set |
|
171 COMMAND !Error=-28 TParsePtr1 AddDir PBASE-F32-ParsePtr-PublicApi-0007command3AddDir |
|
172 COMMAND TParsePtr1 ~ |
|
173 END_TEST_BLOCK |
|
174 END_TESTCASE PBASE-F32-ParsePtr-PublicApi-0053 |
|
175 |
|
176 |
|
177 START_TESTCASE PBASE-F32-ParsePtr-PublicApi-0054 |
|
178 //! @SYMTestCaseID PBASE-F32-ParsePtr-PublicApi-0054 |
|
179 //! @SYMAPI TParsePtr |
|
180 //! @SYMTestCaseDesc AddDir() test, where name of directory contains the wildcard. |
|
181 //! Uses API elements: AddDir() |
|
182 //! @SYMTestActions 1. Create TParsePtr object setting path to "c:\dir1\dir2\filename.ext". |
|
183 //! 2. Call AddDir() passing a "dir*" |
|
184 //! |
|
185 //! @SYMTestStatus Implemented |
|
186 //! @SYMTestPriority Critical |
|
187 //! @SYMTestExpectedResults AddDir() returns KErrNone. |
|
188 //! @SYMTestType CIT |
|
189 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-ParsePtr-PublicApi.ini |
|
190 CREATE_OBJECT TParsePtr TParsePtr1 |
|
191 COMMAND TParsePtr1 new PBASE-F32-ParsePtr-PublicApi-0008command2Set |
|
192 COMMAND TParsePtr1 AddDir PBASE-F32-ParsePtr-PublicApi-0008command3AddDir |
|
193 COMMAND TParsePtr1 ~ |
|
194 END_TEST_BLOCK |
|
195 END_TESTCASE PBASE-F32-ParsePtr-PublicApi-0054 |
|
196 |
|
197 |
|
198 START_TESTCASE PBASE-F32-ParsePtr-PublicApi-0055 |
|
199 //! @SYMTestCaseID PBASE-F32-ParsePtr-PublicApi-0055 |
|
200 //! @SYMAPI TParsePtr |
|
201 //! @SYMTestCaseDesc AddDir() negative test, where name of directory ended with a "\". |
|
202 //! Uses API elements: AddDir() |
|
203 //! @SYMTestActions 1. Create TParsePtr object setting path to "c:\dir1\dir2\filename.ext". |
|
204 //! 2. Call AddDir() passing "dir3\". |
|
205 //! |
|
206 //! @SYMTestStatus Implemented |
|
207 //! @SYMTestPriority Critical |
|
208 //! @SYMTestExpectedResults AddDir() returns KErrBadName. |
|
209 //! @SYMTestType CIT |
|
210 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-ParsePtr-PublicApi.ini |
|
211 CREATE_OBJECT TParsePtr TParsePtr1 |
|
212 COMMAND TParsePtr1 new PBASE-F32-ParsePtr-PublicApi-0009command2Set |
|
213 COMMAND !Error=-28 TParsePtr1 AddDir PBASE-F32-ParsePtr-PublicApi-0009command3AddDir |
|
214 COMMAND TParsePtr1 ~ |
|
215 END_TEST_BLOCK |
|
216 END_TESTCASE PBASE-F32-ParsePtr-PublicApi-0055 |