os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-FileText-PublicApi-RAM.script
First public contribution.
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 "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".
9 // Initial Contributors:
10 // Nokia Corporation - initial contribution.
17 //! @SYMTestSuiteName pbase-f32-sfsrv-publicapi-ram
18 //! @SYMScriptTestEnvironment This test script requires a basic ROM.
19 //! @SYMScriptAuthor Dmitri Trofimov, Anton Grober, Segei Tveritin
20 //! @SYMScriptDescription The test script contains API tests for the following functions of TFileText class
21 //! @SYMScriptCreationDate 08/12/2006
23 //! void Set(RFile &aFile);
24 //! TInt Read(TDes &aDes);
25 //! TInt Write(const TDesC &aDes);
26 //! TInt Seek(TSeek aMode);
31 START_TESTCASE SETUP_FILES
32 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FileText-PublicApi.ini
33 CREATE_OBJECT RFs RFs1
34 CREATE_OBJECT CFileMan CFileMan1
37 COMMAND RFs1 MkDirAll test_dir
38 COMMAND CFileMan1 NewL fileman_fs
39 COMMAND CFileMan1 Copy test_file1
40 COMMAND CFileMan1 Close
41 COMMAND CFileMan1 Copy test_file2
42 COMMAND CFileMan1 Close
43 COMMAND CFileMan1 Copy test_file3
44 COMMAND CFileMan1 Close
45 COMMAND CFileMan1 Copy test_file4
46 COMMAND CFileMan1 Close
47 COMMAND CFileMan1 Copy test_file5
48 COMMAND CFileMan1 Close
49 COMMAND CFileMan1 Copy test_file6
50 COMMAND CFileMan1 Close
51 COMMAND CFileMan1 Copy test_file7
55 END_TESTCASE SETUP_FILES
57 START_TESTCASE PBASE-F32-FileText-PublicApi-0001
58 //! @SYMTestCaseID PBASE-F32-FileText-PublicApi-0001
60 //! @SYMTestCaseDesc TFileText() test.
61 //! Uses API elements: TFileText()
62 //! @SYMTestActions 1. Create TFileText object.
64 //! @SYMTestStatus Implemented
65 //! @SYMTestPriority Critical
66 //! @SYMTestExpectedResults Function does not leave nor panic.
68 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FileText-PublicApi.ini
69 CREATE_OBJECT TFileText TFileText1
70 COMMAND TFileText1 new
73 END_TESTCASE PBASE-F32-FileText-PublicApi-0001
76 START_TESTCASE PBASE-F32-FileText-PublicApi-0002
77 //! @SYMTestCaseID PBASE-F32-FileText-PublicApi-0002
79 //! @SYMTestCaseDesc Set() test. This tests for successful Set() call.
80 //! Uses API elements: Set()
81 //! @SYMTestActions 1. Create RFs object.
82 //! 2. Call Connect().
83 //! 3. Create RFile object.
84 //! 4. Call Open() on RFile object passing a reference to RFs object as the first parameter, a TDesC containing
85 //! path to file 'filetext_read.txt' string as the second parameter, and EFileRead as the third
87 //! 5. Create TFileText object.
88 //! 6. Call Set() passing a reference to RFile object as a parameter.
90 //! @SYMTestStatus Implemented
91 //! @SYMTestPriority Critical
92 //! @SYMTestExpectedResults Function does not leave nor panic.
94 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FileText-PublicApi.ini
95 CREATE_OBJECT RFs RFs1
96 CREATE_OBJECT RFile RFile1
97 CREATE_OBJECT TFileText TFileText1
101 COMMAND RFile1 Open PBASE-F32-FileText-PublicApi-0002command5Open
102 COMMAND TFileText1 new
103 COMMAND TFileText1 Set PBASE-F32-FileText-PublicApi-0002command8Set
108 END_TESTCASE PBASE-F32-FileText-PublicApi-0002
111 START_TESTCASE PBASE-F32-FileText-PublicApi-0004
112 //! @SYMTestCaseID PBASE-F32-FileText-PublicApi-0004
113 //! @SYMAPI TFileText
114 //! @SYMTestCaseDesc Read() passing a reference to a TDes descriptor with sufficient length to fit the first line of text file.
115 //! Uses API elements: Set(), Read()
116 //! @SYMTestActions 1. Create RFs object.
117 //! 2. Call Connect().
118 //! 3. Create RFile object.
119 //! 4. Call Open() on RFile object passing a reference to RFs object as the first parameter, a TDesC containing
120 //! path to file 'filetext_read.txt' string as the second parameter, and EFileRead as the third
122 //! 5. Create TFileText object.
123 //! 6. Call Set() passing a reference to RFile object as a parameter.
124 //! 7. Call Read(). Expecting string 'Symbian rocks my world!'. Buffer length is 64
125 //! 8. Delete TFiletext object.
126 //! 9. Call Close() on RFile object.
127 //! 10. Delete RFile object.
128 //! 11. Delete RFs object.
130 //! @SYMTestStatus Implemented
131 //! @SYMTestPriority Critical
132 //! @SYMTestExpectedResults Read() returns KErrNone. The string read is the same as expected.
134 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FileText-PublicApi.ini
135 CREATE_OBJECT RFs RFs1
136 CREATE_OBJECT RFile RFile1
137 CREATE_OBJECT TFileText TFileText1
141 COMMAND RFile1 Open PBASE-F32-FileText-PublicApi-0004command5Open
142 COMMAND TFileText1 new
143 COMMAND TFileText1 Set PBASE-F32-FileText-PublicApi-0004command8Set
144 COMMAND TFileText1 Read PBASE-F32-FileText-PublicApi-0004command9Read
149 END_TESTCASE PBASE-F32-FileText-PublicApi-0004
152 START_TESTCASE PBASE-F32-FileText-PublicApi-0005
153 //! @SYMTestCaseID PBASE-F32-FileText-PublicApi-0005
154 //! @SYMAPI TFileText
155 //! @SYMTestCaseDesc Write() passing a reference to a TDesC descriptor containing a line of text.
156 //! Uses API elements: Set(), Write(), Read()
157 //! @SYMTestActions 1. Create RFs object.
158 //! 2. Call Connect().
159 //! 3. Create RFile object.
160 //! 4. Call Open() on RFile object passing a reference to RFs object as the first parameter, a TDesC containing
161 //! path to file 'filetext_read.txt' string as the second parameter, and EFileWrite as the third
163 //! 5. Create TFileText object.
164 //! 6. Call Set() passing a reference to RFile object as a parameter.
165 //! 7. Call Write() passing a TDesC string reference as a parameter. String contains 'Symbian is the
167 //! 8. Call Seek() on TFileText passing ESeekStart as a parameter.
168 //! 9. Call Read() on TFileText. Expecting string 'Symbian is the best!!11ONEONE'. Buffer length is 64
169 //! 10. Delete TFileText object.
170 //! 11. Call Close() on RFile object.
171 //! 12. Delete RFile object.
172 //! 13. Call Delete() on RFs passing a reference to TDesC file name that has been created during the test.
173 //! 14. Delete RFs object.
175 //! @SYMTestStatus Implemented
176 //! @SYMTestPriority Critical
177 //! @SYMTestExpectedResults Write() returns KErrNone. Read() returns KErrNone. The string read is the same as expected.
179 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FileText-PublicApi.ini
180 CREATE_OBJECT RFs RFs1
181 CREATE_OBJECT RFile RFile1
182 CREATE_OBJECT TFileText TFileText1
186 COMMAND RFile1 Open PBASE-F32-FileText-PublicApi-0005command6Open
187 COMMAND TFileText1 new
188 COMMAND TFileText1 Set PBASE-F32-FileText-PublicApi-0005command8Set
189 COMMAND TFileText1 Write PBASE-F32-FileText-PublicApi-0005command9Write
190 COMMAND TFileText1 Seek PBASE-F32-FileText-PublicApi-0005command10Seek
191 COMMAND TFileText1 Read PBASE-F32-FileText-PublicApi-0005command11Read
197 END_TESTCASE PBASE-F32-FileText-PublicApi-0005
199 START_TESTCASE PBASE-F32-FileText-PublicApi-0006
200 //! @SYMTestCaseID PBASE-F32-FileText-PublicApi-0006
201 //! @SYMAPI TFileText
202 //! @SYMTestCaseDesc Seek() passing a ESeekStart as a parameter.
203 //! Uses API elements: Set(), Seek(), Read().
204 //! @SYMTestActions 1. Create RFs object.
205 //! 2. Call Connect().
206 //! 3. Create RFile object.
207 //! 4. Call Open() on RFile object passing a reference to RFs object as the first parameter, a TDesC containing
208 //! path to file 'filetext_read.txt' string as the second parameter, and EFileWrite as the third
210 //! 5. Create TFileText object.
211 //! 6. Call Set() passing a reference to RFile object as a parameter.
212 //! 7. Call Seek() on TFileText passing ESeekStart as a parameter.
213 //! 8. Call Read() on TFileText. Expecting string 'Symbian rocks my world!'.
214 //! 9. Delete TFiletext object.
215 //! 10. Call Close() on RFile object.
216 //! 11. Delete RFile object.
217 //! 12. Delete RFs object.
219 //! @SYMTestStatus Implemented
220 //! @SYMTestPriority Critical
221 //! @SYMTestExpectedResults Seek() returns KErrNone. Read() returns KErrNone, the string read is the same as expected.
223 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FileText-PublicApi.ini
224 CREATE_OBJECT RFs RFs1
225 CREATE_OBJECT RFile RFile1
226 CREATE_OBJECT TFileText TFileText1
230 COMMAND RFile1 Open PBASE-F32-FileText-PublicApi-0006command5Open
231 COMMAND TFileText1 new
232 COMMAND TFileText1 Set PBASE-F32-FileText-PublicApi-0006command8Set
233 COMMAND TFileText1 Seek PBASE-F32-FileText-PublicApi-0006command9Seek
234 COMMAND TFileText1 Read PBASE-F32-FileText-PublicApi-0006command10Read
239 END_TESTCASE PBASE-F32-FileText-PublicApi-0006
241 START_TESTCASE PBASE-F32-FileText-PublicApi-0007
242 //! @SYMTestCaseID PBASE-F32-FileText-PublicApi-0007
243 //! @SYMAPI TFileText
244 //! @SYMTestCaseDesc Seek() passing a ESeekEnd as a parameter.
245 //! Uses API elements: Set(), Seek(), Read()
246 //! @SYMTestActions 1. Create RFs object.
247 //! 2. Call Connect().
248 //! 3. Create RFile object.
249 //! 4. Call Open() on RFile object passing a reference to RFs object as the first parameter, a TDesC containing
250 //! path to file 'filetext_read.txt' string as the second parameter, and EFileWrite as the third
252 //! 5. Create TFileText object.
253 //! 6. Call Set() passing a reference to RFile object as a parameter.
254 //! 7. Call Seek() on TFileText passing ESeekEnd as a parameter.
255 //! 8. Call Read() on TFileText. No string expected. Just to get KErrEof. Buffer length is 64.
256 //! 9. Delete TFiletext object.
257 //! 10. Call Close() on RFile object.
258 //! 11. Delete RFile object.
259 //! 12. Delete RFs object.
261 //! @SYMTestStatus Implemented
262 //! @SYMTestPriority Critical
263 //! @SYMTestExpectedResults Seek() returns KErrNone. Read() returns KErrEof.
265 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FileText-PublicApi.ini
266 CREATE_OBJECT RFs RFs1
267 CREATE_OBJECT RFile RFile1
268 CREATE_OBJECT TFileText TFileText1
272 COMMAND RFile1 Open PBASE-F32-FileText-PublicApi-0007command5Open
273 COMMAND TFileText1 new
274 COMMAND TFileText1 Set PBASE-F32-FileText-PublicApi-0007command8Set
275 COMMAND TFileText1 Seek PBASE-F32-FileText-PublicApi-0007command9Seek
276 COMMAND !Error=-25 TFileText1 Read
281 END_TESTCASE PBASE-F32-FileText-PublicApi-0007
283 START_TESTCASE PBASE-F32-FileText-PublicApi-0008
284 //! @SYMTestCaseID PBASE-F32-FileText-PublicApi-0008
285 //! @SYMAPI TFileText
286 //! @SYMTestCaseDesc Write() trying to write in file opened in read-mode.
287 //! Uses API elements: Set(), Write()
288 //! @SYMTestActions 1. Create RFs object.
289 //! 2. Call Connect().
290 //! 3. Create RFile object.
291 //! 4. Call Open() on RFile object passing a reference to RFs object as the first parameter, a TDesC containing
292 //! path to file 'new_file.txt' string as the second parameter, and EFileRead as the third parameter.
293 //! 5. Create TFileText object.
294 //! 6. Call Set() passing RFile object instance as parameter.
295 //! 7. Call Write() on TFileText. Passing string 'Writing in read-mode' as TDesC parameter.
296 //! 8. Delete TFiletext object.
297 //! 9. Call Close() on RFile object.
298 //! 10. Delete RFile object.
299 //! 11. Delete RFs object.
301 //! @SYMTestStatus Implemented
302 //! @SYMTestPriority Critical
303 //! @SYMTestExpectedResults Write() returns KErrAccessDenied.
305 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FileText-PublicApi.ini
306 CREATE_OBJECT RFs RFs1
307 CREATE_OBJECT RFile RFile1
308 CREATE_OBJECT TFileText TFileText1
312 COMMAND RFile1 Open PBASE-F32-FileText-PublicApi-0008command5Open
313 COMMAND TFileText1 new
314 COMMAND TFileText1 Set PBASE-F32-FileText-PublicApi-0008command8Set
315 COMMAND !Error=-21 TFileText1 Write PBASE-F32-FileText-PublicApi-0008command9Write
320 END_TESTCASE PBASE-F32-FileText-PublicApi-0008
322 START_TESTCASE PBASE-F32-FileText-PublicApi-0009
323 //! @SYMTestCaseID PBASE-F32-FileText-PublicApi-0009
324 //! @SYMAPI TFileText
325 //! @SYMTestCaseDesc Read() returns KErrNone reading string more than 256 symbols in length .
326 //! Uses API elements: Set(), Read()
327 //! @SYMTestActions 1. Create RFs object.
328 //! 2. Call Connect().
329 //! 3. Create RFile object.
330 //! 4. Call Open() on RFile object passing a reference to RFs object as the first parameter, a TDesC containing
331 //! path to file 'big_line.txt' string as the second parameter, and EFileRead as the third parameter.
332 //! 5. Create TFileText object.
333 //! 6. Call Set() passing RFile object instance as parameter.
334 //! 7. Call Read(). String in file has more than 256 symbols.
335 //! 8. Delete TFiletext object.
336 //! 9. Call Close() on RFile object.
337 //! 10. Delete RFile object.
338 //! 11. Delete RFs object.
340 //! @SYMTestStatus Implemented
341 //! @SYMTestPriority Critical
342 //! @SYMTestExpectedResults Read() returns KErrNone.
344 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FileText-PublicApi.ini
345 CREATE_OBJECT RFs RFs1
346 CREATE_OBJECT RFile RFile1
347 CREATE_OBJECT TFileText TFileText1
351 COMMAND RFile1 Open PBASE-F32-FileText-PublicApi-0009command5Open
352 COMMAND TFileText1 new
353 COMMAND TFileText1 Set PBASE-F32-FileText-PublicApi-0009command8Set
354 COMMAND TFileText1 Read big_buffer
360 END_TESTCASE PBASE-F32-FileText-PublicApi-0009
362 START_TESTCASE PBASE-F32-FileText-PublicApi-0010
363 //! @SYMTestCaseID PBASE-F32-FileText-PublicApi-0010
364 //! @SYMAPI TFileText
365 //! @SYMTestCaseDesc Read() returns KErrTooBig error because of too small buffer.
366 //! Uses API elements: Set(), Read()
367 //! @SYMTestActions 1. Create RFs object.
368 //! 2. Call Connect().
369 //! 3. Create RFile object.
370 //! 4. Call Open() on RFile object passing a reference to RFs object as the first parameter, a TDesC containing
371 //! path to file 'big_line.txt' string as the second parameter, and EFileRead as the third parameter.
372 //! 5. Create TFileText object.
373 //! 6. Call Set() passing RFile object instance as parameter.
374 //! 7. Call Read(). String in file has more than 256 symbols. Buffer is 32.
375 //! 8. Delete TFiletext object.
376 //! 9. Call Close() on RFile object.
377 //! 10. Delete RFile object.
378 //! 11. Delete RFs object.
380 //! @SYMTestStatus Implemented
381 //! @SYMTestPriority Critical
382 //! @SYMTestExpectedResults Read() returns KErrTooBig.
384 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FileText-PublicApi.ini
385 CREATE_OBJECT RFs RFs1
386 CREATE_OBJECT RFile RFile1
387 CREATE_OBJECT TFileText TFileText1
391 COMMAND RFile1 Open PBASE-F32-FileText-PublicApi-0010command5Open
392 COMMAND TFileText1 new
393 COMMAND TFileText1 Set PBASE-F32-FileText-PublicApi-0010command8Set
394 COMMAND !Error=-40 TFileText1 Read PBASE-F32-FileText-PublicApi-0010command9Read
400 END_TESTCASE PBASE-F32-FileText-PublicApi-0010
404 START_TESTCASE PBASE-F32-FileText-PublicApi-0011
405 //! @SYMTestCaseID PBASE-F32-FileText-PublicApi-0011
406 //! @SYMAPI TFileText
407 //! @SYMTestCaseDesc Read() returns KErrTooBig error because of too small buffer.
408 //! Uses API elements: Set(), Read(), Write()
409 //! @SYMTestActions 1. Create RFs object.
410 //! 2. Call Connect().
411 //! 3. Create RFile object.
412 //! 4. Call Replace() on RFile object passing a reference to RFs object as the first parameter, a TDesC
413 //! containing path to file 'multiline.txt' string as the second parameter, and EFileWrite as the
415 //! 5. Create TFileText object.
416 //! 6. Call Set() passing RFile object instance as parameter.
417 //! 7. Call Write(). String parameter is is 'First string'. Buffer is 64.
418 //! 8. Call Write(). String parameter is is 'Second string'. Buffer is 64.
419 //! 9. Call Write(). String parameter is is 'Third string'. Buffer is 64.
420 //! 10. Delete TFiletext object.
421 //! 11. Call Close() on RFile object.
422 //! 12. Call Open() on RFile object passing a reference to RFs object as the first parameter, a TDesC file name
423 //! reference as the second parameter, and EFileRead as the third parameter. The file opened named
424 //! 'multiline.txt' and contains three lines of text.
425 //! 13. Create TFileText object.
426 //! 14. Call Set() passing RFile object instance as parameter.
427 //! 15. Call Read(). String in file expected as 'First string'. Buffer is 64.
428 //! 16. Call Read(). String in file expected as 'Second string'. Buffer is 64.
429 //! 15. Call Read(). String in file expected as 'Third string'. Buffer is 64.
430 //! 17. Delete TFiletext object.
431 //! 18. Call Close() on RFile object.
432 //! 19. Delete RFile object.
433 //! 20. Delete RFs object.
435 //! @SYMTestStatus Implemented
436 //! @SYMTestPriority Critical
437 //! @SYMTestExpectedResults Write() returns KErrNone. Read() returns KErrNone.
439 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FileText-PublicApi.ini
440 CREATE_OBJECT RFs RFs1
441 CREATE_OBJECT RFile RFile1
442 CREATE_OBJECT TFileText TFileText1
446 COMMAND RFile1 Replace PBASE-F32-FileText-PublicApi-0011command5Replace
447 COMMAND TFileText1 new
448 COMMAND TFileText1 Set PBASE-F32-FileText-PublicApi-0011command8Set
449 COMMAND TFileText1 Write PBASE-F32-FileText-PublicApi-0011command9Write
450 COMMAND TFileText1 Write PBASE-F32-FileText-PublicApi-0011command10Write
451 COMMAND TFileText1 Write PBASE-F32-FileText-PublicApi-0011command11Write
454 COMMAND RFile1 Open PBASE-F32-FileText-PublicApi-0011command15Open
455 COMMAND TFileText1 new
456 COMMAND TFileText1 Set PBASE-F32-FileText-PublicApi-0011command18Set
457 COMMAND TFileText1 Read PBASE-F32-FileText-PublicApi-0011command19Read
458 COMMAND TFileText1 Read PBASE-F32-FileText-PublicApi-0011command20Read
459 COMMAND TFileText1 Read PBASE-F32-FileText-PublicApi-0011command21Read
464 END_TESTCASE PBASE-F32-FileText-PublicApi-0011
471 START_TESTCASE PBASE-F32-FileText-PublicApi-0012
472 //! @SYMTestCaseID PBASE-F32-FileText-PublicApi-0012
473 //! @SYMCreationDate 08/08/2007
474 //! @SYMTestCaseDesc Write() appending a string. Read() checking if it is added to the end of file.
475 //! Uses API elements: Set(), Read(), Write()
476 //! @SYMTestActions 1. Create RFs object.
477 //! 2. Call Connect().
478 //! 3. Create RFile object.
479 //! 4. Call Open() on RFile object passing a reference to RFs object as the first parameter, a TDesC containing
480 //! path to file 'oneliner.txt' string as the second parameter, and EFileWrite as the third
482 //! 5. Create TFileText object.
483 //! 6. Call Set() passing RFile object instance as parameter.
484 //! 7. Call Write(). String parameter is is 'Appended string'. Buffer is 64.
485 //! 8. Call Close() on RFile object.
486 //! 9. Call Open() on RFile object passing a reference to RFs object as the first parameter, a TDesC containing
487 //! path to file 'oneliner.txt' string as the second parameter, and EFileRead as the third parameter.
488 //! 10. Create TFileText object. And set the position to the beginning of file using Seek().
489 //! 11. Call Set() passing RFile object instance as parameter.
490 //! 12. Call Read(). String in file expected as 'First string'. Buffer is 64. (File contained this string
491 //! before any modifications. So it's have to be first one.)
492 //! 13. Call Read(). String in file expected as 'Appended string'. Buffer is 64.
493 //! 14. Delete TFiletext object.
494 //! 15. Call Close() on RFile object.
495 //! 16. Delete RFile object.
496 //! 17. Delete RFs object.
498 //! @SYMTestStatus Implemented
499 //! @SYMTestPriority Critical
500 //! @SYMTestExpectedResults Write() returns KErrNone. Read() returns KErrNone.
502 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FileText-PublicApi.ini
503 CREATE_OBJECT RFs RFs1
504 CREATE_OBJECT RFile RFile1
505 CREATE_OBJECT TFileText TFileText1
509 COMMAND RFile1 Open PBASE-F32-FileText-PublicApi-0012command5Open
510 COMMAND TFileText1 new
511 COMMAND TFileText1 Set PBASE-F32-FileText-PublicApi-0012command8Set
512 COMMAND TFileText1 Write PBASE-F32-FileText-PublicApi-0012command9Write
515 COMMAND RFile1 Open PBASE-F32-FileText-PublicApi-0012command13Open
516 COMMAND TFileText1 new
517 COMMAND TFileText1 Set PBASE-F32-FileText-PublicApi-0012command16Set
518 COMMAND TFileText1 Read PBASE-F32-FileText-PublicApi-0012command18Read
519 COMMAND TFileText1 Read PBASE-F32-FileText-PublicApi-0012command19Read
524 END_TESTCASE PBASE-F32-FileText-PublicApi-0012
528 START_TESTCASE PBASE-F32-FileText-PublicApi-0013
529 //! @SYMTestCaseID PBASE-F32-FileText-PublicApi-0013
530 //! @SYMAPI TFileText
531 //! @SYMTestCaseDesc Seek() passing a ESeekAddress as a parameter.
532 //! Uses API elements: Set(), Seek().
533 //! @SYMTestActions 1. Create RFs object.
534 //! 2. Call Connect().
535 //! 3. Create RFile object.
536 //! 4. Call Open() on RFile object passing a reference to RFs object as the first parameter, a TDesC file name
537 //! reference as the second parameter, and EFileWrite as the third parameter.
538 //! 5. Create TFileText object.
539 //! 6. Call Set() passing a reference to RFile object as a parameter.
540 //! 7. Call Seek() on TFileText passing ESeekAddress as a parameter.
541 //! 8. Delete TFiletext object.
542 //! 9. Call Close() on RFile object.
543 //! 10. Delete RFile object.
544 //! 11. Delete RFs object.
546 //! @SYMTestStatus Implemented
547 //! @SYMTestPriority Critical
548 //! @SYMTestExpectedResults Seek() panics with code FSCLIENT-5.
550 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FileText-PublicApi.ini
551 CREATE_OBJECT RFs RFs1
552 CREATE_OBJECT RFile RFile1
553 CREATE_OBJECT TFileText TFileText1
557 COMMAND RFile1 Open PBASE-F32-FileText-PublicApi-0013command5Open
558 COMMAND TFileText1 new
559 COMMAND TFileText1 Set PBASE-F32-FileText-PublicApi-0013command8Set
560 COMMAND TFileText1 Seek PBASE-F32-FileText-PublicApi-0013command9Seek
564 END_TEST_BLOCK !PanicCode=5 !PanicString="FSCLIENT panic"
566 END_TESTCASE PBASE-F32-FileText-PublicApi-0013
568 START_TESTCASE PBASE-F32-FileText-PublicApi-0014
569 //! @SYMTestCaseID PBASE-F32-FileText-PublicApi-0014
570 //! @SYMAPI TFileText
571 //! @SYMTestCaseDesc Seek() passing a ESeekCurrent as a parameter.
572 //! Uses API elements: Set(), Seek().
573 //! @SYMTestActions 1. Create RFs object.
574 //! 2. Call Connect().
575 //! 3. Create RFile object.
576 //! 4. Call Open() on RFile object passing a reference to RFs object as the first parameter, a TDesC file name
577 //! reference as the second parameter, and EFileWrite as the third parameter.
578 //! 5. Create TFileText object.
579 //! 6. Call Set() passing a reference to RFile object as a parameter.
580 //! 7. Call Seek() on TFileText passing ESeekCurrent as a parameter.
581 //! 8. Delete TFiletext object.
582 //! 9. Call Close() on RFile object.
583 //! 10. Delete RFile object.
584 //! 11. Delete RFs object.
586 //! @SYMTestStatus Implemented
587 //! @SYMTestPriority Critical
588 //! @SYMTestExpectedResults Seek() panics with code FSCLIENT-5.
590 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FileText-PublicApi.ini
591 CREATE_OBJECT RFs RFs1
592 CREATE_OBJECT RFile RFile1
593 CREATE_OBJECT TFileText TFileText1
597 COMMAND RFile1 Open PBASE-F32-FileText-PublicApi-0014command5Open
598 COMMAND TFileText1 new
599 COMMAND TFileText1 Set PBASE-F32-FileText-PublicApi-0014command8Set
600 COMMAND TFileText1 Seek PBASE-F32-FileText-PublicApi-0014command9Seek
604 END_TEST_BLOCK !PanicCode=5 !PanicString="FSCLIENT panic"
605 END_TESTCASE PBASE-F32-FileText-PublicApi-0014
608 START_TESTCASE REMOVE_FILES
609 START_TEST_BLOCK 100 T_SfSrv \base\PBASE-F32-FileText-PublicApi.ini
610 CREATE_OBJECT RFs RFs1
611 CREATE_OBJECT CFileMan CFileMan1
614 COMMAND CFileMan1 NewL fileman_fs
615 COMMAND CFileMan1 Delete all_test_files
616 COMMAND RFs1 RmDir test_dir
617 COMMAND CFileMan1 new
621 END_TESTCASE REMOVE_FILES