Update contrib.
1 // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Main entry point for the tests
19 #include <e32std_private.h>
25 #define __PRINT(t) {RDebug::Print(t);}
26 #define __PRINT1(t,a) {RDebug::Print(t,a);}
27 #define __PRINT2(t,a,b) {RDebug::Print(t,a,b);}
31 #define __PRINT2(t,a,b)
34 GLREF_C void DoTestL(TInt aDriveToTest);
38 //_LIT( KRofsFilesystemName, "Rofs" ); // Comment out warning
41 GLDEF_D TChar gDriveToTest;
43 void ParseCommandArguments()
49 User::CommandLine(cmd);
51 TPtrC token=lex.NextToken();
52 TFileName thisfile=RProcess().FileName();
53 if (token.MatchF(thisfile)==0)
55 token.Set(lex.NextToken());
57 test.Printf(_L("CLP=%S"),&token);
60 gDriveToTest=token[0];
61 gDriveToTest.UpperCase();
73 GLDEF_C TInt E32Main()
75 CTrapCleanup* cleanup;
76 cleanup=CTrapCleanup::New();
78 ParseCommandArguments();
80 TInt r=TheFs.Connect();
81 __PRINT1(_L("Connect ret %d"),r);
84 r=TheFs.CharToDrive(gDriveToTest,theDrive);
85 __PRINT1(_L("Look up drive number returned %d"),r);
89 TRAP( r, DoTestL(theDrive) );
96 test.Printf( _L("Failed with error %d\n"), r );
100 // The sin of sins for tests
101 // test.Printf( _L("Press a key...") );