diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f107db0..6e082b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,6 +50,11 @@ jobs: shell: pwsh run: ./build/build-explorer-menu.ps1 -Version ${{ steps.version.outputs.value }} + # Same engines as CI, so the release runs the same tests (they are not part of the installer). + - name: Fetch rhwp, Pandoc and 7-Zip for engine tests + shell: pwsh + run: ./build/fetch-engines.ps1 -Only rhwp,pandoc,7zip + - name: Test run: dotnet test Filee.slnx -c Release diff --git a/tests/Filee.Engines.Tests/PandocMarkupTests.cs b/tests/Filee.Engines.Tests/PandocMarkupTests.cs index e989e14..d97dd64 100644 --- a/tests/Filee.Engines.Tests/PandocMarkupTests.cs +++ b/tests/Filee.Engines.Tests/PandocMarkupTests.cs @@ -5,6 +5,7 @@ using Filee.Core.Conversion; using Filee.Core.Presets; using Filee.Engines.Hwp.Hwpx; +using Filee.Engines.Office; namespace Filee.Engines.Tests; @@ -56,9 +57,12 @@ public void Markup_routes() var planner = fx.Catalog.CreatePlanner(["pandoc"]); foreach (var (from, to) in new[] { ("rst", "docx"), ("rst", "md"), ("tex", "html"), ("tex", "epub"), ("md", "rst"), ("docx", "tex") }) Assert.Equal("pandoc", Assert.Single(planner.Plan(from, to)!.Steps).Converter.Id); + Assert.DoesNotContain(fx.Converters.Single(c => c.Id == "pandoc").Edges, e => e.To == "pdf"); + + // The HWPX writer offers its Pandoc-based readers only when Pandoc is really there (not just assumed). + Assert.SkipUnless(PandocConverter.Locate() is not null, "Pandoc not found (pwsh build/fetch-engines.ps1 -Only pandoc)"); Assert.Equal("hwpx-writer", Assert.Single(planner.Plan("rst", "hwpx")!.Steps).Converter.Id); Assert.Equal("hwpx-writer", Assert.Single(planner.Plan("tex", "hwpx")!.Steps).Converter.Id); - Assert.DoesNotContain(fx.Converters.Single(c => c.Id == "pandoc").Edges, e => e.To == "pdf"); } [Fact]