Create test report documentation for manual reuse#11
Conversation
Introduce trycmd-based testing that serves dual purposes: 1. Automated regression testing for CLI behavior 2. Living documentation with real input/output examples The Markdown files in tests/examples/ can be directly used in user documentation (mdBook, etc.) as they contain actual command outputs verified by tests.
Living documentation files are now in docs/examples/ where they belong as user-facing documentation. Tests still verify them via trycmd from diffx-cli/tests/examples.rs.
- Add --completions option to generate shell completions (bash, zsh, fish, powershell) - Add build.rs to generate man page at build time - Update docs/examples to reflect new CLI options Usage: diffx --completions bash > ~/.local/share/bash-completion/completions/diffx diffx --completions zsh > ~/.zfunc/_diffx
- Add shell completions section with installation commands for bash/zsh/fish/powershell - Add man page installation instructions - Add link to docs/examples/ (living documentation)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| [build-dependencies] | ||
| clap = { workspace = true } | ||
| clap_mangen = "0.2" | ||
| clap_complete = "4.5" |
There was a problem hiding this comment.
Wire up build script for man/completions generation
A new build script (diffx-cli/build.rs) now writes man pages and shell completions, and you added build-dependencies to support it (lines 32-35), but Cargo.toml still lacks a build = "build.rs" entry in the [package] section. Cargo ignores build scripts unless they are declared, so this script never runs and the documented manpage/completion artifacts will never be generated.
Useful? React with 👍 / 👎.
* feat: add trycmd for living documentation tests Introduce trycmd-based testing that serves dual purposes: 1. Automated regression testing for CLI behavior 2. Living documentation with real input/output examples The Markdown files in tests/examples/ can be directly used in user documentation (mdBook, etc.) as they contain actual command outputs verified by tests. * refactor: move example docs to docs/examples/ Living documentation files are now in docs/examples/ where they belong as user-facing documentation. Tests still verify them via trycmd from diffx-cli/tests/examples.rs. * feat: add shell completions and man page generation - Add --completions option to generate shell completions (bash, zsh, fish, powershell) - Add build.rs to generate man page at build time - Update docs/examples to reflect new CLI options Usage: diffx --completions bash > ~/.local/share/bash-completion/completions/diffx diffx --completions zsh > ~/.zfunc/_diffx * docs: update README_ja.md with shell completions and man page - Add shell completions section with installation commands for bash/zsh/fish/powershell - Add man page installation instructions - Add link to docs/examples/ (living documentation) --------- Co-authored-by: Claude <noreply@anthropic.com>
* feat: add trycmd for living documentation tests Introduce trycmd-based testing that serves dual purposes: 1. Automated regression testing for CLI behavior 2. Living documentation with real input/output examples The Markdown files in tests/examples/ can be directly used in user documentation (mdBook, etc.) as they contain actual command outputs verified by tests. * refactor: move example docs to docs/examples/ Living documentation files are now in docs/examples/ where they belong as user-facing documentation. Tests still verify them via trycmd from diffx-cli/tests/examples.rs. * feat: add shell completions and man page generation - Add --completions option to generate shell completions (bash, zsh, fish, powershell) - Add build.rs to generate man page at build time - Update docs/examples to reflect new CLI options Usage: diffx --completions bash > ~/.local/share/bash-completion/completions/diffx diffx --completions zsh > ~/.zfunc/_diffx * docs: update README_ja.md with shell completions and man page - Add shell completions section with installation commands for bash/zsh/fish/powershell - Add man page installation instructions - Add link to docs/examples/ (living documentation) --------- Co-authored-by: Claude <noreply@anthropic.com>
* feat: add trycmd for living documentation tests Introduce trycmd-based testing that serves dual purposes: 1. Automated regression testing for CLI behavior 2. Living documentation with real input/output examples The Markdown files in tests/examples/ can be directly used in user documentation (mdBook, etc.) as they contain actual command outputs verified by tests. * refactor: move example docs to docs/examples/ Living documentation files are now in docs/examples/ where they belong as user-facing documentation. Tests still verify them via trycmd from diffx-cli/tests/examples.rs. * feat: add shell completions and man page generation - Add --completions option to generate shell completions (bash, zsh, fish, powershell) - Add build.rs to generate man page at build time - Update docs/examples to reflect new CLI options Usage: diffx --completions bash > ~/.local/share/bash-completion/completions/diffx diffx --completions zsh > ~/.zfunc/_diffx * docs: update README_ja.md with shell completions and man page - Add shell completions section with installation commands for bash/zsh/fish/powershell - Add man page installation instructions - Add link to docs/examples/ (living documentation) --------- Co-authored-by: Claude <noreply@anthropic.com>
Pull Request
📋 Summary
Type of Change:
🔗 Related Issues
Fixes #
Relates to #
📝 Changes Made
🧪 Testing
Test Coverage:
Test Results:
📚 Documentation
✅ Checklist
Before submitting this PR, please ensure:
Code Quality
Testing
Documentation
Breaking Changes
🎯 Performance Impact
Benchmark Results (if applicable):
# Include before/after benchmark results npm run bench / cargo bench / pytest-benchmark / etc.🔍 Reviewer Notes
Focus Areas:
Questions for Reviewers:
📸 Screenshots (if applicable)
🚀 Deployment Notes
By submitting this PR, I confirm that: