From 7952fa540280c27eddd04f7e5b4ed536965e289f Mon Sep 17 00:00:00 2001 From: Dennis Haney Date: Fri, 27 Oct 2023 16:50:44 +0700 Subject: [PATCH] fix: unittest success on linux --- .../Catglobe.ResXFileCodeGenerator.Tests.csproj | 2 +- Catglobe.ResXFileCodeGenerator.Tests/SettingsTests.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Catglobe.ResXFileCodeGenerator.Tests/Catglobe.ResXFileCodeGenerator.Tests.csproj b/Catglobe.ResXFileCodeGenerator.Tests/Catglobe.ResXFileCodeGenerator.Tests.csproj index e494b4a..4d18a14 100644 --- a/Catglobe.ResXFileCodeGenerator.Tests/Catglobe.ResXFileCodeGenerator.Tests.csproj +++ b/Catglobe.ResXFileCodeGenerator.Tests/Catglobe.ResXFileCodeGenerator.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 false latest enable diff --git a/Catglobe.ResXFileCodeGenerator.Tests/SettingsTests.cs b/Catglobe.ResXFileCodeGenerator.Tests/SettingsTests.cs index c181e92..082373a 100644 --- a/Catglobe.ResXFileCodeGenerator.Tests/SettingsTests.cs +++ b/Catglobe.ResXFileCodeGenerator.Tests/SettingsTests.cs @@ -122,6 +122,7 @@ public void FileDefaults() [InlineData(@"ProjectFolder\8 project.csproj", @"ProjectFolder\Path1.resx", "", "_8_project", "_8_project.Path1")] [InlineData(@"ProjectFolder\8 project.csproj", @"ProjectFolder\SubFolder\Path1.resx", null, "SubFolder", "SubFolder.Path1")] [InlineData(@"ProjectFolder\8 project.csproj", @"ProjectFolder\SubFolder\Path1.resx", "", "SubFolder", "SubFolder.Path1")] + public void FileSettings_RespectsEmptyRootNamespace( string msBuildProjectFullPath, string mainFile, @@ -130,6 +131,8 @@ public void FileSettings_RespectsEmptyRootNamespace( string expectedEmbeddedFilename ) { + msBuildProjectFullPath = msBuildProjectFullPath.Replace('\\', Path.DirectorySeparatorChar); + mainFile = mainFile.Replace('\\', Path.DirectorySeparatorChar); var fileOptions = FileOptions.Select( file: new GroupedAdditionalFile( mainFile: new AdditionalTextWithHash(new AdditionalTextStub(mainFile), Guid.NewGuid()),