Skip to content

Add UnitTests #13

Open
Open

Description

@michael-hawker

We should have more robust Unit Tests that we can run in the CI pipeline (like the main Toolkit repo has now).

Activity

  1. added this to the 8.0.0 milestone on Aug 24, 2022
  2. sandrock commented on Sep 15, 2026

    @sandrock

    I took a run at this in #47 — a first cross-platform xUnit suite for ColorCode.Core: registry / regex-compile smoke tests, a cross-language "malformed input doesn't hang" robustness net, and HtmlClassFormatter output tests. I kept the assertions structural rather than golden-markup so they don't turn brittle.

    Two things I'd value your steer on before going further:

    • Scope — is this the right shape and depth for what you had in mind, or would you want it broader (per-language golden output, more formatters, etc.)?
    • CI — I left the pipeline alone (looks like Azure Pipelines via TF_BUILD); happy to wire in a dotnet test step wherever you'd want it.

    Side note: the robustness net immediately caught a catastrophic-backtracking (ReDoS) bug in the Koka string rules, which the PR also fixes.

    Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

  3. michael-hawker commented on Oct 22, 2026

    @michael-hawker
    MemberAuthor

    I had forgotten to note in the past from the investigation during relicensing in #20, that it looks like the original port from the CodePlex archive didn't bring over the original framework agnostic tests and test data.

    IIRC, there's a commit in the history that still has that data. There's an old original shadow copy from CodePlex here too: https://github.com/Code52/ColourCode - though that's still under the MS-PL and has had some changes, so may not be easy to copy. But if we find it in the history or from an original archive from CodePlex, then we have all the authors permissions on that source, so we could relift it back to bring back in.

    Ah, found it, they were deleted in this commit here, so the first step could be to bring them back (reverting that commit may be messier than it's worth, but just browse before that and pull files over and update): d0cb635

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions