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