commonservices/sysutil/test/tef/te_sysutiltestsuite/src/te_sysutilsgetlangswversion.cpp
equal
deleted
inserted
replaced
1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2007-2009 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". |
25 /** |
25 /** |
26 Destructor |
26 Destructor |
27 */ |
27 */ |
28 CSysUtilsGetLangSWVersionStep::~CSysUtilsGetLangSWVersionStep() |
28 CSysUtilsGetLangSWVersionStep::~CSysUtilsGetLangSWVersionStep() |
29 { |
29 { |
30 SetTestPath(EFalse); |
|
31 } |
30 } |
32 |
31 |
33 /** |
32 /** |
34 Constructor |
33 Constructor |
35 */ |
34 */ |
60 |
59 |
61 TBuf16<KSysUtilVersionTextLength> version; |
60 TBuf16<KSysUtilVersionTextLength> version; |
62 |
61 |
63 version.Insert(0,KDummy); |
62 version.Insert(0,KDummy); |
64 |
63 |
65 TInt fileErr = CheckIsFileExist( _L("C:\\versions\\langsw.txt")); |
64 TInt fileErr = CheckIsFileExist( _L("Z:\\resource\\versions\\langsw.txt")); |
66 |
65 |
67 if(fileErr == KErrNone) |
66 if(fileErr == KErrNone) |
68 { |
67 { |
69 err = DeletePSProperties(); |
68 err = DeletePSProperties(); |
70 if(err != KErrNone) |
69 if(err != KErrNone) |
73 SetTestStepResult(EAbort); |
72 SetTestStepResult(EAbort); |
74 return TestStepResult(); |
73 return TestStepResult(); |
75 } |
74 } |
76 INFO_PRINTF1(_L("Deleted P&S properties successfully.")); |
75 INFO_PRINTF1(_L("Deleted P&S properties successfully.")); |
77 |
76 |
78 err = SetTestPath(ETrue); |
77 err = SetTestPath(EFalse); |
79 if( err != KErrNone ) |
78 if( err != KErrNone ) |
80 { |
79 { |
81 ERR_PRINTF2(_L("Could not turn test path off. Error = %d"), err); |
80 ERR_PRINTF2(_L("Could not turn test path off. Error = %d"), err); |
82 SetTestStepResult(EAbort); |
81 SetTestStepResult(EAbort); |
83 return TestStepResult(); |
82 return TestStepResult(); |
112 } |
111 } |
113 |
112 |
114 if (version.Compare(testBuf)!=0) |
113 if (version.Compare(testBuf)!=0) |
115 { |
114 { |
116 ERR_PRINTF1(_L("software language formatted incorrectly")); |
115 ERR_PRINTF1(_L("software language formatted incorrectly")); |
117 ERR_PRINTF1(_L("From ini file: ")); |
116 INFO_PRINTF1(testBuf); |
118 ERR_PRINTF1(testBuf); |
|
119 ERR_PRINTF1(_L("From txt file: ")); |
|
120 ERR_PRINTF1(version); |
|
121 ERR_PRINTF2(_L("Comparison returned value %d"), version.Compare(testBuf)); |
|
122 SetTestStepResult(EFail); |
117 SetTestStepResult(EFail); |
123 } |
118 } |
124 else |
119 else |
125 { |
120 { |
126 INFO_PRINTF1(_L("software version formatted correctly")); |
121 INFO_PRINTF1(_L("software version formatted correctly")); |
135 { |
130 { |
136 ERR_PRINTF1(_L("Langsw.txt is missing, should be included to base packets")); |
131 ERR_PRINTF1(_L("Langsw.txt is missing, should be included to base packets")); |
137 SetTestStepResult(EFail); |
132 SetTestStepResult(EFail); |
138 } |
133 } |
139 |
134 |
140 SetTestPath(EFalse); |
|
141 return TestStepResult(); |
135 return TestStepResult(); |
142 } |
136 } |
143 |
137 |