sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // f32test\locl\localeutils\t_localeutils_cp932.cpp sl@0: // sl@0: // sl@0: sl@0: #define __E32TEST_EXTENSION__ sl@0: sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include "..\server\t_server.h" sl@0: #include "fat_utils.h" sl@0: sl@0: RTest test(_L("T_LOCALEUTILS_CP932")); sl@0: sl@0: #if defined(_DEBUG) || defined(_DEBUG_RELEASE) sl@0: using namespace Fat_Test_Utils; sl@0: static RRawDisk TheDisk; sl@0: static TFatBootSector gBootSector; sl@0: _LIT(KTestLocale, "t_tlocl_cp932.dll"); sl@0: sl@0: void QuickFormat() sl@0: { sl@0: FormatFatDrive(TheFs, CurrentDrive(), ETrue); sl@0: } sl@0: sl@0: void ReadBootSector(TFatBootSector& aBootSector) sl@0: { sl@0: sl@0: TInt nRes = ReadBootSector(TheFs, CurrentDrive(), KBootSectorNum< longDirNamePath; sl@0: TBuf shortDirNamePath; sl@0: TBuf longName; sl@0: TBuf shortName; sl@0: longDirNamePath = gSessionPath; sl@0: longDirNamePath += aLongName; sl@0: longDirNamePath.Append('\\'); sl@0: sl@0: // Create new directory and check creation sl@0: TInt r = TheFs.MkDir(longDirNamePath); sl@0: test_KErrNone(r); sl@0: TUint dumUint=0; sl@0: CDir* dumDir; sl@0: r= TheFs.GetDir(longDirNamePath, dumUint, dumUint, dumDir); sl@0: test_KErrNone(r); sl@0: test_NotNull(dumDir); sl@0: delete dumDir; sl@0: sl@0: // Check short name sl@0: r = TheFs.GetShortName(longDirNamePath, shortName); sl@0: test_KErrNone(r); sl@0: r = shortName.Compare(aShortName); sl@0: test_Equal(r, 0); sl@0: sl@0: // Check long name sl@0: shortDirNamePath = gSessionPath; sl@0: shortDirNamePath += shortName; sl@0: shortDirNamePath.Append('\\'); sl@0: r = TheFs.GetLongName(shortDirNamePath, longName); sl@0: test_KErrNone(r); sl@0: r = longName.Compare(aLongName); sl@0: test_Equal(r, 0); sl@0: sl@0: r = TheFs.RmDir(longDirNamePath); sl@0: test_KErrNone(r); sl@0: } sl@0: sl@0: void doFileNameTest(const TDesC& aLongName, const TDesC& aShortName) sl@0: { sl@0: TFileName lgnFullPath; sl@0: TFileName shnFullPath; sl@0: TFileName lgn; sl@0: TFileName shn; sl@0: sl@0: TInt r = TheFs.SessionPath(gSessionPath); sl@0: test_KErrNone(r); sl@0: lgnFullPath = gSessionPath; sl@0: lgnFullPath += aLongName; sl@0: sl@0: MakeFile(lgnFullPath); sl@0: sl@0: // Check short name sl@0: r = TheFs.GetShortName(lgnFullPath, shn); sl@0: test_KErrNone(r); sl@0: r = shn.Compare(aShortName); sl@0: test_Equal(r, 0); sl@0: sl@0: // Check long name sl@0: shnFullPath = gSessionPath; sl@0: shnFullPath += aShortName; sl@0: sl@0: r = TheFs.GetLongName(shnFullPath, lgn); sl@0: test_KErrNone(r); sl@0: r = lgn.Compare(aLongName); sl@0: test_Equal(r, 0); sl@0: sl@0: test_KErrNone(TheFs.Delete(lgnFullPath)); sl@0: } sl@0: #endif //_DEBUG || _DEBUG_RELEASE sl@0: sl@0: //---------------------------------------------------------------------------------------------- sl@0: //! @SYMTestCaseID PBASE-t_fatcharsetconv-0406 sl@0: //! @SYMTestType CIT sl@0: //! @SYMDEF DEF101875 sl@0: //! @SYMTestCaseDesc This test case is to test the default behaviours of LocaleUtils functions sl@0: //! in FAT.fsy before FATCharsetConv is integrated (i.e. there is no codepage sl@0: //! dll loaded). sl@0: //! @SYMTestActions 1. Creates a file with a name containing 3 valid Unicode characters, sl@0: //! gets its short name and compares it with "___", gets its long name and sl@0: //! compares it with the original Unicode string; sl@0: //! 2. Creates a file with a name containing 4 Unicode characters, each 16-bit sl@0: //! Unicode character contains two illegal 8-bit characters, test if the sl@0: //! file can be created successfully, gets its short name and compares it sl@0: //! with "____", gets its long name and compares it with the original sl@0: //! Unicode string. sl@0: //! @SYMTestExpectedResults sl@0: //! 1. The file should be created successfully, the comparisons should return 0; sl@0: //! 2. The file should be created successfully, the comparisons should return 0; sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestCaseDependencies sl@0: //! This test should be run before any codepage DLL is loaded, sl@0: //! i.e., prior to all other test cases defined in this file. sl@0: //! @SYMTestStatus Implemented sl@0: //---------------------------------------------------------------------------------------------- sl@0: void TestBeforeFATCharsetConvInteg() sl@0: { sl@0: test.Next(_L("Test default unicode handling in FAT implementation")); sl@0: #if defined(_DEBUG) || defined(_DEBUG_RELEASE) sl@0: _LIT(KTestNormalUnicodeFileName, "\x65B0\x6587\x4EF6.TXT"); sl@0: _LIT(KTestNormalUnicodeFileNameShortDefualt, "___.TXT"); sl@0: _LIT(KTestFileNameWithIllegalChars, "\x222F\x2F3A\x3C3E\x7C00.TXT"); sl@0: _LIT(KFileNameWithIllegalCharsShort, "____.TXT"); sl@0: sl@0: TInt r = TheFs.ControlIo(CurrentDrive(), KControlIoDisableFatUtilityFunctions); sl@0: test_KErrNone(r); sl@0: sl@0: // Create file and check creation sl@0: MakeFile(KTestNormalUnicodeFileName); sl@0: TFileName shn; sl@0: // Check short name to test if there is any codepage DLL loaded already. sl@0: r = TheFs.GetShortName(KTestNormalUnicodeFileName, shn); sl@0: test_KErrNone(r); sl@0: sl@0: r = shn.Compare(KTestNormalUnicodeFileNameShortDefualt); sl@0: test_Equal(r, 0); sl@0: sl@0: TFileName lgn; sl@0: r = TheFs.GetLongName(KTestNormalUnicodeFileNameShortDefualt, lgn); sl@0: test_KErrNone(r); sl@0: r = lgn.Compare(KTestNormalUnicodeFileName); sl@0: test_Equal(r, 0); sl@0: sl@0: // Test illegal 8-bit ASCII chars in 16-bit Unicode chars. sl@0: MakeFile(KTestFileNameWithIllegalChars); sl@0: r = TheFs.GetShortName(KTestFileNameWithIllegalChars, shn); sl@0: test_KErrNone(r); sl@0: r = shn.Compare(KFileNameWithIllegalCharsShort); sl@0: test_Equal(r, 0); sl@0: sl@0: test_KErrNone(TheFs.Delete(KTestFileNameWithIllegalChars)); sl@0: test_KErrNone(TheFs.Delete(KTestNormalUnicodeFileName)); sl@0: sl@0: r = TheFs.ControlIo(CurrentDrive(), KControlIoEnableFatUtilityFunctions); sl@0: test_KErrNone(r); sl@0: #else sl@0: test.Printf(_L("Test only runs on DEBUG builds, see test logs of debug builds for details.")); sl@0: #endif // _DEBUG) || _DEBUG_RELEASE sl@0: sl@0: } sl@0: sl@0: sl@0: //---------------------------------------------------------------------------------------------- sl@0: //! @SYMTestCaseID PBASE-t_fatcharsetconv-0407 sl@0: //! @SYMTestType CIT sl@0: //! @SYMDEF DEF101875 sl@0: //! @SYMTestCaseDesc This test case is to test volume label setting with Unicode characters sl@0: //! @SYMTestActions 1. Changes locale to load testing codepage dll, check returning error code sl@0: //! 2. Sets volume label with Unicode (less than 11 bytes long), test setting sl@0: //! success, gets volume label and compares it with the original Unicode string; sl@0: //! 3. Sets volume label with a Unicode string contains less than 11 characters sl@0: //! but occupies bigger than 11 bytes, checks the returning error code; sl@0: //! 4. Compares the volume label with the Unicode string used in action 2 sl@0: //! @SYMTestExpectedResults sl@0: //! 1. KErrNone should be returned; sl@0: //! 2. The comparison should return 0; sl@0: //! 3. KErrBadName should be returned; sl@0: //! 4. The comparison should return 0; sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestStatus Implemented sl@0: //---------------------------------------------------------------------------------------------- sl@0: void TestUnicodeVolumeLabel() sl@0: { sl@0: test.Next(_L("Test unicode volume labels")); sl@0: #if defined(_DEBUG) || defined(_DEBUG_RELEASE) sl@0: TInt r = UserSvr::ChangeLocale(KTestLocale); sl@0: test_KErrNone(r); sl@0: sl@0: r = TheFs.SessionPath(gSessionPath); sl@0: test_KErrNone(r); sl@0: TInt driveNum; sl@0: r = TheFs.CharToDrive(gSessionPath[0], driveNum); sl@0: test_KErrNone(r); sl@0: sl@0: // Retrieves the original volume label sl@0: TVolumeInfo vInfo; sl@0: r = TheFs.Volume(vInfo, driveNum); sl@0: const TInt KVolumeLabelSize = 11; sl@0: TBuf originalVolumeLabel(vInfo.iName); sl@0: sl@0: // Tests setting volume label with unicode characters sl@0: _LIT(KUnicodeVolumeLabel, "\x65B0\x65B0\x65B0"); sl@0: sl@0: r = TheFs.SetVolumeLabel(KUnicodeVolumeLabel, driveNum); sl@0: test_KErrNone(r); sl@0: r = TheFs.Volume(vInfo, driveNum); sl@0: test_KErrNone(r); sl@0: r = vInfo.iName.Compare(KUnicodeVolumeLabel); sl@0: test_Equal(r, 0); sl@0: sl@0: // Tests setting volume label with unicode characters that bigger than 11 bytes sl@0: _LIT(KVolumeLabelOverflow, "\x65B0\x65B0\x65B0\x65B0\x65B0\x65B0"); sl@0: r = TheFs.SetVolumeLabel(KVolumeLabelOverflow, driveNum); sl@0: // locale dll and codepage dll both return diff retrun values so check against both cases. sl@0: test((r == KErrBadName) || (r == KErrOverflow)); sl@0: sl@0: r = TheFs.Volume(vInfo, driveNum); sl@0: test_KErrNone(r); sl@0: r = vInfo.iName.Compare(KUnicodeVolumeLabel); sl@0: test_Equal(r, 0); sl@0: sl@0: // Sets back the original volume label sl@0: r = TheFs.SetVolumeLabel(originalVolumeLabel, driveNum); sl@0: test_KErrNone(r); sl@0: #else sl@0: test.Printf(_L("Test only runs on DEBUG builds, see test logs of debug builds for details.")); sl@0: #endif // _DEBUG) || _DEBUG_RELEASE sl@0: } sl@0: sl@0: sl@0: //---------------------------------------------------------------------------------------------- sl@0: //! @SYMTestCaseID PBASE-t_fatcharsetconv-0408 sl@0: //! @SYMTestType CIT sl@0: //! @SYMDEF DEF101875 sl@0: //! @SYMTestCaseDesc This test case is to test the "8 bytes" boundary of short name length, sl@0: //! which is defined in FAT Specification. sl@0: //! @SYMTestActions 1. Creates files and directories with different Unicode strings that sl@0: //! have different combinations of length (of characters) and size (of sl@0: //! bytes occupied), check for error of creation. sl@0: //! 2. Gets their short name, compares with expected values, gets their long sl@0: //! name, compares with original Unicode strings. sl@0: //! The strings and short name tested are as below: sl@0: //! 2.1. original string: "Abc" sl@0: //! expected short name: "ABC"; sl@0: //! 2.2. original string: "\x65B0\x6587\x4EF6\x4EF6" sl@0: //! expected short name: "\x65B0\x6587\x4EF6\x4EF6"; sl@0: //! 2.3. original string: "\x65B0\x6587\x4EF6(01)" sl@0: //! expected short name: "\x65B0\x6587\x4EF6~1"; sl@0: //! 2.4. original string: "Abcdefghi" sl@0: //! expected short name: "ABCDEF~1"; sl@0: //! 2.5. original string: "\x65B0(Abcdefgh)" sl@0: //! expected short name: "\x65B0(ABC~1"; sl@0: //! @SYMTestExpectedResults sl@0: //! 1. File should be created with no error; sl@0: //! 2. Comparisons should return 0; sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestStatus Implemented sl@0: //---------------------------------------------------------------------------------------------- sl@0: void TestShortNameBoundary() sl@0: { sl@0: test.Next(_L("8 bytes' name boundary tests")); sl@0: #if defined(_DEBUG) || defined(_DEBUG_RELEASE) sl@0: TInt r = UserSvr::ChangeLocale(KTestLocale); sl@0: test_KErrNone(r); sl@0: sl@0: // File names will be used for testing boundaries sl@0: _LIT(KTestFileName3C3B, "Abc"); // 3 characters, 3 bytes long sl@0: _LIT(KTestFileName3C3B_short, "ABC"); // Expected short name sl@0: _LIT(KTestFileName4C8B, "\x65B0\x6587\x4EF6\x4EF6");// 4 characters, 8 bytes long sl@0: _LIT(KTestFileName4C8B_short, "\x65B0\x6587\x4EF6\x4EF6");// Expected short name sl@0: _LIT(KTestFileName7C10B, "\x65B0\x6587\x4EF6(01)"); // 7 characters, 10 bytes long sl@0: _LIT(KTestFileName7C10B_short, "\x65B0\x6587\x4EF6~1"); // Expected short name sl@0: _LIT(KTestFileName9C9B, "Abcdefghi"); // 9 characters, 9 bytes long sl@0: _LIT(KTestFileName9C9B_short, "ABCDEF~1"); // Expected short name sl@0: _LIT(KTestFileName9C10B, "\x65B0(Abcdefgh)"); // 9 characters, 10 bytes long sl@0: _LIT(KTestFileName9C10B_short, "\x65B0(ABC~1"); // Expected short name sl@0: sl@0: // Test file creation and long/short name generation sl@0: doFileNameTest(KTestFileName3C3B, KTestFileName3C3B_short); sl@0: doFileNameTest(KTestFileName4C8B, KTestFileName4C8B_short); sl@0: doFileNameTest(KTestFileName7C10B, KTestFileName7C10B_short); sl@0: doFileNameTest(KTestFileName9C9B, KTestFileName9C9B_short); sl@0: doFileNameTest(KTestFileName9C10B, KTestFileName9C10B_short); sl@0: sl@0: doDirNameTest(KTestFileName3C3B, KTestFileName3C3B_short); sl@0: doDirNameTest(KTestFileName4C8B, KTestFileName4C8B_short); sl@0: doDirNameTest(KTestFileName7C10B, KTestFileName7C10B_short); sl@0: doDirNameTest(KTestFileName9C9B, KTestFileName9C9B_short); sl@0: doDirNameTest(KTestFileName9C10B, KTestFileName9C10B_short); sl@0: #else sl@0: test.Printf(_L("Test only runs on DEBUG builds, see test logs of debug builds for details.")); sl@0: #endif // _DEBUG) || _DEBUG_RELEASE sl@0: } sl@0: sl@0: //---------------------------------------------------------------------------------------------- sl@0: //! @SYMTestCaseID PBASE-t_fatcharsetconv-0794 sl@0: //! @SYMTestCaseDesc This test case is to test the extensions of the short names generated are consistent for file names sl@0: //! consisting of UNICODE characters. In a shortname, if the character at the third location (in 8.3 format) sl@0: //! is a head byte of a UNICODE character then it should be ignored. sl@0: //! @SYMTestActions 1. Creates files and directories with different Unicode strings that sl@0: //! have different combinations of extension length (of characters) and size (of sl@0: //! bytes occupied), check for error of creation. sl@0: //! 2. Gets their short name, compares with expected values, gets their long sl@0: //! name, compares with original Unicode strings. sl@0: //! The strings and short name tested are as below: sl@0: //! 2.1. original string: "abcdef.\x65B0" sl@0: //! expected short name: "ABCDEF.\x65B0"; sl@0: //! 2.2. original string: "abcdef.t\x65B0" sl@0: //! expected short name: "ABCDEF.T\x65B0"; sl@0: //! 2.3. original string: "abcdef.\x65B0t" sl@0: //! expected short name: "ABCDEF.\x65B0T"; sl@0: //! 2.4. original string: "abcdefg.\x65B0\x65B0" sl@0: //! expected short name: "ABCDEF~1.\x65B0"; sl@0: //! sl@0: //! @SYMTestExpectedResults sl@0: //! 1. File should be created with no error; sl@0: //! 2. Comparisons should return 0; sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestStatus Implemented sl@0: //---------------------------------------------------------------------------------------------- sl@0: sl@0: void TestConsistentShortNameExtGeneration() sl@0: { sl@0: test.Next(_L("Test consistent short name extensions are generated")); sl@0: #if defined(_DEBUG) || defined(_DEBUG_RELEASE) sl@0: TInt r = UserSvr::ChangeLocale(KTestLocale); sl@0: test_KErrNone(r); sl@0: sl@0: // File names will be used for testing boundaries sl@0: _LIT(KTestFileNameExt1C2B, "abcdefg.\x65B0"); // 1 characters, 2 bytes long ;only one Unicode character in the extension sl@0: _LIT(KTestFileNameExt1C2B_short, "ABCDEFG.\x65B0"); //Expected short name sl@0: _LIT(KTestFileNameExt2C3B2U, "abcdefg.t\x65B0"); // 2 characters, 3 bytes long ;Unicode character at the 2nd location of the extension sl@0: _LIT(KTestFileNameExt2C3B2U_short, "ABCDEFG.T\x65B0"); //Expected short name sl@0: _LIT(KTestFileNameExt2C3B1U, "abcdefg.\x65B0t"); // 2 characters, 3 bytes long ;Unicode character at the 1st location of the extension sl@0: _LIT(KTestFileNameExt2C3B1U_short, "ABCDEFG.\x65B0T"); //Expected short name sl@0: _LIT(KTestFileNameExt2C4B, "abcdefg.\x65B0\x65B0");// 2 characters, 4 bytes long ;both are Unicode characters in the extension sl@0: _LIT(KTestFileNameExt2C4B_short, "ABCDEF~1.\x65B0"); //Expected short name sl@0: sl@0: sl@0: // Test file creation and long/short name generation sl@0: doFileNameTest(KTestFileNameExt1C2B, KTestFileNameExt1C2B_short); sl@0: doFileNameTest(KTestFileNameExt2C3B2U, KTestFileNameExt2C3B2U_short); sl@0: doFileNameTest(KTestFileNameExt2C3B1U, KTestFileNameExt2C3B1U_short); sl@0: doFileNameTest(KTestFileNameExt2C4B, KTestFileNameExt2C4B_short); sl@0: sl@0: doDirNameTest(KTestFileNameExt1C2B, KTestFileNameExt1C2B_short); sl@0: doDirNameTest(KTestFileNameExt2C3B2U, KTestFileNameExt2C3B2U_short); sl@0: doDirNameTest(KTestFileNameExt2C3B1U, KTestFileNameExt2C3B1U_short); sl@0: doDirNameTest(KTestFileNameExt2C4B, KTestFileNameExt2C4B_short); sl@0: #else sl@0: test.Printf(_L("Test only runs on DEBUG builds, see test logs of debug builds for details.")); sl@0: #endif // _DEBUG) || _DEBUG_RELEASE sl@0: } sl@0: sl@0: sl@0: //---------------------------------------------------------------------------------------------- sl@0: //! @SYMTestCaseID PBASE-t_fatcharsetconv-0795 sl@0: //! @SYMTestCaseDesc This test case is to test whether the short names generated for file names sl@0: //! consisting of UNICODE characters are consistent or not. In a shortname, if the character immediately sl@0: //! preceding the tilde(~) is a head byte of a UNICODE character then it should be ignored. sl@0: //! @SYMTestActions 1. Creates files and directories with different Unicode strings that sl@0: //! have different combinations of length (of characters) and size (of sl@0: //! bytes occupied), check for error of creation. sl@0: //! 2. Gets their short name, compares with expected values, gets their long sl@0: //! name, compares with original Unicode strings. sl@0: //! The strings and short name tested are as below: sl@0: //! 2.1. original string: "a\x65B0(bcd)" sl@0: //! expected short name: "A\x65B0(BCD)"; sl@0: //! 2.2. original string: "ab\x65B0(cdef)" sl@0: //! expected short name: "AB\x65B0(C~1")"; sl@0: //! 2.3. original string: "abc\x65B0(def)" sl@0: //! expected short name: "ABC\x65B0(~1"; sl@0: //! 2.4. original string: "abcd\x65B0(ef)" sl@0: //! expected short name: "ABCD\x65B0~1"; sl@0: //! 2.5. original string: "abcde\x65B0(f)" sl@0: //! expected short name: "ABCDE~1"; sl@0: //! @SYMTestExpectedResults sl@0: //! 1. File should be created with no error; sl@0: //! 2. Comparisons should return 0; sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestStatus Implemented sl@0: //---------------------------------------------------------------------------------------------- sl@0: void TestConsistentShortNameGeneration() sl@0: { sl@0: test.Next(_L("Test consistent short name generation")); sl@0: #if defined(_DEBUG) || defined(_DEBUG_RELEASE) sl@0: TInt r = UserSvr::ChangeLocale(KTestLocale); sl@0: test_KErrNone(r); sl@0: sl@0: //unicode characters. sl@0: sl@0: _LIT(KTestFileName7C8B2U, "a\x65B0(bcd)"); // 7 characters, 8 bytes long ,Unicode character at the 2nd location. sl@0: _LIT(KTestFileName7C8B2U_short, "A\x65B0(BCD)"); // Expected short name sl@0: _LIT(KTestFileName9C10B3U, "ab\x65B0(cdef)"); // 9 characters, 10 bytes long ,Unicode character at the 3rd location. sl@0: _LIT(KTestFileName9C10B3U_short,"AB\x65B0(C~1"); // Expected short name sl@0: _LIT(KTestFileName9C10B4U, "abc\x65B0(def)"); // 9 characters, 10 bytes long ,Unicode character at the 4th location. sl@0: _LIT(KTestFileName9C10B4U_short,"ABC\x65B0(~1"); // Expected short name sl@0: _LIT(KTestFileName9C10B5U, "abcd\x65B0(ef)"); // 9 characters, 10 bytes long ,Unicode character at the 6th location. sl@0: _LIT(KTestFileName9C10B5U_short,"ABCD\x65B0~1"); // Expected short name sl@0: _LIT(KTestFileName9C10B6U, "abcde\x65B0(f)"); // 9 characters, 10 bytes long ,repeat Unicode character at the 6th location. sl@0: _LIT(KTestFileName9C10B6U_short,"ABCDE~1"); // Expected short name sl@0: sl@0: // Test file creation and long/short name generation sl@0: doFileNameTest(KTestFileName7C8B2U, KTestFileName7C8B2U_short); sl@0: doFileNameTest(KTestFileName9C10B3U, KTestFileName9C10B3U_short); sl@0: doFileNameTest(KTestFileName9C10B4U, KTestFileName9C10B4U_short); sl@0: doFileNameTest(KTestFileName9C10B5U, KTestFileName9C10B5U_short); sl@0: doFileNameTest(KTestFileName9C10B6U, KTestFileName9C10B6U_short); sl@0: sl@0: doDirNameTest(KTestFileName7C8B2U, KTestFileName7C8B2U_short); sl@0: doDirNameTest(KTestFileName9C10B3U, KTestFileName9C10B3U_short); sl@0: doDirNameTest(KTestFileName9C10B4U, KTestFileName9C10B4U_short); sl@0: doDirNameTest(KTestFileName9C10B5U, KTestFileName9C10B5U_short); sl@0: doDirNameTest(KTestFileName9C10B6U, KTestFileName9C10B6U_short); sl@0: #else sl@0: test.Printf(_L("Test only runs on DEBUG builds, see test logs of debug builds for details.")); sl@0: #endif // _DEBUG) || _DEBUG_RELEASE sl@0: } sl@0: sl@0: //---------------------------------------------------------------------------------------------- sl@0: //! @SYMTestCaseID PBASE-t_fatcharsetconv-0409 sl@0: //! @SYMTestType CIT sl@0: //! @SYMDEF DEF101875 INC100580 sl@0: //! @SYMTestCaseDesc This test case is to test creation of files with their Unicode names are sl@0: //! duplicate to existing files. sl@0: //! @SYMTestActions 1. Creates a file with its name contains 4 Unicode characters but occupies sl@0: //! 8 bytes ("\x65B0\x6587\x4EF6\x4EF6"), check for creation; sl@0: //! 2. Creates a file with 11 bytes' long Unicode name and first 8 bytes are sl@0: //! identical with the file created in Action 1 ("\x65B0\x6587\x4EF6\x4EF6(A)"), sl@0: //! check for file creation; sl@0: //! 3. Gets the short name of the file created in Action 2, compares it with sl@0: //! expected short name ("\x65B0\x6587\x4EF6~1"), gets the long name of this sl@0: //! file and compares it with its original Unicode name; sl@0: //! 4. Creates a file with 12 bytes' long Unicode name and first 8 bytes are sl@0: //! identical with the file created in Action 1 and Action 2 sl@0: //! ("\x65B0\x6587\x4EF6\x4EF6(AB)"), check for file creation; sl@0: //! 5. Gets the short name of the file created in Action 4, compares it with sl@0: //! expected values ("\x65B0\x6587\x4EF6~2"), gets the long name of this file sl@0: //! and compares it with its original Unicode name; sl@0: //! @SYMTestExpectedResults sl@0: //! 1. File creation should return KErrNone; sl@0: //! 2. File creation should return KErrNone; sl@0: //! 3. Comparisons should return 0; sl@0: //! 4. File creation should return KErrNone; sl@0: //! 5. Comparisons should return 0; sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestStatus Implemented sl@0: //---------------------------------------------------------------------------------------------- sl@0: void TestDuplicateLongFileNames() sl@0: { sl@0: test.Next(_L("Testing tilde and numbers (\"~n\") are applied correctly for multiple long-named files")); sl@0: #if defined(_DEBUG) || defined(_DEBUG_RELEASE) sl@0: TInt r = UserSvr::ChangeLocale(KTestLocale); sl@0: test_KErrNone(r); sl@0: sl@0: // These are to test "~1", "~2" behaviours when the first 8 bytes of new files sl@0: // are identical with existing files sl@0: _LIT(KTestFileName4C8B, "\x65B0\x6587\x4EF6\x4EF6.TXT"); sl@0: _LIT(KTestFileName7C11B, "\x65B0\x6587\x4EF6\x4EF6(A).TXT"); sl@0: _LIT(KTestFileName7C11B_short, "\x65B0\x6587\x4EF6~1.TXT"); sl@0: _LIT(KTestFileName8C12B, "\x65B0\x6587\x4EF6\x4EF6(AB).TXT"); sl@0: _LIT(KTestFileName8C12B_short, "\x65B0\x6587\x4EF6~2.TXT"); sl@0: sl@0: //////////////////////////////////////// sl@0: // 1. Test duplicate long file names sl@0: //////////////////////////////////////// sl@0: TFileName sn; sl@0: sl@0: MakeFile(KTestFileName4C8B); sl@0: MakeFile(KTestFileName7C11B); sl@0: sl@0: r = TheFs.GetShortName(KTestFileName7C11B, sn); sl@0: test_KErrNone(r); sl@0: r = sn.Compare(KTestFileName7C11B_short); sl@0: test_Equal(r, 0); sl@0: sl@0: sl@0: MakeFile(KTestFileName8C12B); sl@0: sl@0: r = TheFs.GetShortName(KTestFileName8C12B, sn); sl@0: test_KErrNone(r); sl@0: r = sn.Compare(KTestFileName8C12B_short); sl@0: test_Equal(r, 0); sl@0: sl@0: test_KErrNone(TheFs.Delete(KTestFileName4C8B)); sl@0: test_KErrNone(TheFs.Delete(KTestFileName7C11B)); sl@0: test_KErrNone(TheFs.Delete(KTestFileName8C12B)); sl@0: sl@0: #else sl@0: test.Printf(_L("Test only runs on DEBUG builds, see test logs of debug builds for details.")); sl@0: #endif // _DEBUG) || _DEBUG_RELEASE sl@0: } sl@0: sl@0: sl@0: //---------------------------------------------------------------------------------------------- sl@0: //! @SYMTestCaseID PBASE-t_fatcharsetconv-0410 sl@0: //! @SYMTestType CIT sl@0: //! @SYMDEF DEF101875 INC100580 sl@0: //! @SYMTestCaseDesc This test case is to test creation of directories with their Unicode names are sl@0: //! duplicate to existing directories . sl@0: //! @SYMTestActions 1. Creates a directories with its name contains 4 Unicode characters but occupies sl@0: //! 8 bytes ("\x65B0\x6587\x4EF6\x4EF6"), check for creation; sl@0: //! 2. Creates a directories with 11 bytes' long Unicode name and first 8 bytes are sl@0: //! identical with the directories created in Action 1 ("\x65B0\x6587\x4EF6\x4EF6(A)"), sl@0: //! check for file creation; sl@0: //! 3. Gets the short name of the directories created in Action 2, compares it with sl@0: //! expected short name ("\x65B0\x6587\x4EF6~1"), gets the long name of this sl@0: //! directories and compares it with its original Unicode name; sl@0: //! 4. Creates a directories with 12 bytes' long Unicode name and first 8 bytes are sl@0: //! identical with the directories created in Action 1 and Action 2 sl@0: //! ("\x65B0\x6587\x4EF6\x4EF6(AB)"), check for directories creation; sl@0: //! 5. Gets the short name of the directories created in Action 4, compares it with sl@0: //! expected values ("\x65B0\x6587\x4EF6~2"), gets the long name of this directories sl@0: //! and compares it with its original Unicode name; sl@0: //! @SYMTestExpectedResults sl@0: //! 1. Dir creation should return KErrNone; sl@0: //! 2. Dir creation should return KErrNone; sl@0: //! 3. Comparisons should return 0; sl@0: //! 4. Dir creation should return KErrNone; sl@0: //! 5. Comparisons should return 0; sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestStatus Implemented sl@0: //---------------------------------------------------------------------------------------------- sl@0: void TestDuplicateLongDirNames() sl@0: { sl@0: test.Next(_L("Testing tilde and number appended correctly for duplicate long name dirs")); sl@0: #if defined(_DEBUG) || defined(_DEBUG_RELEASE) sl@0: TheFs.SessionPath(gSessionPath); sl@0: TInt r = UserSvr::ChangeLocale(KTestLocale); sl@0: test_KErrNone(r); sl@0: sl@0: // These are to test "~1", "~2" behaviours when the first 8 bytes of new directories sl@0: // are identical with existing directories sl@0: _LIT(KTestDirName4C8B, "\\F32-TST\\T_LOCALEUTILS_CP932\\\x65B0\x6587\x4EF6\x4EF6\\"); sl@0: _LIT(KTestDirName7C11B, "\\F32-TST\\T_LOCALEUTILS_CP932\\\x65B0\x6587\x4EF6\x4EF6(A)\\"); sl@0: _LIT(KTestDirName7C11B_short, "\x65B0\x6587\x4EF6~1"); sl@0: _LIT(KTestDirName8C12B, "\\F32-TST\\T_LOCALEUTILS_CP932\\\x65B0\x6587\x4EF6\x4EF6(AB)\\"); sl@0: _LIT(KTestDirName8C12B_short, "\x65B0\x6587\x4EF6~2"); sl@0: sl@0: // Create 1st file with 8 bytes long/short name sl@0: MakeDir(KTestDirName4C8B); sl@0: MakeDir(KTestDirName7C11B); sl@0: TFileName sn; sl@0: sl@0: r = TheFs.GetShortName(KTestDirName7C11B, sn); sl@0: test_KErrNone(r); sl@0: r = sn.Compare(KTestDirName7C11B_short); sl@0: test_Equal(r, 0); sl@0: sl@0: MakeDir(KTestDirName8C12B); sl@0: sl@0: r = TheFs.GetShortName(KTestDirName8C12B, sn); sl@0: test_KErrNone(r); sl@0: r = sn.Compare(KTestDirName8C12B_short); sl@0: test_Equal(r, 0); sl@0: sl@0: #else sl@0: test.Printf(_L("Test only runs on DEBUG builds, see test logs of debug builds for details.")); sl@0: #endif // _DEBUG) || _DEBUG_RELEASE sl@0: } sl@0: sl@0: //---------------------------------------------------------------------------------------------- sl@0: //! @SYMTestCaseID PBASE-t_fatcharsetconv-0791 sl@0: //! @SYMTestType CIT sl@0: //! @SYMDEF DEF117345 sl@0: //! @SYMTestCaseDesc This test case is to test short name with 'E5' as the leading byte is correctly sl@0: //! handled on FAT implementations sl@0: //! @SYMTestActions 1. Creates a file with unicode long name "\x88F9.TXT", it will be converted into sl@0: //! "\xE5E5.TXT" according to codepage 932 when creating short name. sl@0: //! 2. Gets the short name and compare it with its original unicode "\x88F9.TXT", make sl@0: //! sure the conversion "\xE5E5.TXT" has been handled correctly sl@0: //! @SYMTestExpectedResults sl@0: //! 1. Comparisons should return 0; sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestStatus Implemented sl@0: //---------------------------------------------------------------------------------------------- sl@0: void TestLeadingE5Handling() sl@0: { sl@0: test.Next(_L("Test Leading \'E5\' byte handling (DEF117345)")); sl@0: #if defined(_DEBUG) || defined(_DEBUG_RELEASE) sl@0: TheFs.SessionPath(gSessionPath); sl@0: TInt r = UserSvr::ChangeLocale(KTestLocale); sl@0: test_KErrNone(r); sl@0: sl@0: _LIT(KTestFilePathAndName, "\\F32-TST\\T_LOCALEUTILS_CP932\\\x88F9.TXT"); sl@0: _LIT(KTestFileShortName, "\x88F9.TXT"); sl@0: sl@0: MakeFile(KTestFilePathAndName); sl@0: TFileName sn; sl@0: r = TheFs.GetShortName(KTestFilePathAndName, sn); sl@0: test_KErrNone(r); sl@0: r = sn.Compare(KTestFileShortName); sl@0: test_Equal(r, 0); sl@0: sl@0: #else sl@0: test.Printf(_L("Test only runs on DEBUG builds, see test logs of debug builds for details.")); sl@0: #endif // _DEBUG) || _DEBUG_RELEASE sl@0: } sl@0: //---------------------------------------------------------------------------------------------- sl@0: //! @SYMTestCaseID PBASE-t_fatcharsetconv-2320 sl@0: //! @SYMTestType CIT sl@0: //! @SYMDEF PDEF130334 sl@0: //! @SYMTestCaseDesc This test case is to test creating a file with "\u3005" name correctly sl@0: //! @SYMTestActions 1. Creates a file with unicode long name "\u3005.TXT" sl@0: //! 2. Gets the short name and compare it with its original unicode "\u3005.TXT" sl@0: //! 3. Gets the long name and compare it with its original unicode "\u3005.TXT" sl@0: //! @SYMTestExpectedResults sl@0: //! 1. Comparisons should return 0; sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestStatus Implemented sl@0: //---------------------------------------------------------------------------------------------- sl@0: void TestDEF130334() sl@0: { sl@0: test.Next(_L("Test creating a file with \\x3005 name correctly (DEF128521)")); sl@0: #if defined(_DEBUG) || defined(_DEBUG_RELEASE) sl@0: TheFs.SessionPath(gSessionPath); sl@0: TInt r = UserSvr::ChangeLocale(KTestLocale); sl@0: test_KErrNone(r); sl@0: sl@0: _LIT(KTestFilePathAndName, "\\F32-TST\\T_LOCALEUTILS_CP932\\\x3005.TXT"); sl@0: _LIT(KTestFileName, "\x3005.TXT"); sl@0: sl@0: MakeFile(KTestFilePathAndName); sl@0: TFileName sn; sl@0: r = TheFs.GetShortName(KTestFilePathAndName, sn); sl@0: test_KErrNone(r); sl@0: r = sn.Compare(KTestFileName); sl@0: test_Equal(r, 0); sl@0: TFileName ln; sl@0: r = TheFs.GetLongName(KTestFilePathAndName, ln); sl@0: test_KErrNone(r); sl@0: r = ln.Compare(KTestFileName); sl@0: test_Equal(r, 0); sl@0: sl@0: #else sl@0: test.Printf(_L("Test only runs on DEBUG builds, see test logs of debug builds for details.")); sl@0: #endif sl@0: } sl@0: //---------------------------------------------------------------------------------------------- sl@0: //! @SYMTestCaseID PBASE-t_fatcharsetconv-1359 sl@0: //! @SYMTestType CIT sl@0: //! @SYMDEF INC125768 sl@0: //! @SYMTestCaseDesc This test case is to test the compatibility of file opening, to make sure files sl@0: //! with only one DOS entry which contains unicode short name is accessible on Symbian OS sl@0: //! from version 9.3 onwards. sl@0: //! @SYMTestActions Manually creates a single entried, unicode named file under root direcotry, then sl@0: //! access it via RFs::Entry() API using its uniocde name. Check the entry is accessible. sl@0: //! @SYMTestExpectedResults sl@0: //! RFs::Entry() should return with KErrNone; sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestStatus Implemented sl@0: //---------------------------------------------------------------------------------------------- sl@0: void TestCompatibility() sl@0: { sl@0: test.Next(_L("test file opening compatibility")); sl@0: #if defined(_DEBUG) || defined(_DEBUG_RELEASE) sl@0: GetBootInfo(); sl@0: sl@0: RFile file; sl@0: TFileName fn = _L("\\ABCD"); sl@0: sl@0: TInt r=file.Create(TheFs,fn,EFileRead); sl@0: test(r==KErrNone); sl@0: file.Close(); sl@0: sl@0: // Assume this file is the first entry in the root directory sl@0: r=TheDisk.Open(TheFs,CurrentDrive()); sl@0: test(r==KErrNone); sl@0: sl@0: //-- read the 1st dir entry, it should be a DOS entry sl@0: const TInt posEntry1=gBootSector.RootDirStartSector() << KDefaultSectorLog2; //-- dir entry1 position sl@0: sl@0: TFatDirEntry fatEntry1; sl@0: TPtr8 ptrEntry1((TUint8*)&fatEntry1,sizeof(TFatDirEntry)); sl@0: test(TheDisk.Read(posEntry1, ptrEntry1)==KErrNone); sl@0: test(!fatEntry1.IsVFatEntry()); sl@0: sl@0: // Manually modify the short name into unicode characters sl@0: // Unicode: 0x(798F 5C71 96C5 6CBB) sl@0: // Shift-JIS: 0x(959F 8E52 89EB 8EA1) sl@0: sl@0: TBuf8<8> unicodeSN = _L8("ABCD1234"); sl@0: unicodeSN[0] = 0x95; sl@0: unicodeSN[1] = 0x9F; sl@0: unicodeSN[2] = 0x8E; sl@0: unicodeSN[3] = 0x52; sl@0: unicodeSN[4] = 0x89; sl@0: unicodeSN[5] = 0xEB; sl@0: unicodeSN[6] = 0x8E; sl@0: unicodeSN[7] = 0xA1; sl@0: sl@0: fatEntry1.SetName(unicodeSN); sl@0: test(TheDisk.Write(posEntry1, ptrEntry1)==KErrNone); sl@0: TheDisk.Close(); sl@0: sl@0: // Access the file using its unicode file name sl@0: r = UserSvr::ChangeLocale(KTestLocale); sl@0: test_KErrNone(r); sl@0: sl@0: fn = _L("\\ABCD"); sl@0: fn[1] = 0x798F; sl@0: fn[2] = 0x5C71; sl@0: fn[3] = 0x96C5; sl@0: fn[4] = 0x6CBB; sl@0: sl@0: TEntry entry; sl@0: TInt err = TheFs.Entry(fn, entry); sl@0: test(err==KErrNone); sl@0: err = TheFs.Delete(fn); sl@0: test(err==KErrNone); sl@0: #else sl@0: test.Printf(_L("Test only runs on DEBUG builds, see test logs of debug builds for details.")); sl@0: #endif // _DEBUG) || _DEBUG_RELEASE sl@0: } sl@0: sl@0: //---------------------------------------------------------------------------------------------- sl@0: //! @SYMTestCaseID PBASE-t_fatcharsetconv-1395 sl@0: //! @SYMTestType CIT sl@0: //! @SYMDEF INC126563 sl@0: //! @SYMTestCaseDesc This test case is to test the definition of valid DOS characters on Symbian sl@0: //! FAT/FAT32 complies with FAT Spec. sl@0: //! @SYMTestActions Manually creates a file with "0x7F" characters in its name, then check it can sl@0: //! ben accessed successfully. sl@0: //! @SYMTestExpectedResults sl@0: //! RFs::Entry() should return with KErrNone; sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestStatus Implemented sl@0: //---------------------------------------------------------------------------------------------- sl@0: void TestINC126563() sl@0: { sl@0: test.Next(_L("Test INC126563: FAT/FAT32: unable to open or delete file whose name contains illegal characters")); sl@0: #if defined(_DEBUG) || defined(_DEBUG_RELEASE) sl@0: GetBootInfo(); sl@0: sl@0: RFile file; sl@0: TFileName fn = _L("\\AB"); sl@0: sl@0: test.Next(_L("create file \"AB\" under root directory")); sl@0: TInt r=file.Create(TheFs,fn,EFileRead); sl@0: test(r==KErrNone); sl@0: file.Close(); sl@0: sl@0: test.Next(_L("manually change file name to \"0x7F0x450x7F0x45\" via raw disk accessing")); sl@0: // Assume this file is the first entry in the root directory sl@0: r=TheDisk.Open(TheFs,CurrentDrive()); sl@0: test(r==KErrNone); sl@0: sl@0: //-- read the first dir entry, it should be a DOS entry sl@0: const TInt posEntry1=gBootSector.RootDirStartSector() << KDefaultSectorLog2; //-- dir entry1 position sl@0: sl@0: TFatDirEntry fatEntry1; sl@0: TPtr8 ptrEntry1((TUint8*)&fatEntry1,sizeof(TFatDirEntry)); sl@0: test(TheDisk.Read(posEntry1, ptrEntry1)==KErrNone); sl@0: test(!fatEntry1.IsVFatEntry()); sl@0: sl@0: TBuf8<8> unicodeSN = _L8("ABCD"); sl@0: unicodeSN[0] = 0x7F; sl@0: unicodeSN[1] = 0x45; sl@0: unicodeSN[2] = 0x7F; sl@0: unicodeSN[3] = 0x45; sl@0: sl@0: fatEntry1.SetName(unicodeSN); sl@0: test(TheDisk.Write(posEntry1, ptrEntry1)==KErrNone); sl@0: TheDisk.Close(); sl@0: sl@0: // Access the file using its unicode file name sl@0: r = UserSvr::ChangeLocale(KTestLocale); sl@0: test(KErrNone==r); sl@0: sl@0: test.Next(_L("access entries under root directory via RDir::Open()")); sl@0: RDir dir; sl@0: r = dir.Open(TheFs, _L("\\"), KEntryAttNormal); sl@0: test(KErrNone == r); sl@0: TEntryArray entryArray; sl@0: r = dir.Read(entryArray); sl@0: test(entryArray.Count()==1); sl@0: TBuf<0x10> name; sl@0: TEntry entry; sl@0: entry = entryArray[0]; sl@0: test.Printf(_L("entryArray[0] = \"%S\"\n"), &entry.iName); sl@0: name = entry.iName; sl@0: dir.Close(); sl@0: sl@0: TFileName fullname= _L("\\"); sl@0: fullname.Append(name); sl@0: sl@0: test.Next(_L("try to open or delete file entries retrieved")); sl@0: r = file.Open(TheFs, fullname, EFileRead); sl@0: test(KErrNone == r); sl@0: file.Close(); sl@0: sl@0: r = TheFs.Delete(fullname); sl@0: test(KErrNone == r); sl@0: #else sl@0: test.Printf(_L("Test only runs on DEBUG builds, see test logs of debug builds for details.")); sl@0: #endif // _DEBUG) || _DEBUG_RELEASE sl@0: } sl@0: sl@0: //---------------------------------------------------------------------------------------------- sl@0: //! @SYMTestCaseID PBASE-t_fatcharsetconv-1402 sl@0: //! @SYMTestType CIT sl@0: //! @SYMDEF INC127905 sl@0: //! @SYMTestCaseDesc This test case is to test RFs::ScanDrive() does not incorrectly remove files sl@0: //! with unicode short file names. sl@0: //! @SYMTestActions Creates a file with unicode file names then check if the file is still accessible sl@0: //! after scandrive operations. sl@0: //! @SYMTestExpectedResults sl@0: //! RFs::Delete() should return with KErrNone; sl@0: //! @SYMTestPriority High sl@0: //! @SYMTestStatus Implemented sl@0: //---------------------------------------------------------------------------------------------- sl@0: void TestINC127905() sl@0: { sl@0: test.Next(_L("Test INC127905: Unicode name file deleted after Scandrive")); sl@0: #if defined(_DEBUG) || defined(_DEBUG_RELEASE) sl@0: TFileName fn = _L("ABCDE"); sl@0: fn[0] = 0x3055; sl@0: fn[1] = 0x307E; sl@0: fn[2] = 0x3056; sl@0: fn[3] = 0x307E; sl@0: fn[4] = 0x306A; sl@0: sl@0: TInt r = UserSvr::ChangeLocale(KTestLocale); sl@0: test(KErrNone==r); sl@0: sl@0: MakeFile(fn); sl@0: sl@0: _LIT(KShortName, "\x3055\x307E\x3056~1"); sl@0: TFileName sn; sl@0: r = TheFs.GetShortName(fn, sn); sl@0: test(r==KErrNone); sl@0: r = sn.Compare(KShortName); sl@0: test(r==0); sl@0: sl@0: r = TheFs.ScanDrive(_L("gSessionPath")); sl@0: test(r==KErrNone); sl@0: sl@0: r = TheFs.Delete(fn); sl@0: test(r == KErrNone); sl@0: #else sl@0: test.Printf(_L("Test only runs on DEBUG builds, see test logs of debug builds for details.")); sl@0: #endif // _DEBUG) || _DEBUG_RELEASE sl@0: } sl@0: sl@0: void CallTestsL(void) sl@0: { sl@0: sl@0: test.Title(); sl@0: test.Start(_L("Starting T_LOCALEUTILS_CP932 tests")); sl@0: sl@0: #if defined(_DEBUG) || defined(_DEBUG_RELEASE) sl@0: sl@0: // Test only runs on Fat file systems sl@0: TheFs.SessionPath(gSessionPath); sl@0: TInt driveNum = CurrentDrive(); sl@0: TFSName name; sl@0: TInt r = TheFs.FileSystemName(name, driveNum); sl@0: if (KErrNone == r) sl@0: { sl@0: if (name.Compare(_L("Fat")) != 0) sl@0: { sl@0: test.Printf(_L("Test only runs on 'Fat' drives")); sl@0: } sl@0: else sl@0: { sl@0: // Enables codepage dll implementation of LocaleUtils functions for this test only sl@0: r = TheFs.ControlIo(driveNum, KControlIoEnableFatUtilityFunctions); sl@0: test_KErrNone(r); sl@0: sl@0: CreateTestDirectory(_L("\\F32-TST\\T_LOCALEUTILS_CP932\\")); sl@0: TestBeforeFATCharsetConvInteg(); sl@0: TestUnicodeVolumeLabel(); sl@0: TestShortNameBoundary(); sl@0: TestConsistentShortNameGeneration(); sl@0: TestConsistentShortNameExtGeneration(); sl@0: TestDuplicateLongFileNames(); sl@0: TestDuplicateLongDirNames(); sl@0: TestLeadingE5Handling(); sl@0: TestDEF130334(); sl@0: TestINC127905(); sl@0: DeleteTestDirectory(); sl@0: sl@0: TestCompatibility(); sl@0: TestINC126563(); sl@0: // Disables codepage dll implementation of LocaleUtils functions for other base tests sl@0: r = TheFs.ControlIo(driveNum, KControlIoDisableFatUtilityFunctions); sl@0: test_KErrNone(r); sl@0: } sl@0: } sl@0: else sl@0: { sl@0: test.Printf(_L("Drive %C: is not ready!"), 'A'+driveNum); sl@0: test(EFalse); sl@0: } sl@0: #else sl@0: test.Printf(_L("Test only runs on DEBUG builds, see test logs of debug builds for details.")); sl@0: #endif // _DEBUG) || _DEBUG_RELEASE sl@0: test.End(); sl@0: }