sl@0
|
1 |
// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// f32test\server\t_rdsect.cpp
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
#define __E32TEST_EXTENSION__
|
sl@0
|
19 |
|
sl@0
|
20 |
#include <f32file.h>
|
sl@0
|
21 |
#include <e32test.h>
|
sl@0
|
22 |
|
sl@0
|
23 |
#include "t_server.h"
|
sl@0
|
24 |
#include "t_chlffs.h"
|
sl@0
|
25 |
|
sl@0
|
26 |
#if defined(__WINS__)
|
sl@0
|
27 |
#define WIN32_LEAN_AND_MEAN
|
sl@0
|
28 |
#pragma warning (disable:4201) // warning C4201: nonstandard extension used : nameless struct/union
|
sl@0
|
29 |
#pragma warning (default:4201) // warning C4201: nonstandard extension used : nameless struct/union
|
sl@0
|
30 |
#endif
|
sl@0
|
31 |
|
sl@0
|
32 |
#if defined(_UNICODE)
|
sl@0
|
33 |
#if !defined(UNICODE)
|
sl@0
|
34 |
#define UNICODE
|
sl@0
|
35 |
#endif
|
sl@0
|
36 |
#endif
|
sl@0
|
37 |
|
sl@0
|
38 |
GLDEF_D RTest test(_L("T_RDSECT"));
|
sl@0
|
39 |
|
sl@0
|
40 |
|
sl@0
|
41 |
TBuf<26> alphaBuffer=_L("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
|
sl@0
|
42 |
TBuf<10> numberBuffer=_L("0123456789");
|
sl@0
|
43 |
TBuf<14> humptyBuffer=_L("Humpty-Dumpty!");
|
sl@0
|
44 |
TPtr8 alphaPtr((TText8*)alphaBuffer.Ptr(),alphaBuffer.Size(),alphaBuffer.Size());
|
sl@0
|
45 |
TPtr8 numberPtr((TText8*)numberBuffer.Ptr(),numberBuffer.Size(),numberBuffer.Size());
|
sl@0
|
46 |
TPtr8 humptyPtr((TText8*)humptyBuffer.Ptr(),humptyBuffer.Size(),humptyBuffer.Size());
|
sl@0
|
47 |
|
sl@0
|
48 |
|
sl@0
|
49 |
/*
|
sl@0
|
50 |
|
sl@0
|
51 |
What this test is for:
|
sl@0
|
52 |
|
sl@0
|
53 |
Tests the implementation of RFs::ReadFileSection() which has been designed
|
sl@0
|
54 |
to allow reading from a file regardless of its lock state.
|
sl@0
|
55 |
Under the EPOC FAT filesystem, the function accesses the raw file data without
|
sl@0
|
56 |
opening the file using a share mode. This is obviously a dangerous activity
|
sl@0
|
57 |
should the file be currently open for writing by another user - but the file
|
sl@0
|
58 |
server makes no guarantees as to the data it returns! The function allows the
|
sl@0
|
59 |
caller to specify the starting position in the file from which to read the data
|
sl@0
|
60 |
and the length of data required.
|
sl@0
|
61 |
|
sl@0
|
62 |
This test creates a number of files and tests the use of the function when the
|
sl@0
|
63 |
files are closed and when they are open in a number of access modes.
|
sl@0
|
64 |
It also tests reading a UID from the files using this new function.
|
sl@0
|
65 |
|
sl@0
|
66 |
*/
|
sl@0
|
67 |
|
sl@0
|
68 |
LOCAL_C void CreateTestFiles()
|
sl@0
|
69 |
//
|
sl@0
|
70 |
// Create files with uids for testing
|
sl@0
|
71 |
//
|
sl@0
|
72 |
{
|
sl@0
|
73 |
|
sl@0
|
74 |
test.Next(_L("Create test files"));
|
sl@0
|
75 |
TInt r=TheFs.MkDir(_L("\\F32-TST\\"));
|
sl@0
|
76 |
test(r==KErrNone || r==KErrAlreadyExists);
|
sl@0
|
77 |
|
sl@0
|
78 |
RFile file;
|
sl@0
|
79 |
|
sl@0
|
80 |
// Create \\gSessionPath\\UIDCHK.BLG - with uid no data
|
sl@0
|
81 |
r=file.Replace(TheFs,_L("\\F32-TST\\UIDCHK.BLG"),EFileRead|EFileWrite);
|
sl@0
|
82 |
test_KErrNone(r);
|
sl@0
|
83 |
TUidType uidType(TUid::Uid('U'),TUid::Uid('I'),TUid::Uid('D'));
|
sl@0
|
84 |
TCheckedUid checkedUid(uidType);
|
sl@0
|
85 |
TPtrC8 buf((TUint8*)&checkedUid,sizeof(TCheckedUid));
|
sl@0
|
86 |
r=file.Write(buf);
|
sl@0
|
87 |
test_KErrNone(r);
|
sl@0
|
88 |
file.Close();
|
sl@0
|
89 |
|
sl@0
|
90 |
// Create \\gSessionPath\\UIDCHK.MSG - with uid and data
|
sl@0
|
91 |
r=file.Replace(TheFs,_L("\\F32-TST\\UIDCHK.MSG"),EFileRead|EFileWrite);
|
sl@0
|
92 |
test_KErrNone(r);
|
sl@0
|
93 |
TUidType uidType2(TUid::Uid('X'),TUid::Uid('Y'),TUid::Uid('Z'));
|
sl@0
|
94 |
checkedUid.Set(uidType2);
|
sl@0
|
95 |
buf.Set((TUint8*)&checkedUid,sizeof(TCheckedUid));
|
sl@0
|
96 |
r=file.Write(buf);
|
sl@0
|
97 |
test_KErrNone(r);
|
sl@0
|
98 |
r=file.Write(_L8("More file data"));
|
sl@0
|
99 |
test_KErrNone(r);
|
sl@0
|
100 |
file.Close();
|
sl@0
|
101 |
|
sl@0
|
102 |
// Create \\gSessionPath\\UIDCHK.DAT - uid stored only in the file
|
sl@0
|
103 |
r=file.Replace(TheFs,_L("\\F32-TST\\UIDCHK.DAT"),EFileRead|EFileWrite);
|
sl@0
|
104 |
test_KErrNone(r);
|
sl@0
|
105 |
TUidType uidType3(TUid::Uid('D'),TUid::Uid('A'),TUid::Uid('T'));
|
sl@0
|
106 |
checkedUid.Set(uidType3);
|
sl@0
|
107 |
buf.Set((TUint8*)&checkedUid,sizeof(TCheckedUid));
|
sl@0
|
108 |
r=file.Write(buf);
|
sl@0
|
109 |
test_KErrNone(r);
|
sl@0
|
110 |
r=file.Write(_L8("More file data"));
|
sl@0
|
111 |
test_KErrNone(r);
|
sl@0
|
112 |
file.Close();
|
sl@0
|
113 |
|
sl@0
|
114 |
// Make a few random files - these will be deleted before the test begins
|
sl@0
|
115 |
// but are necessary to try to split file ReadFileSection into non-contiguous clusters
|
sl@0
|
116 |
|
sl@0
|
117 |
r=file.Replace(TheFs,_L("\\F32-TST\\Temp1.txt"),EFileRead|EFileWrite);
|
sl@0
|
118 |
test_KErrNone(r);
|
sl@0
|
119 |
file.SetSize(550);
|
sl@0
|
120 |
file.Close();
|
sl@0
|
121 |
|
sl@0
|
122 |
r=file.Replace(TheFs,_L("\\F32-TST\\Temp2.txt"),EFileRead|EFileWrite);
|
sl@0
|
123 |
test_KErrNone(r);
|
sl@0
|
124 |
file.SetSize(256);
|
sl@0
|
125 |
file.Close();
|
sl@0
|
126 |
|
sl@0
|
127 |
r=file.Replace(TheFs,_L("\\F32-TST\\Temp3.txt"),EFileRead|EFileWrite);
|
sl@0
|
128 |
test_KErrNone(r);
|
sl@0
|
129 |
file.SetSize(256);
|
sl@0
|
130 |
file.Close();
|
sl@0
|
131 |
|
sl@0
|
132 |
r=file.Replace(TheFs,_L("\\F32-TST\\Temp4.txt"),EFileRead|EFileWrite);
|
sl@0
|
133 |
test_KErrNone(r);
|
sl@0
|
134 |
file.SetSize(550);
|
sl@0
|
135 |
file.Close();
|
sl@0
|
136 |
|
sl@0
|
137 |
r=file.Replace(TheFs,_L("\\F32-TST\\Temp5.txt"),EFileRead|EFileWrite);
|
sl@0
|
138 |
test_KErrNone(r);
|
sl@0
|
139 |
file.SetSize(256);
|
sl@0
|
140 |
file.Close();
|
sl@0
|
141 |
|
sl@0
|
142 |
r=file.Replace(TheFs,_L("\\F32-TST\\Temp6.txt"),EFileRead|EFileWrite);
|
sl@0
|
143 |
test_KErrNone(r);
|
sl@0
|
144 |
file.SetSize(256);
|
sl@0
|
145 |
file.Close();
|
sl@0
|
146 |
|
sl@0
|
147 |
r=file.Replace(TheFs,_L("\\F32-TST\\Temp7.txt"),EFileRead|EFileWrite);
|
sl@0
|
148 |
test_KErrNone(r);
|
sl@0
|
149 |
file.SetSize(256);
|
sl@0
|
150 |
file.Close();
|
sl@0
|
151 |
|
sl@0
|
152 |
r=file.Replace(TheFs,_L("\\F32-TST\\Temp8.txt"),EFileRead|EFileWrite);
|
sl@0
|
153 |
test_KErrNone(r);
|
sl@0
|
154 |
file.SetSize(256);
|
sl@0
|
155 |
file.Close();
|
sl@0
|
156 |
|
sl@0
|
157 |
r=file.Replace(TheFs,_L("\\F32-TST\\Temp9.txt"),EFileRead|EFileWrite);
|
sl@0
|
158 |
test_KErrNone(r);
|
sl@0
|
159 |
file.SetSize(256);
|
sl@0
|
160 |
file.Close();
|
sl@0
|
161 |
|
sl@0
|
162 |
r=file.Replace(TheFs,_L("\\F32-TST\\Temp10.txt"),EFileRead|EFileWrite);
|
sl@0
|
163 |
test_KErrNone(r);
|
sl@0
|
164 |
file.SetSize(256);
|
sl@0
|
165 |
file.Close();
|
sl@0
|
166 |
|
sl@0
|
167 |
TheFs.Delete(_L("\\F32-TST\\Temp2.txt"));
|
sl@0
|
168 |
TheFs.Delete(_L("\\F32-TST\\Temp4.txt"));
|
sl@0
|
169 |
TheFs.Delete(_L("\\F32-TST\\Temp6.txt"));
|
sl@0
|
170 |
TheFs.Delete(_L("\\F32-TST\\Temp8.txt"));
|
sl@0
|
171 |
TheFs.Delete(_L("\\F32-TST\\Temp10.txt"));
|
sl@0
|
172 |
|
sl@0
|
173 |
r=file.Replace(TheFs,_L("\\F32-TST\\ReadFileSection1.txt"),EFileRead|EFileWrite);
|
sl@0
|
174 |
test_KErrNone(r);
|
sl@0
|
175 |
|
sl@0
|
176 |
// Write 5000 bytes of nonsense
|
sl@0
|
177 |
|
sl@0
|
178 |
TInt i=0;
|
sl@0
|
179 |
for ( ; i<100; i++)
|
sl@0
|
180 |
{
|
sl@0
|
181 |
r=file.Write(alphaPtr);
|
sl@0
|
182 |
test_KErrNone(r);
|
sl@0
|
183 |
r=file.Write(numberPtr);
|
sl@0
|
184 |
test_KErrNone(r);
|
sl@0
|
185 |
r=file.Write(humptyPtr);
|
sl@0
|
186 |
test_KErrNone(r);
|
sl@0
|
187 |
}
|
sl@0
|
188 |
|
sl@0
|
189 |
file.Close();
|
sl@0
|
190 |
|
sl@0
|
191 |
TheFs.Delete(_L("\\F32-TST\\Temp1.txt"));
|
sl@0
|
192 |
TheFs.Delete(_L("\\F32-TST\\Temp3.txt"));
|
sl@0
|
193 |
TheFs.Delete(_L("\\F32-TST\\Temp5.txt"));
|
sl@0
|
194 |
TheFs.Delete(_L("\\F32-TST\\Temp7.txt"));
|
sl@0
|
195 |
TheFs.Delete(_L("\\F32-TST\\Temp9.txt"));
|
sl@0
|
196 |
}
|
sl@0
|
197 |
|
sl@0
|
198 |
#if !defined(_UNICODE)
|
sl@0
|
199 |
|
sl@0
|
200 |
LOCAL_C void Test1()
|
sl@0
|
201 |
//
|
sl@0
|
202 |
// Test RFs::ReadFileSection()
|
sl@0
|
203 |
//
|
sl@0
|
204 |
{
|
sl@0
|
205 |
|
sl@0
|
206 |
test.Next(_L("Use RFs::ReadFileSection() to read from a file"));
|
sl@0
|
207 |
|
sl@0
|
208 |
// First, test for non-existant file
|
sl@0
|
209 |
TBuf<256> testDes;
|
sl@0
|
210 |
TInt r=TheFs.ReadFileSection(_L("\\F32-tst\\NonExistantFile.txt"),0,testDes,52);
|
sl@0
|
211 |
test(r==KErrNotFound);
|
sl@0
|
212 |
test(testDes.Length()==0);
|
sl@0
|
213 |
|
sl@0
|
214 |
// Test with file closed
|
sl@0
|
215 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),0,testDes,26);
|
sl@0
|
216 |
test_KErrNone(r);
|
sl@0
|
217 |
test(testDes.Length()==26);
|
sl@0
|
218 |
test(testDes==_L("ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
|
sl@0
|
219 |
|
sl@0
|
220 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),26,testDes,10);
|
sl@0
|
221 |
test_KErrNone(r);
|
sl@0
|
222 |
test(testDes==_L("0123456789"));
|
sl@0
|
223 |
test(testDes.Length()==10);
|
sl@0
|
224 |
|
sl@0
|
225 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),36,testDes,14);
|
sl@0
|
226 |
test_KErrNone(r);
|
sl@0
|
227 |
test(testDes==_L("Humpty-Dumpty!"));
|
sl@0
|
228 |
test(testDes.Length()==14);
|
sl@0
|
229 |
|
sl@0
|
230 |
// Test with file open EFileShareAny|EFileRead
|
sl@0
|
231 |
RFile file;
|
sl@0
|
232 |
r=file.Open(TheFs,_L("\\F32-tst\\ReadFileSection1.txt"),EFileShareAny|EFileRead);
|
sl@0
|
233 |
test_KErrNone(r);
|
sl@0
|
234 |
|
sl@0
|
235 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),50,testDes,26);
|
sl@0
|
236 |
test_KErrNone(r);
|
sl@0
|
237 |
test(testDes==_L("ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
|
sl@0
|
238 |
test(testDes.Length()==26);
|
sl@0
|
239 |
|
sl@0
|
240 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),76,testDes,10);
|
sl@0
|
241 |
test_KErrNone(r);
|
sl@0
|
242 |
test(testDes==_L("0123456789"));
|
sl@0
|
243 |
test(testDes.Length()==10);
|
sl@0
|
244 |
|
sl@0
|
245 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),86,testDes,14);
|
sl@0
|
246 |
test_KErrNone(r);
|
sl@0
|
247 |
test(testDes==_L("Humpty-Dumpty!"));
|
sl@0
|
248 |
test(testDes.Length()==14);
|
sl@0
|
249 |
|
sl@0
|
250 |
file.Close();
|
sl@0
|
251 |
|
sl@0
|
252 |
// Test with file open EFileShareExclusive|EFileRead
|
sl@0
|
253 |
r=file.Open(TheFs,_L("\\F32-tst\\ReadFileSection1.txt"),EFileShareExclusive|EFileRead);
|
sl@0
|
254 |
test_KErrNone(r);
|
sl@0
|
255 |
|
sl@0
|
256 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),100,testDes,26);
|
sl@0
|
257 |
test_KErrNone(r);
|
sl@0
|
258 |
test(testDes==_L("ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
|
sl@0
|
259 |
test(testDes.Length()==26);
|
sl@0
|
260 |
|
sl@0
|
261 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),126,testDes,10);
|
sl@0
|
262 |
test_KErrNone(r);
|
sl@0
|
263 |
test(testDes==_L("0123456789"));
|
sl@0
|
264 |
test(testDes.Length()==10);
|
sl@0
|
265 |
|
sl@0
|
266 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),136,testDes,14);
|
sl@0
|
267 |
test_KErrNone(r);
|
sl@0
|
268 |
test(testDes==_L("Humpty-Dumpty!"));
|
sl@0
|
269 |
test(testDes.Length()==14);
|
sl@0
|
270 |
|
sl@0
|
271 |
file.Close();
|
sl@0
|
272 |
|
sl@0
|
273 |
// Test with file open EFileShareExclusive|EFileWrite
|
sl@0
|
274 |
r=file.Open(TheFs,_L("\\F32-tst\\ReadFileSection1.txt"),EFileShareExclusive|EFileWrite);
|
sl@0
|
275 |
test_KErrNone(r);
|
sl@0
|
276 |
|
sl@0
|
277 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),150,testDes,26);
|
sl@0
|
278 |
test_KErrNone(r);
|
sl@0
|
279 |
test(testDes==_L("ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
|
sl@0
|
280 |
test(testDes.Length()==26);
|
sl@0
|
281 |
|
sl@0
|
282 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),176,testDes,10);
|
sl@0
|
283 |
test_KErrNone(r);
|
sl@0
|
284 |
test(testDes==_L("0123456789"));
|
sl@0
|
285 |
test(testDes.Length()==10);
|
sl@0
|
286 |
|
sl@0
|
287 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),186,testDes,14);
|
sl@0
|
288 |
test_KErrNone(r);
|
sl@0
|
289 |
test(testDes==_L("Humpty-Dumpty!"));
|
sl@0
|
290 |
test(testDes.Length()==14);
|
sl@0
|
291 |
|
sl@0
|
292 |
file.Close();
|
sl@0
|
293 |
|
sl@0
|
294 |
|
sl@0
|
295 |
// Test with file open EFileShareReadersOnly|EFileRead
|
sl@0
|
296 |
r=file.Open(TheFs,_L("\\F32-tst\\ReadFileSection1.txt"),EFileShareReadersOnly|EFileRead);
|
sl@0
|
297 |
test_KErrNone(r);
|
sl@0
|
298 |
|
sl@0
|
299 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),200,testDes,26);
|
sl@0
|
300 |
test_KErrNone(r);
|
sl@0
|
301 |
test(testDes==_L("ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
|
sl@0
|
302 |
test(testDes.Length()==26);
|
sl@0
|
303 |
|
sl@0
|
304 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),226,testDes,10);
|
sl@0
|
305 |
test_KErrNone(r);
|
sl@0
|
306 |
test(testDes==_L("0123456789"));
|
sl@0
|
307 |
test(testDes.Length()==10);
|
sl@0
|
308 |
|
sl@0
|
309 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),236,testDes,14);
|
sl@0
|
310 |
test_KErrNone(r);
|
sl@0
|
311 |
test(testDes==_L("Humpty-Dumpty!"));
|
sl@0
|
312 |
test(testDes.Length()==14);
|
sl@0
|
313 |
|
sl@0
|
314 |
file.Close();
|
sl@0
|
315 |
|
sl@0
|
316 |
// Test with several accesses to a file EFileShareAny|EFileWrite
|
sl@0
|
317 |
r=file.Open(TheFs,_L("\\F32-tst\\ReadFileSection1.txt"),EFileShareAny|EFileWrite);
|
sl@0
|
318 |
test_KErrNone(r);
|
sl@0
|
319 |
|
sl@0
|
320 |
RFile secondFile;
|
sl@0
|
321 |
r=secondFile.Open(TheFs,_L("\\F32-tst\\ReadFileSection1.txt"),EFileShareAny|EFileWrite);
|
sl@0
|
322 |
test_KErrNone(r);
|
sl@0
|
323 |
|
sl@0
|
324 |
RFile thirdFile;
|
sl@0
|
325 |
r=thirdFile.Open(TheFs,_L("\\F32-tst\\ReadFileSection1.txt"),EFileShareAny|EFileWrite);
|
sl@0
|
326 |
test_KErrNone(r);
|
sl@0
|
327 |
|
sl@0
|
328 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),250,testDes,26);
|
sl@0
|
329 |
test_KErrNone(r);
|
sl@0
|
330 |
test(testDes==_L("ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
|
sl@0
|
331 |
test(testDes.Length()==26);
|
sl@0
|
332 |
|
sl@0
|
333 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),276,testDes,10);
|
sl@0
|
334 |
test_KErrNone(r);
|
sl@0
|
335 |
test(testDes==_L("0123456789"));
|
sl@0
|
336 |
test(testDes.Length()==10);
|
sl@0
|
337 |
|
sl@0
|
338 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),286,testDes,14);
|
sl@0
|
339 |
test_KErrNone(r);
|
sl@0
|
340 |
test(testDes==_L("Humpty-Dumpty!"));
|
sl@0
|
341 |
test(testDes.Length()==14);
|
sl@0
|
342 |
|
sl@0
|
343 |
// Test across potential cluster boundaries
|
sl@0
|
344 |
|
sl@0
|
345 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),500,testDes,100);
|
sl@0
|
346 |
test_KErrNone(r);
|
sl@0
|
347 |
test(testDes.Length()==100);
|
sl@0
|
348 |
test(testDes==_L("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789Humpty-Dumpty!ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789Humpty-Dumpty!"));
|
sl@0
|
349 |
|
sl@0
|
350 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),1000,testDes,100);
|
sl@0
|
351 |
test_KErrNone(r);
|
sl@0
|
352 |
test(testDes.Length()==100);
|
sl@0
|
353 |
test(testDes==_L("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789Humpty-Dumpty!ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789Humpty-Dumpty!"));
|
sl@0
|
354 |
|
sl@0
|
355 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),1500,testDes,100);
|
sl@0
|
356 |
test_KErrNone(r);
|
sl@0
|
357 |
test(testDes.Length()==100);
|
sl@0
|
358 |
test(testDes==_L("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789Humpty-Dumpty!ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789Humpty-Dumpty!"));
|
sl@0
|
359 |
|
sl@0
|
360 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),2000,testDes,100);
|
sl@0
|
361 |
test_KErrNone(r);
|
sl@0
|
362 |
test(testDes.Length()==100);
|
sl@0
|
363 |
test(testDes==_L("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789Humpty-Dumpty!ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789Humpty-Dumpty!"));
|
sl@0
|
364 |
|
sl@0
|
365 |
file.Close();
|
sl@0
|
366 |
secondFile.Close();
|
sl@0
|
367 |
thirdFile.Close();
|
sl@0
|
368 |
}
|
sl@0
|
369 |
|
sl@0
|
370 |
|
sl@0
|
371 |
LOCAL_C void Test2()
|
sl@0
|
372 |
//
|
sl@0
|
373 |
// Test RFs::ReadFileSection() on UID reads
|
sl@0
|
374 |
//
|
sl@0
|
375 |
{
|
sl@0
|
376 |
|
sl@0
|
377 |
|
sl@0
|
378 |
test.Next(_L("Use RFs::ReadFileSection() to read UIDs from files"));
|
sl@0
|
379 |
|
sl@0
|
380 |
TBuf8<sizeof(TCheckedUid)> uidBuf(sizeof(TCheckedUid));
|
sl@0
|
381 |
TPtr uidPtr((TText*)uidBuf.Ptr(),sizeof(TCheckedUid),sizeof(TCheckedUid));
|
sl@0
|
382 |
|
sl@0
|
383 |
TInt r=TheFs.ReadFileSection(_L("\\F32-TST\\UIDCHK.BLG"),0,uidPtr,sizeof(TCheckedUid));
|
sl@0
|
384 |
test_KErrNone(r);
|
sl@0
|
385 |
TCheckedUid uid(uidBuf);
|
sl@0
|
386 |
TUidType uidType=uid.UidType();
|
sl@0
|
387 |
test(uidType.IsValid());
|
sl@0
|
388 |
|
sl@0
|
389 |
test(uidType[0]==TUid::Uid('U') && uidType[1]==TUid::Uid('I') && uidType[2]==TUid::Uid('D'));
|
sl@0
|
390 |
|
sl@0
|
391 |
r=TheFs.ReadFileSection(_L("\\F32-TST\\UIDCHK.MSG"),0,uidBuf,sizeof(TCheckedUid));
|
sl@0
|
392 |
test_KErrNone(r);
|
sl@0
|
393 |
uid.Set(uidBuf);
|
sl@0
|
394 |
uidType=uid.UidType();
|
sl@0
|
395 |
test(uidType.IsValid());
|
sl@0
|
396 |
test(uidType[0]==TUid::Uid('X') && uidType[1]==TUid::Uid('Y') && uidType[2]==TUid::Uid('Z'));
|
sl@0
|
397 |
|
sl@0
|
398 |
|
sl@0
|
399 |
// Test for Null File length
|
sl@0
|
400 |
TBuf8<256> testDesN;
|
sl@0
|
401 |
test.Next(_L("Check for null file name"));
|
sl@0
|
402 |
r=TheFs.ReadFileSection(_L(""),0,testDesN,26);
|
sl@0
|
403 |
test(r==KErrBadName);
|
sl@0
|
404 |
|
sl@0
|
405 |
// Check the lentgh of descriptor.
|
sl@0
|
406 |
TInt x = testDesN.Length();
|
sl@0
|
407 |
test ( x == 0);
|
sl@0
|
408 |
|
sl@0
|
409 |
test.Next(_L("Check for non existing file"));
|
sl@0
|
410 |
r=TheFs.ReadFileSection(_L("sdfsd.dfg"),0,testDesN,26);
|
sl@0
|
411 |
test.Printf(_L("Return %d"),r);
|
sl@0
|
412 |
test((r==KErrNotFound) || (r == KErrPathNotFound));
|
sl@0
|
413 |
|
sl@0
|
414 |
// Check the lentgh of descriptor.
|
sl@0
|
415 |
x = testDesN.Length();
|
sl@0
|
416 |
test ( x == 0);
|
sl@0
|
417 |
|
sl@0
|
418 |
r=TheFs.ReadFileSection(_L("\\F32-TST\\UIDCHK.DAT"),0,uidBuf,sizeof(TCheckedUid));
|
sl@0
|
419 |
test_KErrNone(r);
|
sl@0
|
420 |
uid.Set(uidBuf);
|
sl@0
|
421 |
uidType=uid.UidType();
|
sl@0
|
422 |
test(uidType.IsValid());
|
sl@0
|
423 |
test(uidType[0]==TUid::Uid('D') && uidType[1]==TUid::Uid('A') && uidType[2]==TUid::Uid('T'));
|
sl@0
|
424 |
|
sl@0
|
425 |
|
sl@0
|
426 |
}
|
sl@0
|
427 |
|
sl@0
|
428 |
LOCAL_C void Test3()
|
sl@0
|
429 |
//
|
sl@0
|
430 |
// Test uid's can be read when the file is open
|
sl@0
|
431 |
//
|
sl@0
|
432 |
// EFileShareExclusive,EFileShareReadersOnly,EFileShareAny,
|
sl@0
|
433 |
// EFileStream=0,EFileStreamText=0x100,
|
sl@0
|
434 |
// EFileRead=0,EFileWrite=0x200
|
sl@0
|
435 |
//
|
sl@0
|
436 |
{
|
sl@0
|
437 |
|
sl@0
|
438 |
test.Next(_L("Test that UIDs can be read from open files"));
|
sl@0
|
439 |
RFile file;
|
sl@0
|
440 |
|
sl@0
|
441 |
// Test with file open EFileShareExclusive|EFileRead
|
sl@0
|
442 |
TInt r=file.Open(TheFs,_L("\\F32-TST\\UIDCHK.DAT"),EFileShareExclusive|EFileRead);
|
sl@0
|
443 |
test_KErrNone(r);
|
sl@0
|
444 |
|
sl@0
|
445 |
TBuf8<sizeof(TCheckedUid)> uidBuf;
|
sl@0
|
446 |
|
sl@0
|
447 |
r=TheFs.ReadFileSection(_L("\\F32-TST\\UIDCHK.DAT"),0,uidBuf,sizeof(TCheckedUid));
|
sl@0
|
448 |
test_KErrNone(r);
|
sl@0
|
449 |
|
sl@0
|
450 |
TCheckedUid uid(uidBuf);
|
sl@0
|
451 |
TUidType uidType=uid.UidType();
|
sl@0
|
452 |
test(uidType.IsValid());
|
sl@0
|
453 |
test(uidType[0]==TUid::Uid('D') && uidType[1]==TUid::Uid('A') && uidType[2]==TUid::Uid('T'));
|
sl@0
|
454 |
|
sl@0
|
455 |
file.Close();
|
sl@0
|
456 |
|
sl@0
|
457 |
// Test with file open EFileShareExclusive|EFileWrite
|
sl@0
|
458 |
r=file.Open(TheFs,_L("\\F32-TST\\UIDCHK.DAT"),EFileShareExclusive|EFileWrite);
|
sl@0
|
459 |
test_KErrNone(r);
|
sl@0
|
460 |
|
sl@0
|
461 |
r=TheFs.ReadFileSection(_L("\\F32-TST\\UIDCHK.DAT"),0,uidBuf,sizeof(TCheckedUid));
|
sl@0
|
462 |
test_KErrNone(r);
|
sl@0
|
463 |
uid.Set(uidBuf);
|
sl@0
|
464 |
uidType=uid.UidType();
|
sl@0
|
465 |
test(uidType.IsValid());
|
sl@0
|
466 |
test(uidType[0]==TUid::Uid('D') && uidType[1]==TUid::Uid('A') && uidType[2]==TUid::Uid('T'));
|
sl@0
|
467 |
|
sl@0
|
468 |
file.Close();
|
sl@0
|
469 |
|
sl@0
|
470 |
// Test with file open EFileShareReadersOnly|EFileRead
|
sl@0
|
471 |
r=file.Open(TheFs,_L("\\F32-TST\\UIDCHK.DAT"),EFileShareReadersOnly|EFileRead);
|
sl@0
|
472 |
test_KErrNone(r);
|
sl@0
|
473 |
|
sl@0
|
474 |
r=TheFs.ReadFileSection(_L("\\F32-TST\\UIDCHK.DAT"),0,uidBuf,sizeof(TCheckedUid));
|
sl@0
|
475 |
test_KErrNone(r);
|
sl@0
|
476 |
uid.Set(uidBuf);
|
sl@0
|
477 |
uidType=uid.UidType();
|
sl@0
|
478 |
test(uidType.IsValid());
|
sl@0
|
479 |
test(uidType[0]==TUid::Uid('D') && uidType[1]==TUid::Uid('A') && uidType[2]==TUid::Uid('T'));
|
sl@0
|
480 |
|
sl@0
|
481 |
file.Close();
|
sl@0
|
482 |
|
sl@0
|
483 |
|
sl@0
|
484 |
// Test with file open EFileShareAny|EFileRead
|
sl@0
|
485 |
r=file.Open(TheFs,_L("\\F32-TST\\UIDCHK.DAT"),EFileShareAny|EFileRead);
|
sl@0
|
486 |
test_KErrNone(r);
|
sl@0
|
487 |
|
sl@0
|
488 |
r=TheFs.ReadFileSection(_L("\\F32-TST\\UIDCHK.DAT"),0,uidBuf,sizeof(TCheckedUid));
|
sl@0
|
489 |
test_KErrNone(r);
|
sl@0
|
490 |
uid.Set(uidBuf);
|
sl@0
|
491 |
uidType=uid.UidType();
|
sl@0
|
492 |
test(uidType.IsValid());
|
sl@0
|
493 |
test(uidType[0]==TUid::Uid('D') && uidType[1]==TUid::Uid('A') && uidType[2]==TUid::Uid('T'));
|
sl@0
|
494 |
|
sl@0
|
495 |
file.Close();
|
sl@0
|
496 |
|
sl@0
|
497 |
// Test with several accesses to file open EFileShareAny|EFileWrite
|
sl@0
|
498 |
r=file.Open(TheFs,_L("\\F32-TST\\UIDCHK.DAT"),EFileShareAny|EFileWrite);
|
sl@0
|
499 |
test_KErrNone(r);
|
sl@0
|
500 |
|
sl@0
|
501 |
RFile secondFile;
|
sl@0
|
502 |
r=secondFile.Open(TheFs,_L("\\F32-TST\\UIDCHK.DAT"),EFileShareAny|EFileWrite);
|
sl@0
|
503 |
test_KErrNone(r);
|
sl@0
|
504 |
|
sl@0
|
505 |
RFile thirdFile;
|
sl@0
|
506 |
r=thirdFile.Open(TheFs,_L("\\F32-TST\\UIDCHK.DAT"),EFileShareAny|EFileRead);
|
sl@0
|
507 |
test_KErrNone(r);
|
sl@0
|
508 |
|
sl@0
|
509 |
r=TheFs.ReadFileSection(_L("\\F32-TST\\UIDCHK.DAT"),0,uidBuf,sizeof(TCheckedUid));
|
sl@0
|
510 |
test_KErrNone(r);
|
sl@0
|
511 |
uid.Set(uidBuf);
|
sl@0
|
512 |
uidType=uid.UidType();
|
sl@0
|
513 |
test(uidType.IsValid());
|
sl@0
|
514 |
test(uidType[0]==TUid::Uid('D') && uidType[1]==TUid::Uid('A') && uidType[2]==TUid::Uid('T'));
|
sl@0
|
515 |
|
sl@0
|
516 |
file.Close();
|
sl@0
|
517 |
secondFile.Close();
|
sl@0
|
518 |
thirdFile.Close();
|
sl@0
|
519 |
|
sl@0
|
520 |
}
|
sl@0
|
521 |
|
sl@0
|
522 |
|
sl@0
|
523 |
LOCAL_C void TestErrors()
|
sl@0
|
524 |
//
|
sl@0
|
525 |
// Test errors and boundary conditions
|
sl@0
|
526 |
//
|
sl@0
|
527 |
{
|
sl@0
|
528 |
|
sl@0
|
529 |
test.Next(_L("Test Error handling"));
|
sl@0
|
530 |
|
sl@0
|
531 |
// Test that specifying a zero length section returns a zero length descriptor
|
sl@0
|
532 |
TBuf<30> testDes;
|
sl@0
|
533 |
TInt r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),25,testDes,0);
|
sl@0
|
534 |
test_KErrNone(r);
|
sl@0
|
535 |
test(testDes.Length()==0);
|
sl@0
|
536 |
|
sl@0
|
537 |
// Test that specifying a negative starting position causes a panic
|
sl@0
|
538 |
// r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),-1,testDes,10);
|
sl@0
|
539 |
// This will panic: See RFs::ReadFileSection() code - relevant lines are
|
sl@0
|
540 |
// __ASSERT_ALWAYS(aPos>=0,Panic(EPosNegative));
|
sl@0
|
541 |
|
sl@0
|
542 |
// Test that specifying a section of greater length than the descriptor to
|
sl@0
|
543 |
// hold the data will cause a panic
|
sl@0
|
544 |
// r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),0,testDes,45);
|
sl@0
|
545 |
// This will panic: See RFs::ReadFileSection() code - relevant lines are
|
sl@0
|
546 |
// __ASSERT_ALWAYS(aDes.MaxLength()>=aLength,Panic(EBadLength));
|
sl@0
|
547 |
|
sl@0
|
548 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),2000,testDes,-20);
|
sl@0
|
549 |
test(r==KErrArgument);
|
sl@0
|
550 |
|
sl@0
|
551 |
// Test that specifying a position and length which extends beyond the end of
|
sl@0
|
552 |
// the file returns a zero length descriptor and KErrNone
|
sl@0
|
553 |
|
sl@0
|
554 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),4993,testDes,20);
|
sl@0
|
555 |
test_KErrNone(r);
|
sl@0
|
556 |
test(testDes.Length()==7);
|
sl@0
|
557 |
test(testDes==_L("Dumpty!"));
|
sl@0
|
558 |
|
sl@0
|
559 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),4999,testDes,1);
|
sl@0
|
560 |
test_KErrNone(r);
|
sl@0
|
561 |
test(testDes.Length()==1);
|
sl@0
|
562 |
test(testDes==_L("!"));
|
sl@0
|
563 |
|
sl@0
|
564 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),5000,testDes,1);
|
sl@0
|
565 |
test_KErrNone(r);
|
sl@0
|
566 |
test(testDes.Length()==0);
|
sl@0
|
567 |
|
sl@0
|
568 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),5550,testDes,20);
|
sl@0
|
569 |
test_KErrNone(r);
|
sl@0
|
570 |
test(testDes.Length()==0);
|
sl@0
|
571 |
|
sl@0
|
572 |
// Test reading the whole file
|
sl@0
|
573 |
HBufC* hDes=HBufC::New(5002);
|
sl@0
|
574 |
if (!hDes)
|
sl@0
|
575 |
User::Leave(KErrNoMemory);
|
sl@0
|
576 |
TPtr pDes=hDes->Des();
|
sl@0
|
577 |
|
sl@0
|
578 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),0,pDes,5000);
|
sl@0
|
579 |
test_KErrNone(r);
|
sl@0
|
580 |
test(pDes.Length()==5000);
|
sl@0
|
581 |
|
sl@0
|
582 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),0,pDes,5000);
|
sl@0
|
583 |
test_KErrNone(r);
|
sl@0
|
584 |
test(pDes.Length()==5000);
|
sl@0
|
585 |
|
sl@0
|
586 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),0,pDes,5002);
|
sl@0
|
587 |
test_KErrNone(r);
|
sl@0
|
588 |
test(pDes.Length()==5000);
|
sl@0
|
589 |
|
sl@0
|
590 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),2000,pDes,3000);
|
sl@0
|
591 |
test_KErrNone(r);
|
sl@0
|
592 |
test(pDes.Length()==3000);
|
sl@0
|
593 |
|
sl@0
|
594 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),2000,pDes,4002);
|
sl@0
|
595 |
test_KErrNone(r);
|
sl@0
|
596 |
test(pDes.Length()==3000);
|
sl@0
|
597 |
|
sl@0
|
598 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),5000,pDes,5002);
|
sl@0
|
599 |
test_KErrNone(r);
|
sl@0
|
600 |
test(pDes.Length()==0);
|
sl@0
|
601 |
|
sl@0
|
602 |
delete hDes;
|
sl@0
|
603 |
}
|
sl@0
|
604 |
|
sl@0
|
605 |
#else
|
sl@0
|
606 |
|
sl@0
|
607 |
|
sl@0
|
608 |
// BEGINNING OF UNICODE TESTS
|
sl@0
|
609 |
|
sl@0
|
610 |
LOCAL_C void TestUnicode()
|
sl@0
|
611 |
//
|
sl@0
|
612 |
// Test RFs::ReadFileSection()
|
sl@0
|
613 |
//
|
sl@0
|
614 |
{
|
sl@0
|
615 |
test.Next(_L("Use RFs::ReadFileSection() to read from a file"));
|
sl@0
|
616 |
|
sl@0
|
617 |
// First, test for non-existant file
|
sl@0
|
618 |
TBuf8<256> testDes;
|
sl@0
|
619 |
TInt r=TheFs.ReadFileSection(_L("\\F32-tst\\NonExistantFile.txt"),0,testDes,52);
|
sl@0
|
620 |
test(r==KErrNotFound);
|
sl@0
|
621 |
test(testDes.Length()==0);
|
sl@0
|
622 |
|
sl@0
|
623 |
// Test with file closed
|
sl@0
|
624 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),0,testDes,52);
|
sl@0
|
625 |
test_KErrNone(r);
|
sl@0
|
626 |
test(testDes.Length()==52);
|
sl@0
|
627 |
test(testDes==alphaPtr);
|
sl@0
|
628 |
|
sl@0
|
629 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),52,testDes,20);
|
sl@0
|
630 |
test_KErrNone(r);
|
sl@0
|
631 |
test(testDes==numberPtr);
|
sl@0
|
632 |
test(testDes.Length()==20);
|
sl@0
|
633 |
|
sl@0
|
634 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),72,testDes,28);
|
sl@0
|
635 |
test_KErrNone(r);
|
sl@0
|
636 |
test(testDes==humptyPtr);
|
sl@0
|
637 |
test(testDes.Length()==28);
|
sl@0
|
638 |
|
sl@0
|
639 |
// Test for Null File length
|
sl@0
|
640 |
TBuf8<256> testDesN;
|
sl@0
|
641 |
test.Next(_L("Check for null file name"));
|
sl@0
|
642 |
r=TheFs.ReadFileSection(_L(""),0,testDesN,26);
|
sl@0
|
643 |
test(r==KErrBadName);
|
sl@0
|
644 |
|
sl@0
|
645 |
// Check the lentgh of descriptor.
|
sl@0
|
646 |
TInt x = testDesN.Length();
|
sl@0
|
647 |
test ( x == 0);
|
sl@0
|
648 |
|
sl@0
|
649 |
test.Next(_L("Check for non existing file"));
|
sl@0
|
650 |
r=TheFs.ReadFileSection(_L("sdfsd.dfg"),0,testDesN,26);
|
sl@0
|
651 |
test.Printf(_L("Return %d"),r);
|
sl@0
|
652 |
test((r==KErrNotFound) || (r == KErrPathNotFound));
|
sl@0
|
653 |
|
sl@0
|
654 |
// Check the lentgh of descriptor.
|
sl@0
|
655 |
x = testDesN.Length();
|
sl@0
|
656 |
test ( x == 0);
|
sl@0
|
657 |
|
sl@0
|
658 |
// Test for Empty directory
|
sl@0
|
659 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\"),0,testDesN,52);
|
sl@0
|
660 |
test(r==KErrBadName);
|
sl@0
|
661 |
test(testDesN.Length()==0);
|
sl@0
|
662 |
|
sl@0
|
663 |
// Test for File with wildcard name
|
sl@0
|
664 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\*.txt"),0,testDesN,52);
|
sl@0
|
665 |
test(r==KErrBadName);
|
sl@0
|
666 |
test(testDesN.Length()==0);
|
sl@0
|
667 |
|
sl@0
|
668 |
// Test for Folder with wildcard name
|
sl@0
|
669 |
r=TheFs.ReadFileSection(_L("\\F32-tst*\\ReadFileSection1.txt"),0,testDesN,52);
|
sl@0
|
670 |
test(r==KErrBadName);
|
sl@0
|
671 |
test(testDesN.Length()==0);
|
sl@0
|
672 |
|
sl@0
|
673 |
// Test for Root directory
|
sl@0
|
674 |
r=TheFs.ReadFileSection(_L("\\"),0,testDesN,52);
|
sl@0
|
675 |
test(r==KErrBadName);
|
sl@0
|
676 |
test(testDesN.Length()==0);
|
sl@0
|
677 |
|
sl@0
|
678 |
// Test for no file being specified.
|
sl@0
|
679 |
r=TheFs.ReadFileSection(_L(""),0,testDesN,26);
|
sl@0
|
680 |
test(r==KErrBadName);
|
sl@0
|
681 |
test(testDesN.Length()==0);
|
sl@0
|
682 |
|
sl@0
|
683 |
|
sl@0
|
684 |
// Test with file open EFileShareAny|EFileRead
|
sl@0
|
685 |
RFile file;
|
sl@0
|
686 |
r=file.Open(TheFs,_L("\\F32-tst\\ReadFileSection1.txt"),EFileShareAny|EFileRead);
|
sl@0
|
687 |
test_KErrNone(r);
|
sl@0
|
688 |
|
sl@0
|
689 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),100,testDes,52);
|
sl@0
|
690 |
test_KErrNone(r);
|
sl@0
|
691 |
test(testDes==alphaPtr);
|
sl@0
|
692 |
test(testDes.Length()==52);
|
sl@0
|
693 |
|
sl@0
|
694 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),152,testDes,20);
|
sl@0
|
695 |
test_KErrNone(r);
|
sl@0
|
696 |
test(testDes==numberPtr);
|
sl@0
|
697 |
test(testDes.Length()==20);
|
sl@0
|
698 |
|
sl@0
|
699 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),172,testDes,28);
|
sl@0
|
700 |
test_KErrNone(r);
|
sl@0
|
701 |
test(testDes==humptyPtr);
|
sl@0
|
702 |
test(testDes.Length()==28);
|
sl@0
|
703 |
|
sl@0
|
704 |
file.Close();
|
sl@0
|
705 |
|
sl@0
|
706 |
// Test with file open EFileShareExclusive|EFileRead
|
sl@0
|
707 |
r=file.Open(TheFs,_L("\\F32-tst\\ReadFileSection1.txt"),EFileShareExclusive|EFileRead);
|
sl@0
|
708 |
test_KErrNone(r);
|
sl@0
|
709 |
|
sl@0
|
710 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),200,testDes,52);
|
sl@0
|
711 |
test_KErrNone(r);
|
sl@0
|
712 |
test(testDes==alphaPtr);
|
sl@0
|
713 |
test(testDes.Length()==52);
|
sl@0
|
714 |
|
sl@0
|
715 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),252,testDes,20);
|
sl@0
|
716 |
test_KErrNone(r);
|
sl@0
|
717 |
test(testDes==numberPtr);
|
sl@0
|
718 |
test(testDes.Length()==20);
|
sl@0
|
719 |
|
sl@0
|
720 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),272,testDes,28);
|
sl@0
|
721 |
test_KErrNone(r);
|
sl@0
|
722 |
test(testDes==humptyPtr);
|
sl@0
|
723 |
test(testDes.Length()==28);
|
sl@0
|
724 |
|
sl@0
|
725 |
file.Close();
|
sl@0
|
726 |
|
sl@0
|
727 |
// Test with file open EFileShareExclusive|EFileWrite
|
sl@0
|
728 |
r=file.Open(TheFs,_L("\\F32-tst\\ReadFileSection1.txt"),EFileShareExclusive|EFileWrite);
|
sl@0
|
729 |
test_KErrNone(r);
|
sl@0
|
730 |
|
sl@0
|
731 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),300,testDes,52);
|
sl@0
|
732 |
test_KErrNone(r);
|
sl@0
|
733 |
test(testDes==alphaPtr);
|
sl@0
|
734 |
test(testDes.Length()==52);
|
sl@0
|
735 |
|
sl@0
|
736 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),352,testDes,20);
|
sl@0
|
737 |
test_KErrNone(r);
|
sl@0
|
738 |
test(testDes==numberPtr);
|
sl@0
|
739 |
test(testDes.Length()==20);
|
sl@0
|
740 |
|
sl@0
|
741 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),372,testDes,28);
|
sl@0
|
742 |
test_KErrNone(r);
|
sl@0
|
743 |
test(testDes==humptyPtr);
|
sl@0
|
744 |
test(testDes.Length()==28);
|
sl@0
|
745 |
|
sl@0
|
746 |
file.Close();
|
sl@0
|
747 |
|
sl@0
|
748 |
|
sl@0
|
749 |
// Test with file open EFileShareReadersOnly|EFileRead
|
sl@0
|
750 |
r=file.Open(TheFs,_L("\\F32-tst\\ReadFileSection1.txt"),EFileShareReadersOnly|EFileRead);
|
sl@0
|
751 |
test_KErrNone(r);
|
sl@0
|
752 |
|
sl@0
|
753 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),400,testDes,52);
|
sl@0
|
754 |
test_KErrNone(r);
|
sl@0
|
755 |
test(testDes==alphaPtr);
|
sl@0
|
756 |
test(testDes.Length()==52);
|
sl@0
|
757 |
|
sl@0
|
758 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),452,testDes,20);
|
sl@0
|
759 |
test_KErrNone(r);
|
sl@0
|
760 |
test(testDes==numberPtr);
|
sl@0
|
761 |
test(testDes.Length()==20);
|
sl@0
|
762 |
|
sl@0
|
763 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),472,testDes,28);
|
sl@0
|
764 |
test_KErrNone(r);
|
sl@0
|
765 |
test(testDes==humptyPtr);
|
sl@0
|
766 |
test(testDes.Length()==28);
|
sl@0
|
767 |
|
sl@0
|
768 |
file.Close();
|
sl@0
|
769 |
|
sl@0
|
770 |
// Test with several accesses to a file EFileShareAny|EFileWrite
|
sl@0
|
771 |
r=file.Open(TheFs,_L("\\F32-tst\\ReadFileSection1.txt"),EFileShareAny|EFileWrite);
|
sl@0
|
772 |
test_KErrNone(r);
|
sl@0
|
773 |
|
sl@0
|
774 |
RFile secondFile;
|
sl@0
|
775 |
r=secondFile.Open(TheFs,_L("\\F32-tst\\ReadFileSection1.txt"),EFileShareAny|EFileWrite);
|
sl@0
|
776 |
test_KErrNone(r);
|
sl@0
|
777 |
|
sl@0
|
778 |
RFile thirdFile;
|
sl@0
|
779 |
r=thirdFile.Open(TheFs,_L("\\F32-tst\\ReadFileSection1.txt"),EFileShareAny|EFileWrite);
|
sl@0
|
780 |
test_KErrNone(r);
|
sl@0
|
781 |
|
sl@0
|
782 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),500,testDes,52);
|
sl@0
|
783 |
test_KErrNone(r);
|
sl@0
|
784 |
|
sl@0
|
785 |
#if defined(__WINS__)
|
sl@0
|
786 |
#if defined(_DEBUG)
|
sl@0
|
787 |
test(testDes==alphaPtr);
|
sl@0
|
788 |
test(testDes.Length()==52);
|
sl@0
|
789 |
#endif
|
sl@0
|
790 |
#else
|
sl@0
|
791 |
test(testDes==alphaPtr);
|
sl@0
|
792 |
test(testDes.Length()==52);
|
sl@0
|
793 |
#endif
|
sl@0
|
794 |
|
sl@0
|
795 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),552,testDes,20);
|
sl@0
|
796 |
test_KErrNone(r);
|
sl@0
|
797 |
test(testDes==numberPtr);
|
sl@0
|
798 |
test(testDes.Length()==20);
|
sl@0
|
799 |
|
sl@0
|
800 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),572,testDes,28);
|
sl@0
|
801 |
test_KErrNone(r);
|
sl@0
|
802 |
test(testDes==humptyPtr);
|
sl@0
|
803 |
test(testDes.Length()==28);
|
sl@0
|
804 |
|
sl@0
|
805 |
// Test across potential cluster boundaries
|
sl@0
|
806 |
|
sl@0
|
807 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),1000,testDes,200);
|
sl@0
|
808 |
test_KErrNone(r);
|
sl@0
|
809 |
test(testDes.Length()==200);
|
sl@0
|
810 |
TBuf8<200> amalgam;
|
sl@0
|
811 |
TInt i=0;
|
sl@0
|
812 |
for (; i<2; i++)
|
sl@0
|
813 |
{
|
sl@0
|
814 |
amalgam.Append(alphaPtr);
|
sl@0
|
815 |
amalgam.Append(numberPtr);
|
sl@0
|
816 |
amalgam.Append(humptyPtr);
|
sl@0
|
817 |
}
|
sl@0
|
818 |
|
sl@0
|
819 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),1000,testDes,200);
|
sl@0
|
820 |
test_KErrNone(r);
|
sl@0
|
821 |
test(testDes.Length()==200);
|
sl@0
|
822 |
test(testDes==amalgam);
|
sl@0
|
823 |
|
sl@0
|
824 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),3000,testDes,200);
|
sl@0
|
825 |
test_KErrNone(r);
|
sl@0
|
826 |
test(testDes.Length()==200);
|
sl@0
|
827 |
test(testDes==amalgam);
|
sl@0
|
828 |
|
sl@0
|
829 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),4000,testDes,200);
|
sl@0
|
830 |
test_KErrNone(r);
|
sl@0
|
831 |
test(testDes.Length()==200);
|
sl@0
|
832 |
test(testDes==amalgam);
|
sl@0
|
833 |
|
sl@0
|
834 |
file.Close();
|
sl@0
|
835 |
secondFile.Close();
|
sl@0
|
836 |
thirdFile.Close();
|
sl@0
|
837 |
|
sl@0
|
838 |
// Test errors and boundary conditions
|
sl@0
|
839 |
test.Next(_L("Test Error handling"));
|
sl@0
|
840 |
|
sl@0
|
841 |
// Test that specifying a zero length section returns a zero length descriptor
|
sl@0
|
842 |
TBuf8<30> testDes2;
|
sl@0
|
843 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),50,testDes2,0);
|
sl@0
|
844 |
test_KErrNone(r);
|
sl@0
|
845 |
test(testDes2.Length()==0);
|
sl@0
|
846 |
|
sl@0
|
847 |
// Test that specifying a negative starting position causes a panic
|
sl@0
|
848 |
// r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),-1,testDes2,10);
|
sl@0
|
849 |
// This will panic: See RFs::ReadFileSection() code - relevant lines are
|
sl@0
|
850 |
// __ASSERT_ALWAYS(aPos>=0,Panic(EPosNegative));
|
sl@0
|
851 |
|
sl@0
|
852 |
// Test that specifying a section of greater length than the descriptor to
|
sl@0
|
853 |
// hold the data will cause a panic
|
sl@0
|
854 |
// r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),0,testDes2,45);
|
sl@0
|
855 |
// This will panic: See RFs::ReadFileSection() code - relevant lines are
|
sl@0
|
856 |
// __ASSERT_ALWAYS(aDes.MaxLength()>=aLength,Panic(EBadLength));
|
sl@0
|
857 |
|
sl@0
|
858 |
|
sl@0
|
859 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),2000,testDes2,-20);
|
sl@0
|
860 |
test(r==KErrArgument);
|
sl@0
|
861 |
|
sl@0
|
862 |
// Test that specifying a position and length which extends beyond the end of
|
sl@0
|
863 |
// the file returns a zero length descriptor and KErrNone
|
sl@0
|
864 |
|
sl@0
|
865 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),9993,testDes2,30);
|
sl@0
|
866 |
test_KErrNone(r);
|
sl@0
|
867 |
test(testDes2.Length()==7);
|
sl@0
|
868 |
test(testDes2==humptyPtr.Right(7));
|
sl@0
|
869 |
|
sl@0
|
870 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),9999,testDes2,1);
|
sl@0
|
871 |
test_KErrNone(r);
|
sl@0
|
872 |
test(testDes2.Length()==1);
|
sl@0
|
873 |
test(testDes2==humptyPtr.Right(1));
|
sl@0
|
874 |
|
sl@0
|
875 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),10000,testDes2,1);
|
sl@0
|
876 |
test_KErrNone(r);
|
sl@0
|
877 |
test(testDes2.Length()==0);
|
sl@0
|
878 |
|
sl@0
|
879 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),10550,testDes2,20);
|
sl@0
|
880 |
test_KErrNone(r);
|
sl@0
|
881 |
test(testDes2.Length()==0);
|
sl@0
|
882 |
|
sl@0
|
883 |
// Test reading the whole file
|
sl@0
|
884 |
HBufC8* hDes=HBufC8::New(10002);
|
sl@0
|
885 |
if (!hDes)
|
sl@0
|
886 |
User::Leave(KErrNoMemory);
|
sl@0
|
887 |
TPtr8 pDes=hDes->Des();
|
sl@0
|
888 |
|
sl@0
|
889 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),0,pDes,10000);
|
sl@0
|
890 |
test_KErrNone(r);
|
sl@0
|
891 |
test(pDes.Length()==10000);
|
sl@0
|
892 |
|
sl@0
|
893 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),0,pDes,10000);
|
sl@0
|
894 |
test_KErrNone(r);
|
sl@0
|
895 |
test(pDes.Length()==10000);
|
sl@0
|
896 |
|
sl@0
|
897 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),0,pDes,10002);
|
sl@0
|
898 |
test_KErrNone(r);
|
sl@0
|
899 |
test(pDes.Length()==10000);
|
sl@0
|
900 |
|
sl@0
|
901 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),4000,pDes,6000);
|
sl@0
|
902 |
test_KErrNone(r);
|
sl@0
|
903 |
test(pDes.Length()==6000);
|
sl@0
|
904 |
|
sl@0
|
905 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),4000,pDes,8002);
|
sl@0
|
906 |
test_KErrNone(r);
|
sl@0
|
907 |
test(pDes.Length()==6000);
|
sl@0
|
908 |
|
sl@0
|
909 |
r=TheFs.ReadFileSection(_L("\\F32-tst\\ReadFileSection1.txt"),10000,pDes,10002);
|
sl@0
|
910 |
test_KErrNone(r);
|
sl@0
|
911 |
test(pDes.Length()==0);
|
sl@0
|
912 |
|
sl@0
|
913 |
delete hDes;
|
sl@0
|
914 |
}
|
sl@0
|
915 |
|
sl@0
|
916 |
#endif
|
sl@0
|
917 |
|
sl@0
|
918 |
|
sl@0
|
919 |
LOCAL_C void TestZ()
|
sl@0
|
920 |
//
|
sl@0
|
921 |
// Test Rom filesystem
|
sl@0
|
922 |
//
|
sl@0
|
923 |
{
|
sl@0
|
924 |
test.Next(_L("Use RFs::ReadFileSection() to read from a file on the ROM"));
|
sl@0
|
925 |
#if defined (__WINS__)
|
sl@0
|
926 |
// Requires a copy of t_rdsect.txt in z directory (\EPOC32\RELEASE\WINS\BUILD\Z\TEST)
|
sl@0
|
927 |
// Initially, test with file closed
|
sl@0
|
928 |
TBuf8<256> testDes;
|
sl@0
|
929 |
TBuf8<27> temp1;
|
sl@0
|
930 |
TInt r=TheFs.ReadFileSection(_L("Z:\\test\\t_rdsect.txt"),0,temp1,26);
|
sl@0
|
931 |
test_KErrNone(r);
|
sl@0
|
932 |
test(temp1.Length()==26);
|
sl@0
|
933 |
test(temp1==_L8("ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
|
sl@0
|
934 |
|
sl@0
|
935 |
TBuf8<11> temp2;
|
sl@0
|
936 |
r=TheFs.ReadFileSection(_L("Z:\\test\\t_rdsect.txt"),26,temp2,10);
|
sl@0
|
937 |
test_KErrNone(r);
|
sl@0
|
938 |
test(temp2==_L8("0123456789"));
|
sl@0
|
939 |
test(temp2.Length()==10);
|
sl@0
|
940 |
|
sl@0
|
941 |
r=TheFs.ReadFileSection(_L("Z:\\test\\t_rdsect.txt"),36,testDes,14);
|
sl@0
|
942 |
test_KErrNone(r);
|
sl@0
|
943 |
test(testDes==_L8("Humpty-Dumpty!"));
|
sl@0
|
944 |
test(testDes.Length()==14);
|
sl@0
|
945 |
|
sl@0
|
946 |
// Test with file open EFileShareAny|EFileRead
|
sl@0
|
947 |
RFile file;
|
sl@0
|
948 |
r=file.Open(TheFs,_L("Z:\\test\\t_rdsect.txt"),EFileShareAny|EFileRead);
|
sl@0
|
949 |
test_KErrNone(r);
|
sl@0
|
950 |
|
sl@0
|
951 |
r=TheFs.ReadFileSection(_L("Z:\\test\\t_rdsect.txt"),50,testDes,26);
|
sl@0
|
952 |
test_KErrNone(r);
|
sl@0
|
953 |
test(testDes==_L8("ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
|
sl@0
|
954 |
test(testDes.Length()==26);
|
sl@0
|
955 |
|
sl@0
|
956 |
r=TheFs.ReadFileSection(_L("Z:\\test\\t_rdsect.txt"),76,testDes,10);
|
sl@0
|
957 |
test_KErrNone(r);
|
sl@0
|
958 |
test(testDes==_L8("0123456789"));
|
sl@0
|
959 |
test(testDes.Length()==10);
|
sl@0
|
960 |
|
sl@0
|
961 |
r=TheFs.ReadFileSection(_L("Z:\\test\\t_rdsect.txt"),86,testDes,14);
|
sl@0
|
962 |
test_KErrNone(r);
|
sl@0
|
963 |
test(testDes==_L8("Humpty-Dumpty!"));
|
sl@0
|
964 |
test(testDes.Length()==14);
|
sl@0
|
965 |
|
sl@0
|
966 |
file.Close();
|
sl@0
|
967 |
#else
|
sl@0
|
968 |
// Test for MARM builds - oby file puts file in ROM (z:\test\)
|
sl@0
|
969 |
// The file is the ASCII version
|
sl@0
|
970 |
|
sl@0
|
971 |
test.Next(_L("read small descriptor\n"));
|
sl@0
|
972 |
TBuf8<256> testDes;
|
sl@0
|
973 |
TBuf8<27> temp1;
|
sl@0
|
974 |
TInt r=TheFs.ReadFileSection(_L("Z:\\test\\T_RDSECT.txt"),0,temp1,26);
|
sl@0
|
975 |
test_KErrNone(r);
|
sl@0
|
976 |
test(temp1.Length()==26);
|
sl@0
|
977 |
test(temp1==_L8("ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
|
sl@0
|
978 |
|
sl@0
|
979 |
TBuf8<11> temp2;
|
sl@0
|
980 |
r=TheFs.ReadFileSection(_L("Z:\\test\\T_RDSECT.txt"),26,temp2,10);
|
sl@0
|
981 |
test_KErrNone(r);
|
sl@0
|
982 |
test(temp2.Length()==10);
|
sl@0
|
983 |
#if !defined (UNICODE)
|
sl@0
|
984 |
test(testDes==_L8("0123456789"));
|
sl@0
|
985 |
#endif
|
sl@0
|
986 |
r=TheFs.ReadFileSection(_L("Z:\\test\\T_RDSECT.txt"),36,testDes,14);
|
sl@0
|
987 |
test_KErrNone(r);
|
sl@0
|
988 |
test(testDes.Length()==14);
|
sl@0
|
989 |
#if !defined (UNICODE)
|
sl@0
|
990 |
test(testDes==_L8("Humpty-Dumpty!"));
|
sl@0
|
991 |
#endif
|
sl@0
|
992 |
r=TheFs.ReadFileSection(_L("Z:\\test\\T_RDSECT.txt"),50,testDes,26);
|
sl@0
|
993 |
test_KErrNone(r);
|
sl@0
|
994 |
test(testDes.Length()==26);
|
sl@0
|
995 |
#if !defined (UNICODE)
|
sl@0
|
996 |
test(testDes==_L8("ABCDEFGHIJKLMNOPQRSTUVWXYZ"));
|
sl@0
|
997 |
#endif
|
sl@0
|
998 |
r=TheFs.ReadFileSection(_L("Z:\\test\\T_RDSECT.txt"),76,testDes,10);
|
sl@0
|
999 |
test_KErrNone(r);
|
sl@0
|
1000 |
test(testDes.Length()==10);
|
sl@0
|
1001 |
#if !defined (UNICODE)
|
sl@0
|
1002 |
test(testDes==_L8("0123456789"));
|
sl@0
|
1003 |
#endif
|
sl@0
|
1004 |
r=TheFs.ReadFileSection(_L("Z:\\test\\T_RDSECT.txt"),86,testDes,14);
|
sl@0
|
1005 |
test_KErrNone(r);
|
sl@0
|
1006 |
test(testDes.Length()==14);
|
sl@0
|
1007 |
#if !defined (UNICODE)
|
sl@0
|
1008 |
test(testDes==_L8("Humpty-Dumpty!"));
|
sl@0
|
1009 |
#endif
|
sl@0
|
1010 |
#endif
|
sl@0
|
1011 |
}
|
sl@0
|
1012 |
|
sl@0
|
1013 |
LOCAL_C void DoTestsL()
|
sl@0
|
1014 |
//
|
sl@0
|
1015 |
// Do all tests
|
sl@0
|
1016 |
//
|
sl@0
|
1017 |
{
|
sl@0
|
1018 |
CreateTestFiles();
|
sl@0
|
1019 |
#if !defined (_UNICODE)
|
sl@0
|
1020 |
Test1();
|
sl@0
|
1021 |
Test2();
|
sl@0
|
1022 |
Test3();
|
sl@0
|
1023 |
TestErrors();
|
sl@0
|
1024 |
#else
|
sl@0
|
1025 |
TestUnicode();
|
sl@0
|
1026 |
#endif
|
sl@0
|
1027 |
TestZ();
|
sl@0
|
1028 |
}
|
sl@0
|
1029 |
|
sl@0
|
1030 |
GLDEF_C void CallTestsL(void)
|
sl@0
|
1031 |
//
|
sl@0
|
1032 |
// Test formatting
|
sl@0
|
1033 |
//
|
sl@0
|
1034 |
{
|
sl@0
|
1035 |
|
sl@0
|
1036 |
test.Title();
|
sl@0
|
1037 |
test.Start(_L("Testing filesystem on default drive"));
|
sl@0
|
1038 |
|
sl@0
|
1039 |
TChar driveLetter;
|
sl@0
|
1040 |
if (IsSessionDriveLFFS(TheFs,driveLetter))
|
sl@0
|
1041 |
{
|
sl@0
|
1042 |
test.Printf(_L("CallTestsL: Skipped: test does not run on LFFS.\n"));
|
sl@0
|
1043 |
return;
|
sl@0
|
1044 |
}
|
sl@0
|
1045 |
|
sl@0
|
1046 |
DoTestsL();
|
sl@0
|
1047 |
CheckDisk();
|
sl@0
|
1048 |
|
sl@0
|
1049 |
test.End();
|
sl@0
|
1050 |
test.Close();
|
sl@0
|
1051 |
return;
|
sl@0
|
1052 |
}
|
sl@0
|
1053 |
|