Update contrib.
2 * Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
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.
19 #include "T_InvalidFontFile.h"
26 Simple application to create an invalid font file for use in the Font Store eclipsing tests
27 This app is seperate from the test code so that it may use the Tcb capability in order to
28 write to the \resource\* directory.
33 CleanupClosePushL(fs);
34 User::LeaveIfError(fs.Connect());
37 CleanupClosePushL(fw);
39 //Ensure the directory exists or the file writing will fail
40 TRAPD(err, fs.MkDirAll(KEclipsingFolder));
41 if (err != KErrAlreadyExists)
42 User::LeaveIfError(err);
44 //Create the invalid file
45 User::LeaveIfError(fw.Create(fs, KEclipsingFile, EFileWrite));
46 fw.WriteL(KInvalidFontFileText);
49 CleanupStack::PopAndDestroy(2, &fs);
52 GLDEF_C TInt E32Main()
55 CTrapCleanup* cleanup = CTrapCleanup::New();
56 TRAPD(mainError, MainL());
57 if (mainError != KErrNone)
59 RDebug::Printf("T_WriteInvalidFontFile.exe failed with error %i", mainError);