Skip to content

Commit eac93a4

Browse files
authored
Merge pull request #4162 from legrab/test_4157
Add Test for false AppendTargetFrameworkToOutputPath
2 parents 64f54c1 + 180ba6c commit eac93a4

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

tests/Paket.Tests/Paket.Tests.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
<TestAsset Include="ProjectFile\TestData\EmptyCsharpGuid.csprojtest" />
153153
<TestAsset Include="ProjectFile\TestData\MicrosoftNetSdkWithTargetFramework.csprojtest" />
154154
<TestAsset Include="ProjectFile\TestData\AnalyzerProject.csprojtest" />
155+
<TestAsset Include="ProjectFile\TestData\MicrosoftNetSdkWithOutputPathAndAppendTargetFrameworkFalse.csprojtest" />
155156
<Compile Include="ProjectFile\ConditionSpecs.fs" />
156157
<Compile Include="ProjectFile\TargetFrameworkSpecs.fs" />
157158
<Compile Include="ProjectFile\FileBuildActionSpecs.fs" />

tests/Paket.Tests/ProjectFile/OutputSpecs.fs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,15 @@ let ``should detect output path for netsdk with outputPath csproj file``
9393
let expected = (System.IO.Path.Combine(@"bin", configuration,"netstandard1.4_bin", target) |> normalizePath)
9494
outPath.ToLowerInvariant() |> shouldEqual (expected.ToLowerInvariant())
9595

96+
[<Test>]
97+
let ``should detect output path for netsdk with outputPath and appendTargetFrameworkToOutputPath false csproj file``
98+
([<Values("MicrosoftNetSdkWithOutputPathAndAppendTargetFrameworkFalse.csprojtest")>] project)
99+
([<Values("Release")>] configuration) =
100+
ensureDir ()
101+
let projectFile = ProjectFile.TryLoad(sprintf "./ProjectFile/TestData/%s" project).Value
102+
let outPath = projectFile.GetOutputDirectory configuration "" None
103+
let expected = (System.IO.Path.Combine(@"bin", configuration,"netstandard1.4_bin") |> normalizePath)
104+
outPath.ToLowerInvariant() |> shouldEqual (expected.ToLowerInvariant())
96105

97106
[<Test>]
98107
let ``should detect framework profile for ProjectWithConditions file`` () =
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<AssemblyName>TestPaket</AssemblyName>
5+
<TargetFramework>netstandard1.4</TargetFramework>
6+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
7+
</PropertyGroup>
8+
9+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
10+
<OutputPath>bin\Release\netstandard1.4_bin\</OutputPath>
11+
</PropertyGroup>
12+
</Project>

0 commit comments

Comments
 (0)