os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-FindFile-PublicApi-REM.script
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/baseapitest/basesvs/validation/f32/sfsrv/scripts/PBASE-F32-FindFile-PublicApi-REM.script	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,172 @@
     1.4 +//
     1.5 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// under the terms of "Eclipse Public License v1.0"
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description: 
    1.18 +//
    1.19 +//! @file
    1.20 +//! @SYMTestSuiteName			pbase-f32-sfsrv-publicapi-rem
    1.21 +//! @SYMScriptTestEnvironment		This test script requires a basic ROM.
    1.22 +//! @SYMScriptAuthor 			Dmitri Trofimov
    1.23 +//! @SYMScriptDescription		The test script contains API tests for the following functions of TFindFile class:
    1.24 +//! @SYMCreationDate			17/12/2006 
    1.25 +//! TFindFile(RFs &aFs);
    1.26 +//! TInt FindByDir(const TDesC &aFileName, const TDesC &aDirPath);
    1.27 +//! TInt FindWildByDir(const TDesC &aFileName, const TDesC &aDirPath, CDir *&aDir);
    1.28 +//! TInt Find();
    1.29 +//! TInt FindWild(CDir *&aDirList);
    1.30 +//! const TDesC &File() const;
    1.31 +//! TInt SetFindMask(TUint aMask);
    1.32 +
    1.33 +LOAD_SUITE				T_SfSrv
    1.34 +DELAY					5000
    1.35 +
    1.36 +
    1.37 +START_TESTCASE				SETUP_FILES
    1.38 +	START_TEST_BLOCK	100		T_SfSrv		\base\PBASE-F32-FindFile-PublicApi.ini
    1.39 +		CREATE_OBJECT	RFs		RFs1
    1.40 +		CREATE_OBJECT	CFileMan	CFileMan1
    1.41 +		COMMAND		RFs1		new
    1.42 +		COMMAND		RFs1		Connect
    1.43 +		COMMAND		RFs1		MkDirAll	test_dir
    1.44 +		COMMAND		RFs1		MkDirAll	test_dir1
    1.45 +		COMMAND		RFs1		MkDirAll	test_rem_dir
    1.46 +		COMMAND		RFs1		MkDirAll	test_rem_dir1
    1.47 +		COMMAND		CFileMan1	NewL		fileman_fs
    1.48 +		COMMAND		CFileMan1	Copy		test_file1
    1.49 +		COMMAND		CFileMan1	Close
    1.50 +		COMMAND		CFileMan1	Copy		test_rem_file1
    1.51 +		COMMAND		CFileMan1	Close
    1.52 +		COMMAND		CFileMan1	~
    1.53 +		COMMAND		RFs1	~
    1.54 +	END_TEST_BLOCK
    1.55 +END_TESTCASE				SETUP_FILES
    1.56 +
    1.57 +
    1.58 +START_TESTCASE 				PBASE-F32-FindFile-PublicApi-0019
    1.59 +//! @SYMTestCaseID			PBASE-F32-FindFile-PublicApi-0019
    1.60 +//! @SYMAPI				TFindFile
    1.61 +//! @SYMTestCaseDesc			Find() test. This tests for successful finding of file after FindByDir() call.
    1.62 +//!					Uses API elements: FindByDir(), Find(), File()
    1.63 +//! @SYMTestActions			1. Create RFs object.
    1.64 +//!					2. Create RDir object.
    1.65 +//!					3. Create TFindFile object passing a reference to the connected file session as a parameter.
    1.66 +//!					4. Call FindByDir() passing file name "Test1.txt" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
    1.67 +//!					5. Call File() with checking that value is '\base\t_sfsrv\t_findfile\test1\Test1.txt'
    1.68 +//!					60.Call Find().
    1.69 +//!					71.Call File() with checking that value is 'x:\base\t_sfsrv\t_findfile\test1\Test1.txt'
    1.70 +//!
    1.71 +//! @SYMTestStatus			Implemented
    1.72 +//! @SYMTestPriority			Critical
    1.73 +//! @SYMTestExpectedResults		Find() returns KErrNone.
    1.74 +//! @SYMTestType			CIT
    1.75 +	START_TEST_BLOCK	100		T_SfSrv		\base\PBASE-F32-FindFile-PublicApi.ini
    1.76 +		CREATE_OBJECT	RFs		RFs1
    1.77 +		CREATE_OBJECT	RDir		RDir1		
    1.78 +		CREATE_OBJECT	TFindFile	TFindFile1	
    1.79 +		COMMAND		RFs1		new
    1.80 +		COMMAND		RDir1		new
    1.81 +		COMMAND		RFs1		Connect
    1.82 +		COMMAND		TFindFile1	new		PBASE-F32-FindFile-PublicApi-0019-command4new
    1.83 +		COMMAND		TFindFile1	FindByDir	PBASE-F32-FindFile-PublicApi-0019-command5FindByDir
    1.84 +		COMMAND		TFindFile1	File		correct_file_path
    1.85 +		COMMAND		TFindFile1	Find		
    1.86 +		COMMAND		TFindFile1	File		rem_correct_file_path
    1.87 +		COMMAND		TFindFile1	~
    1.88 +		COMMAND		RDir1		~
    1.89 +		COMMAND		RFs1		~
    1.90 +	END_TEST_BLOCK
    1.91 +END_TESTCASE				PBASE-F32-FindFile-PublicApi-0019
    1.92 +
    1.93 +START_TESTCASE 				PBASE-F32-FindFile-PublicApi-0023
    1.94 +//! @SYMTestCaseID			PBASE-F32-FindFile-PublicApi-0023
    1.95 +//! @SYMAPI				TFindFile
    1.96 +//! @SYMTestCaseDesc			FindWild() test. This test for successful finding of file ather FindWildByDir() call.
    1.97 +//!					Uses API elements: FindWildByDir(), FindWild()
    1.98 +//! @SYMTestActions			1. Create RFs object.
    1.99 +//!					2. Call Connect().
   1.100 +//!					3. Create TFindFile object passing a reference to the connected file session as a parameter.
   1.101 +//!					4. Call FindWildByDir() passing file name "Test1.*" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
   1.102 +//!					5. Call FindWild().
   1.103 +//!
   1.104 +//! @SYMTestStatus			Implemented
   1.105 +//! @SYMTestPriority			Critical
   1.106 +//! @SYMTestExpectedResults		FindWild() returns KErrNone. FindWild find file on another RAM drive.
   1.107 +//! @SYMTestType			CIT
   1.108 +	START_TEST_BLOCK	100		T_SfSrv		\base\PBASE-F32-FindFile-PublicApi.ini
   1.109 +		CREATE_OBJECT	RFs		RFs1	
   1.110 +		CREATE_OBJECT	TFindFile	TFindFile1
   1.111 +		CREATE_OBJECT	TEntry		TEntry1
   1.112 +		CREATE_OBJECT	CDir		CDir1
   1.113 +		COMMAND		RFs1		new		
   1.114 +		COMMAND		RFs1		Connect		
   1.115 +		COMMAND		TFindFile1	new		PBASE-F32-FindFile-PublicApi-0023-command4new
   1.116 +		COMMAND		TFindFile1	FindWildByDir	PBASE-F32-FindFile-PublicApi-0023-command5FindWildByDir
   1.117 +		COMMAND		TFindFile1	FindWild	common_dir_wrapper
   1.118 +		COMMAND		TFindFile1	~		
   1.119 +		COMMAND		RFs1		~
   1.120 +	END_TEST_BLOCK
   1.121 +END_TESTCASE				PBASE-F32-FindFile-PublicApi-0023
   1.122 +
   1.123 +START_TESTCASE 				PBASE-F32-FindFile-PublicApi-0026
   1.124 +//! @SYMTestCaseID			PBASE-F32-FindFile-PublicApi-0026
   1.125 +//! @SYMAPI				TFindFile
   1.126 +//! @SYMTestCaseDesc			FindByDir() test. This tests for function to return correct data.
   1.127 +//!					Uses API elements: FindByDir(), SetFindMask(), File()
   1.128 +//! @SYMTestActions			1. Create RFs object.
   1.129 +//!					2. Call Connect().
   1.130 +//!					3. Call SetFindMask() with invalid parameter .
   1.131 +//!                 4. Call SetFindMask() KDriveAttRemovable as passed parameter.
   1.132 +//!					5. Create TFindFile object passing a reference to the connected file session as a parameter.
   1.133 +//!					6. Call FindByDir() passing file name "Test1.txt" and path "\base\t_sfsrv\t_findfile\test1\" as arguments.
   1.134 +//!					7. Call Find() to switch path to removable drive
   1.135 +//!					8. Call File() with checking that value is 'X:\base\t_sfsrv\t_findfile\test1\Test1.txt'
   1.136 +//!
   1.137 +//! @SYMTestStatus			Implemented
   1.138 +//! @SYMTestPriority			Critical
   1.139 +//! @SYMTestExpectedResults		SetFindMask() with invalid parameter returns KErrArgument. and File returns a path on removable drive.
   1.140 +//! @SYMTestType			CIT
   1.141 +	START_TEST_BLOCK	100	T_SfSrv		\base\PBASE-F32-FindFile-PublicApi.ini
   1.142 +		CREATE_OBJECT		RFs		RFs1	
   1.143 +		CREATE_OBJECT		TFindFile	TFindFile1	
   1.144 +		CREATE_OBJECT		TEntry		TEntry1
   1.145 +		CREATE_OBJECT		CDir		CDir1
   1.146 +		COMMAND			RFs1		new			
   1.147 +		COMMAND			RFs1		Connect		
   1.148 +		COMMAND			TFindFile1	new		PBASE-F32-FindFile-PublicApi-0026-command4new
   1.149 +		COMMAND	!Error=-6	TFindFile1	SetFindMask     PBASE-F32-FindFile-PublicApi-0026__mask_params
   1.150 +		COMMAND			TFindFile1	SetFindMask	find_mask_params
   1.151 +		COMMAND			TFindFile1	FindByDir	PBASE-F32-FindFile-PublicApi-0026-command5FindByDir
   1.152 +		COMMAND			TFindFile1	Find			
   1.153 +		COMMAND			TFindFile1	~		
   1.154 +		COMMAND			RFs1		~		
   1.155 +	END_TEST_BLOCK
   1.156 +END_TESTCASE				PBASE-F32-FindFile-PublicApi-0026
   1.157 +
   1.158 +
   1.159 +START_TESTCASE				REMOVE_FILES
   1.160 +	START_TEST_BLOCK	100		T_SfSrv		\base\PBASE-F32-FindFile-PublicApi.ini
   1.161 +		CREATE_OBJECT	RFs		RFs1
   1.162 +		CREATE_OBJECT	CFileMan	CFileMan1
   1.163 +		COMMAND		RFs1		new
   1.164 +		COMMAND		RFs1		Connect
   1.165 +		COMMAND		CFileMan1	NewL		fileman_fs
   1.166 +		COMMAND		CFileMan1	Delete		all_files1
   1.167 +		COMMAND		CFileMan1	Delete		all_rem_files1
   1.168 +		COMMAND		RFs1		RmDir		test_dir1
   1.169 +		COMMAND		RFs1		RmDir		test_dir
   1.170 +		COMMAND		RFs1		RmDir		test_rem_dir1
   1.171 +		COMMAND		RFs1		RmDir		test_rem_dir
   1.172 +		COMMAND		CFileMan1	~
   1.173 +		COMMAND		RFs1		~
   1.174 +	END_TEST_BLOCK
   1.175 +END_TESTCASE				REMOVE_FILES