Skip to content

test: add negative and edge-case pass for all input parsers #166

@rocketman-code

Description

@rocketman-code

Context

Parent: #160

Two v0.4.0 bugs were caused by missing negative tests: unknown REPL flags silently ignored (#144) and cut_report returning vacuous-truth direct_import for missing targets (#151). The existing test suite is ~70% happy path.

Expected Behavior

For every input parser and query function, systematically test the failure modes.

Scope

  • parse_flags: unknown flags, flags with missing values, duplicate flags, empty input, flags-only (no positional arg)
  • Command::parse: unknown commands, empty input, command with only whitespace
  • classify_diff_arg: nonexistent files, invalid refs, empty string, special characters
  • Session query methods: nonexistent targets, self-referential targets (entry = target), empty graphs
  • cut_report: target not in graph, target is entry, target with no importers
  • chain_report: unreachable target, target is entry
  • parse_size: negative values, overflow, non-numeric, empty
  • All error variants: verify Display output and hint() for every Error enum variant

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priorityenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions