Skip to content

test: validate committed example configs #21

Description

@tnez

Parent: #17

Goal

Treat example configs as executable documentation and prevent broken examples from landing.

Suggested Approach

Add an automated test that discovers committed TOML files under examples/ and loads each with HudConfig::load_from_path or equivalent real parser path.

A unit test is probably enough. If path handling is awkward from a unit test, use an integration test under tests/.

Scope

  • Validate every committed examples/*.toml.
  • Include current examples: examples/dogfood.toml and examples/kitchen-sink.toml.
  • Automatically include future examples such as examples/starter.toml once added under examples: add public starter config and polish showcase configs #24.
  • Ensure validation uses the real config parser, not a duplicate TOML check.

Files Likely Touched

  • src/config.rs, or
  • tests/examples.rs, or
  • src/lib.rs if exposing parser helpers is needed.

Non-Goals

  • Do not execute panel commands from examples.
  • Do not validate that external tools like gh, tmux, or task are installed.
  • Do not special-case personal examples.

Verification

Run:

./scripts/check

Optional manual sanity check:

cargo run -- --config examples/kitchen-sink.toml --check-config

Acceptance Criteria

  • A broken example config fails ./scripts/check.
  • All current examples pass.
  • Future examples/*.toml files are covered automatically.
  • The validation path is obvious to the next contributor reading the test.

Metadata

Metadata

Assignees

Labels

dottie-asyncGood candidate for Dottie async workreadyReady for implementation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions