-
Notifications
You must be signed in to change notification settings - Fork 19
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
Refactor current tests and start to use assert_cmd
#24
Merged
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
47f09f9
tests/gnu/arch: change to assert_cli as CLI assertion util
80d4ed9
tests/gnu/base32: change to assert_cli as CLI assertion util
b0cc44b
tests: use new_cli macro to simplify creating assert command
6061fcd
tests/gnu/base64: change to assert_cli as CLI assertion util
7547355
tests: set tests/fixtures/util as current dir for assert cli
abdb172
tests/posix/cat: change to assert_cli as CLI assertion util
a4d6e33
tests: revert setting the default dir but provide a macro to get fixt…
105839f
tests: use assert_cmd and predicates instead of assert_cli
95b3766
tests: update assert_cmd and predicates and fix API changes
mssun a3fb6ec
tests/posix/test_head: start to use assert_cmd
mssun b36360d
tests/posix/test_head: forgot to assert success status
mssun f72f8bd
tests/posix/chmod: rewrite chmod testcases
a31a9ad
tests/posix/cat: delete unused mod
ead136e
tests/posix/sleep: rewrite sleep test cases
d085c75
Merge master changes into tests/refactor
126b03b
tests/posix/echo: rewrite echo with assert_cmd
1d28625
tests/posix/false: rewrite false with assert_cmd
2be4106
tests/posix/true: rewrite true with assert_cmd
48fd4cd
tests/posix/sleep: relax diff time
e5f8f17
tests/posix/sh: rewrite testcases of sh using assert_cmd
3de2bf7
CI: fix coverage script for libmesabox refactor
2a54f58
tests: delete tests framework and unused macros
0c9293a
CI: polish and simplify run-cov script
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
tests: update assert_cmd and predicates and fix API changes
- Loading branch information
commit 95b37667700a489ae02156595669ff51964f5948
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
RE
from_utf8
Right now, the only automatic conversions that happen in our API are u8 slice to predicate and str to predicate.
Feel free to open an issue about converting
Predicate<str>
intoPredicate<[u8]>
. or any other ideas to simplify the use of the API.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.
Yes, this one bother me a lot. I think it could work, but realize it doesn't when compile the code. It took me some time to find out the reason because the documentation of
assert_cmd
andpredicates
are mixed. I should check with these two docs.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.
Could you open issues on any documentation problems you came across? We're wanting to make sure this is accessible for people starting a first Rust project to create a CLI. My challenge is the curse of knowledge: I'm too familiar with it to see know what pitfalls a new user will run into.