--- a/persistentstorage/sql/TEST/t_sqlstartup.cpp Fri May 14 13:32:10 2010 +0100
+++ b/persistentstorage/sql/TEST/t_sqlstartup.cpp Thu Jul 01 17:02:22 2010 +0100
@@ -22,6 +22,9 @@
_LIT(KCfgDb1ConfigFilePath, "c:\\private\\10281e17\\cfg[10281E17]t_sqlstartup1.db.02"); // config file version 2 for t_sqlstartup1.db
_LIT(KCfgDb2ConfigFilePath, "c:\\private\\10281e17\\cfg[10281E17]t_sqlstartup2.db.05"); // config file version 5 for t_sqlstartup2.db
+//This subdir is created by t_sqlenvcreate app. It should not be returned in the list of files for backup.
+_LIT(KPrivateSubDir, "c:\\private\\10281e17\\TestDir.db");
+
///////////////////////////////////////////////////////////////////////////////////////
RTest TheTest(_L("t_sqlstartup test"));
@@ -189,7 +192,18 @@
const TUid KDbUd = {0x98765432};
RArray<TParse> files;
TRAP(err, server->GetBackUpListL(KDbUd, files));
- fileCnt = files.Count();
+ fileCnt = files.Count();
+ if(err == KErrNone)
+ {
+ //No directories should be returned in the list of files for backup
+ for(TInt i=0;i<fileCnt;++i)
+ {
+ const TParse& parse = files[i];
+ TPtrC fname = parse.FullName();
+ TInt rc = KPrivateSubDir().CompareF(parse.FullName());
+ TEST(rc != 0);
+ }
+ }
files.Close();
OomPostStep();
}
@@ -221,7 +235,7 @@
{
TheTest.Printf(_L("===Simulated error: %d\r\nIteration: "), fsError);
err = KErrNotFound;
- TInt cnt=1;
+ TInt cnt=0;
while(err<KErrNone)
{
TheTest.Printf(_L("%d "), cnt);
@@ -259,7 +273,7 @@
TheTest.Printf(_L("===Simulated error: %d\r\nIteration: "), fsError);
err = KErrNotFound;
TInt fileCnt = 0;
- TInt cnt=1;
+ TInt cnt=0;
while(err<KErrNone)
{
TheTest.Printf(_L("%d "), cnt);
@@ -268,6 +282,17 @@
RArray<TParse> files;
TRAP(err, server->GetBackUpListL(KDbUd, files));
fileCnt = files.Count();
+ if(err == KErrNone)
+ {
+ //No directories should be returned in the list of files for backup
+ for(TInt i=0;i<fileCnt;++i)
+ {
+ const TParse& parse = files[i];
+ TPtrC fname = parse.FullName();
+ TInt rc = KPrivateSubDir().CompareF(parse.FullName());
+ TEST(rc != 0);
+ }
+ }
files.Close();
(void)server->Fs().SetErrorCondition(KErrNone);
if(err != KErrNone)