-
Notifications
You must be signed in to change notification settings - Fork 24
test: add non-shell script tests #406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #406 +/- ##
==========================================
+ Coverage 57.22% 57.40% +0.18%
==========================================
Files 47 47
Lines 5543 5543
Branches 5543 5543
==========================================
+ Hits 3172 3182 +10
+ Misses 1337 1308 -29
- Partials 1034 1053 +19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes the shebangs in two JavaScript example files and adds corresponding test coverage for non-shell script usage parsing. The changes correct the shebang from #!/usr/bin/env -S usage node to #!/usr/bin/env -S usage exec node to properly use the usage exec subcommand, and add execution tests to verify both the new bracketed syntax (// [USAGE]) and old syntax (//USAGE) work correctly with JavaScript files.
Key Changes
- Fixed shebangs in JavaScript examples to use
usage exec nodeinstead ofusage node - Updated comments in example files to clarify they are "non-shell script" tests
- Added two new test functions to verify JavaScript example execution
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| examples/test-usage-double-slash.js | Fixed shebang to use usage exec node and updated comment to specify "non-shell script" |
| examples/test-usage-double-slash-old.js | Fixed shebang to use usage exec node and updated comment to specify "non-shell script" |
| cli/tests/examples.rs | Added two execution tests for the JavaScript examples, verifying both new bracketed and old USAGE syntax |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
bugbot run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Bugbot reviewed your changes and found no bugs!
Fixes the shebangs in two JavaScript examples added by #377, and add usage tests for them.
Note that no
--helptests were added, due toNote
Adds coverage for non-shell script
// [USAGE]and legacy//USAGEparsing/execution and corrects JS example shebangs.cli/tests/examples.rsexecute Node examples viausage exec node, asserting parsed flags/args and defaultsexamples/test-usage-double-slash.jsand...-old.jsshebangs to#!/usr/bin/env -S usage exec nodeand refine commentsWritten by Cursor Bugbot for commit 967b94e. This will update automatically on new commits. Configure here.