Skip to content

Cover the CLI's run and output paths #818

Description

@jackfirth

Follow-up to #724: the argument parsers are tested now, but cli.rkt is still at 68.6% coverage (114 missed lines) because none of the run functions are. Untested: the resyntax-run command dispatch, all of resyntax-analyze-run including the plain-text display and --output-to-file, and the fix output printers (--output-as-commit-message, --output-as-json, and most of the plain-text summary).

The existing "resyntax fix modifies files" test shows the pattern to follow: parameterize current-command-line-arguments and current-output-port, run against a temp file, and assert on the captured output. An analyze equivalent would also transitively cover the untested code snippet accessors in refactoring-result.rkt (#815) and several untested limiting branches in main.rkt.

Part of #680.

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingTests and testing tools

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions