Skip to content

Add UnitTests #13

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

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