From 1eb00ae94855f10612aa79cf669e0c73cf75fa93 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 31 Mar 2021 11:35:04 -0500 Subject: Fix Heat tests and run BuildTask tests. --- appveyor.cmd | 2 ++ src/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/appveyor.cmd b/appveyor.cmd index 0cf8062c..98506de8 100644 --- a/appveyor.cmd +++ b/appveyor.cmd @@ -12,6 +12,8 @@ nuget restore || exit /b msbuild -p:Configuration=%_C% || exit /b :: Test +dotnet test -c %_C% --no-build src\test\WixToolsetTest.BuildTasks || exit /b + dotnet publish -c %_C% -o %_P%\dotnet-wix\ -f netcoreapp2.1 src\wix || exit /b dotnet publish -c %_C% -o %_P%\WixToolset.Sdk\separate\net461\x86\buildtasks\ -f net461 -r win-x86 src\WixToolset.BuildTasks || exit /b diff --git a/src/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs b/src/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs index 10840c56..8b2e8e3d 100644 --- a/src/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs +++ b/src/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs @@ -66,7 +66,7 @@ namespace WixToolsetTest.Sdk var section = intermediate.Sections.Single(); var fileSymbol = section.Symbols.OfType().Single(); - Assert.Equal(@"SourceDir\HeatFilePackage.wixproj", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path); + Assert.Equal(@"SourceDir\HeatFilePackage.wixproj", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath()?.Path); } } @@ -142,8 +142,8 @@ namespace WixToolsetTest.Sdk var section = intermediate.Sections.Single(); var fileSymbols = section.Symbols.OfType().ToArray(); - Assert.Equal(@"SourceDir\MyProgram.txt", fileSymbols[0][FileSymbolFields.Source].PreviousValue.AsPath().Path); - Assert.Equal(@"SourceDir\MyProgram.json", fileSymbols[1][FileSymbolFields.Source].PreviousValue.AsPath().Path); + Assert.Equal(@"SourceDir\MyProgram.txt", fileSymbols[0][FileSymbolFields.Source].PreviousValue.AsPath()?.Path); + Assert.Equal(@"SourceDir\MyProgram.json", fileSymbols[1][FileSymbolFields.Source].PreviousValue.AsPath()?.Path); } } @@ -253,7 +253,7 @@ namespace WixToolsetTest.Sdk var section = intermediate.Sections.Single(); var fileSymbol = section.Symbols.OfType().Single(); - Assert.Equal(Path.Combine(fs.BaseFolder, "ToolsVersion4Cs", "bin", "Release\\\\ToolsVersion4Cs.dll"), fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path); + Assert.Equal(Path.Combine(fs.BaseFolder, "ToolsVersion4Cs", "bin", "Release\\\\ToolsVersion4Cs.dll"), fileSymbol[FileSymbolFields.Source].AsPath()?.Path); } } @@ -368,7 +368,7 @@ namespace WixToolsetTest.Sdk var section = intermediate.Sections.Single(); var fileSymbol = section.Symbols.OfType().Single(); - Assert.Equal(Path.Combine(fs.BaseFolder, "SdkStyleCs", "bin", "Release", "netstandard2.0\\\\SdkStyleCs.dll"), fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path); + Assert.Equal(Path.Combine(fs.BaseFolder, "SdkStyleCs", "bin", "Release", "netstandard2.0\\\\SdkStyleCs.dll"), fileSymbol[FileSymbolFields.Source].AsPath()?.Path); } } } -- cgit v1.2.3-55-g6feb