237 err = db.Open(_L("C:[21212122]BBDb2.db")); |
237 err = db.Open(_L("C:[21212122]BBDb2.db")); |
238 TEST2(err, KErrPermissionDenied); |
238 TEST2(err, KErrPermissionDenied); |
239 //...create as a non-secure database |
239 //...create as a non-secure database |
240 err = db.Create(_L("C:[21212122]BBDb2.db")); |
240 err = db.Create(_L("C:[21212122]BBDb2.db")); |
241 TEST2(err, KErrArgument);//secure database name, no security policy |
241 TEST2(err, KErrArgument);//secure database name, no security policy |
|
242 //Very long private database name |
|
243 err = db.Create(_L("c:\\private\\21212124\\hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.db")); |
|
244 TEST2(err, KErrBadName); |
|
245 //Zero length private database name |
|
246 err = db.Create(_L("")); |
|
247 TEST2(err, KErrBadName); |
|
248 //Private database + very long config string |
|
249 _LIT8(KVeryLongConfig, "jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj"); |
|
250 err = db.Create(KTestDb2, &KVeryLongConfig); |
|
251 TEST2(err, KErrArgument); |
242 //...create as a secure database |
252 //...create as a secure database |
243 RSqlSecurityPolicy dbSecurity; |
253 RSqlSecurityPolicy dbSecurity; |
244 TSecurityPolicy policy(TSecurityPolicy::EAlwaysPass); |
254 TSecurityPolicy policy(TSecurityPolicy::EAlwaysPass); |
245 err = dbSecurity.Create(policy); |
255 err = dbSecurity.Create(policy); |
246 TEST2(err, KErrNone); |
256 TEST2(err, KErrNone); |