-
Notifications
You must be signed in to change notification settings - Fork 16
fix: reserved word substrings #263
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1463,6 +1463,16 @@ async fn test_set() { | |
.await; | ||
} | ||
|
||
#[tokio::test] | ||
async fn test_reserved_substring() { | ||
// Test that there is no panic (prefix-dev/shell#256) | ||
TestBuilder::new() | ||
.command(r#"find . -name 'platform*'"#) | ||
.assert_exit_code(1) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the exit code can vary between 0 and 1, we just want to test that it doesn't panic. Not sure how best to do that in this framework There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could use a non existing command and check whether it's a parse error or command not found? Like |
||
.run() | ||
.await; | ||
} | ||
|
||
#[cfg(test)] | ||
fn no_such_file_error_text() -> &'static str { | ||
if cfg!(windows) { | ||
|
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.
still a little fragile—"done" needs to be checked for match before "do"