912 theTestSession.Close(); |
912 theTestSession.Close(); |
913 theNrm.Close(); |
913 theNrm.Close(); |
914 theRes.Close(); |
914 theRes.Close(); |
915 } |
915 } |
916 |
916 |
|
917 LOCAL_C void TestForDEF142554() |
|
918 { |
|
919 test.Next(_L("Test for DEF142554: test RFile::Modified and RFile::Att when disk full")); |
|
920 |
|
921 Format(gTestDrive); |
|
922 |
|
923 TUint att; |
|
924 TTime time; |
|
925 |
|
926 RFs fs; |
|
927 TInt err = fs.Connect(); |
|
928 test(err == KErrNone); |
|
929 |
|
930 RFile file; |
|
931 TBuf<20> fileName; |
|
932 fileName = KTestFile; |
|
933 fileName[0] = (TUint16)gCh; |
|
934 |
|
935 err = fs.ReserveDriveSpace(gTestDrive,0x10000); |
|
936 test(err == KErrNone); |
|
937 |
|
938 err = file.Replace(fs, fileName, EFileWrite); |
|
939 test(err == KErrNone); |
|
940 |
|
941 err = file.Write(KTestData); |
|
942 test(err == KErrNone); |
|
943 |
|
944 err = file.Flush(); |
|
945 test(err == KErrNone); |
|
946 |
|
947 file.Close(); |
|
948 |
|
949 err = file.Open(fs, fileName, EFileRead); |
|
950 test(err == KErrNone); |
|
951 |
|
952 err = file.Att(att); |
|
953 test(err == KErrNone); |
|
954 |
|
955 err = file.Modified(time); |
|
956 test(err == KErrNone); |
|
957 |
|
958 file.Close(); |
|
959 |
|
960 FillUpDisk(); |
|
961 |
|
962 err = file.Open(fs, fileName, EFileRead); |
|
963 test(err == KErrNone); |
|
964 |
|
965 TUint att1; |
|
966 err = file.Att(att1); |
|
967 test(err == KErrNone); |
|
968 test(att1 == att); |
|
969 |
|
970 TTime time1; |
|
971 err = file.Modified(time1); |
|
972 test(err == KErrNone); |
|
973 test(time1 == time); |
|
974 |
|
975 file.Close(); |
|
976 fs.Close(); |
|
977 |
|
978 } |
|
979 |
917 |
980 |
918 //----------------------------------------------------------------------------- |
981 //----------------------------------------------------------------------------- |
919 |
982 |
920 /** |
983 /** |
921 test creation of the the file that crosses 4G boundary on the FAT media |
984 test creation of the the file that crosses 4G boundary on the FAT media |