commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsgetlangversion.cpp
equal
deleted
inserted
replaced
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
26 Destructor |
26 Destructor |
27 */ |
27 */ |
28 CSysUtilsGetLangVersionStep::~CSysUtilsGetLangVersionStep() |
28 CSysUtilsGetLangVersionStep::~CSysUtilsGetLangVersionStep() |
29 |
29 |
30 { |
30 { |
|
31 SetTestPath(EFalse); |
31 } |
32 } |
32 |
33 |
33 /** |
34 /** |
34 Constructor |
35 Constructor |
35 */ |
36 */ |
61 |
62 |
62 TBuf16<KSysUtilVersionTextLength> version; |
63 TBuf16<KSysUtilVersionTextLength> version; |
63 |
64 |
64 version.Insert(0,KDummy); |
65 version.Insert(0,KDummy); |
65 |
66 |
66 TInt fileErr = CheckIsFileExist( _L("Z:\\resource\\versions\\lang.txt")); |
67 TInt fileErr = CheckIsFileExist( _L("C:\\versions\\lang.txt")); |
67 |
68 |
68 /* This test is not valid if file does not exist |
69 /* This test is not valid if file does not exist |
69 * Reason for missing file is that "english engineering" package |
70 * Reason for missing file is that "english engineering" package |
70 * does not include that. (TeK 19.8.2005) |
71 * does not include that. (TeK 19.8.2005) |
71 */ |
72 */ |
78 SetTestStepResult(EAbort); |
79 SetTestStepResult(EAbort); |
79 return TestStepResult(); |
80 return TestStepResult(); |
80 } |
81 } |
81 INFO_PRINTF1(_L("Deleted P&S properties successfully.")); |
82 INFO_PRINTF1(_L("Deleted P&S properties successfully.")); |
82 |
83 |
83 err = SetTestPath(EFalse); |
84 err = SetTestPath(ETrue); |
84 if( err != KErrNone ) |
85 if( err != KErrNone ) |
85 { |
86 { |
86 ERR_PRINTF2(_L("Could not turn test path off. Error = %d"), err); |
87 ERR_PRINTF2(_L("Could not turn test path off. Error = %d"), err); |
87 SetTestStepResult(EAbort); |
88 SetTestStepResult(EAbort); |
88 return TestStepResult(); |
89 return TestStepResult(); |
117 } |
118 } |
118 |
119 |
119 if (version.Compare(testBuf)!=0) |
120 if (version.Compare(testBuf)!=0) |
120 { |
121 { |
121 ERR_PRINTF1(_L("language version formatted incorrectly")); |
122 ERR_PRINTF1(_L("language version formatted incorrectly")); |
|
123 INFO_PRINTF1(_L("From ini file: ")); |
122 INFO_PRINTF1(testBuf); |
124 INFO_PRINTF1(testBuf); |
|
125 INFO_PRINTF1(_L("From txt file: ")); |
|
126 INFO_PRINTF1(version); |
|
127 INFO_PRINTF2(_L("Comparison returned value %d"), version.Compare(testBuf)); |
123 SetTestStepResult(EFail); |
128 SetTestStepResult(EFail); |
124 } |
129 } |
125 else |
130 else |
126 { |
131 { |
127 INFO_PRINTF1(_L("software version formatted correctly")); |
132 INFO_PRINTF1(_L("software version formatted correctly")); |
135 else |
140 else |
136 { |
141 { |
137 ERR_PRINTF1(_L("Lang.txt is missing, should be included to base packets")); |
142 ERR_PRINTF1(_L("Lang.txt is missing, should be included to base packets")); |
138 SetTestStepResult(EFail); |
143 SetTestStepResult(EFail); |
139 } |
144 } |
140 |
145 |
|
146 SetTestPath(EFalse); |
141 return TestStepResult(); |
147 return TestStepResult(); |
142 } |
148 } |
143 |
149 |