[Repo Assist] test: add ToFsx output-comment, ToPynb execution-output, and LaTeX block tests#1197
Draft
github-actions[bot] wants to merge 2 commits intomainfrom
Conversation
…ock tests Six new unit tests in Markdown.fs: - ToFsx emits output comment when code block is followed by OutputBlock - ToFsx does not emit output comment when code block has no output - ToPynb code block with output produces execution output in notebook - ToPynb empty document produces notebook with empty cells array - ToMd preserves multi-line LaTeX block with align environment - ToMd serialises single-line equation block as compact dollar-dollar notation All 352 tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
Six new unit tests covering previously untested code paths in the
Markdown.fstest file:ToFsx — code-with-output coverage
ToFsx emits output comment when code block is followed by an OutputBlockCodeBlockimmediately followed by anOutputBlockproduces(* output: ... *)in the.fsxoutputToFsx does not emit output comment when code block has no outputCodeBlock(no output) produces no(* output:markerThe
(* output: ... *)feature inFsxFormatting.fshad zero test coverage; these tests confirm the existing behaviour.ToPynb — execution-output coverage
ToPynb code block with output produces execution output in notebookCodeBlock+OutputBlockpair produces an"execute_result"output entry in the JSON notebookToPynb empty document produces notebook with empty cells array"nbformat"and"cells"ToMd — multi-line and equation LaTeX blocks
ToMd preserves multi-line LaTeX block with align environmentLatexBlock("align", ...)serialises as\begin{align}...\end{align}ToMd serialises single-line equation block as compact dollar-dollar notationLatexBlock("equation", ...)serialises as$$...$$, not\begin{equation}Test Status
dotnet build FSharp.Formatting.sln --configuration Release— succeeded (0 errors)dotnet test tests/FSharp.Markdown.Tests— 352/352 passed (includes 6 new tests)dotnet fantomas tests/FSharp.Markdown.Tests/Markdown.fs— formatted