Skip to content

Commit

Permalink
Supports conditional compilation of a "test only" assembly for unit-t…
Browse files Browse the repository at this point in the history
…esting internal helper classes.
  • Loading branch information
springcomp committed Oct 22, 2019
1 parent 5ea0dd3 commit b154194
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions PSReadLine/PSReadLine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition="'$(UnitTests)' == 'yes'">
<DefineConstants>UNIT_TESTS</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<RuntimeFrameworkVersion>2.1.12</RuntimeFrameworkVersion>
</PropertyGroup>
Expand All @@ -18,6 +22,17 @@
<PackageReference Include="PowerShellStandard.Library" version="5.1.0-*" />
<PackageReference Include="Microsoft.CSharp" version="4.5.0-*" />
</ItemGroup>

<ItemGroup Condition="'$(UnitTests)' == 'yes'">
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Xunit.SkippableFact" Version="1.3.12" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="XunitXml.TestLogger" Version="2.1.26" />
</ItemGroup>

<ItemGroup>
<None Include="PSReadLine.psd1" />
<None Include="PSReadLine.psm1" />
Expand Down

0 comments on commit b154194

Please sign in to comment.