コード例 #1
0
ファイル: PathConverterTest.cs プロジェクト: risinek/gitwrap
        public void TestConvertWSLPathToWindowsEquivalent()
        {
            // Example WSL Path
            string unixPath = "/mnt/c/Program Files (x86)/Microsoft Visual Studio/testfile.txt";

            // Equivalent Windows path
            string windowsPath = "C:\\Program Files (x86)\\Microsoft Visual Studio\\testfile.txt";

            string convertedPath = PathConverter.convertPathFromLinuxToWindows(unixPath);

            // assert correct conversion
            Assert.AreEqual(unixPath, PathConverter.convertPathFromLinuxToWindows(unixPath), false, "WSL path converted correctly to Windows equivalent.");
        }