Skip to content

Commit

Permalink
Tweak SpecFileGen paths
Browse files Browse the repository at this point in the history
  • Loading branch information
MihaZupan committed Nov 30, 2024
1 parent 455f8f3 commit 4078173
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
14 changes: 7 additions & 7 deletions src/Markdig.Tests/Markdig.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;net6.0;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>13.0</LangVersion>
<StartupObject>Markdig.Tests.Program</StartupObject>
<SpecExecutable>$(MSBuildProjectDirectory)\..\SpecFileGen\bin\$(Configuration)\net8.0\SpecFileGen.dll</SpecExecutable>
<SpecTimestamp>$(MSBuildProjectDirectory)\..\SpecFileGen\bin\$(Configuration)\net8.0\SpecFileGen.timestamp</SpecTimestamp>
<SpecExecutable>$(MSBuildProjectDirectory)\..\SpecFileGen\bin\$(Configuration)\$(TargetFramework)\SpecFileGen.dll</SpecExecutable>
<SpecTimestamp>$(MSBuildProjectDirectory)\..\SpecFileGen\bin\$(Configuration)\$(TargetFramework)\SpecFileGen.timestamp</SpecTimestamp>
</PropertyGroup>

<ItemGroup>
Expand All @@ -19,14 +19,14 @@

<ItemGroup>
<ProjectReference Include="..\Markdig\Markdig.csproj" />
<ProjectReference Include="..\SpecFileGen\SpecFileGen.csproj" />
</ItemGroup>

<ItemGroup>
<Using Include="NUnit.Framework" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net9.0'">
<ProjectReference Include="..\SpecFileGen\SpecFileGen.csproj" />
<ItemGroup>
<ItemSpecExecutable Include="$(SpecExecutable)" />
<InputSpecFiles Include="Specs\*.md" />
<InputSpecFiles Include="NormalizeSpecs\*.md" />
Expand All @@ -38,7 +38,7 @@
<OutputSpecFiles Include="@(InputSpecFiles->'%(RelativeDir)%(Filename).generated.cs')" />
</ItemGroup>

<Target Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net9.0'" Name="GeneratedSpecsFile" BeforeTargets="BeforeCompile;CoreCompile" Inputs="@(ItemSpecExecutable);@(InputSpecFiles)" Outputs="@(ItemSpecExecutable->'%(RelativeDir)%(Filename).timestamp');@(InputSpecFiles->'%(RelativeDir)%(Filename).generated.cs')">
<Target Name="GeneratedSpecsFile" BeforeTargets="BeforeCompile;CoreCompile" Inputs="@(ItemSpecExecutable);@(InputSpecFiles)" Outputs="@(ItemSpecExecutable->'%(RelativeDir)%(Filename).timestamp');@(InputSpecFiles->'%(RelativeDir)%(Filename).generated.cs')">
<Message Importance="high" Text="Regenerating Specs Files" />
<Exec Command="dotnet $(SpecExecutable)" />
<WriteLinesToFile File="$(SpecTimestamp)" Lines="$([System.DateTime]::Now)" />
Expand Down
2 changes: 1 addition & 1 deletion src/Markdig.Tests/TestContainerBlocks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public void CopyTo()
Assert.NotNull(destination[2]);
Assert.Null(destination[3]);

Array.Clear(destination, 0, destination.Length);
Array.Clear(destination);

container.Add(new ParagraphBlock());
container.CopyTo(destination, 1);
Expand Down
4 changes: 1 addition & 3 deletions src/Markdig.Tests/TestFastStringWriter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Text;
using Markdig.Helpers;

#if NET6_0_OR_GREATER
using Markdig.Helpers;

namespace Markdig.Tests;

Expand Down Expand Up @@ -185,4 +184,3 @@ public async Task Write_StringBuilder()
AssertToString("foobar\nbazfoo\nfoo" + new string('a', 1050));
}
}
#endif
2 changes: 1 addition & 1 deletion src/SpecFileGen/SpecFileGen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down

0 comments on commit 4078173

Please sign in to comment.