forked from extern/nushell
Fix warnings for Rust 1.51 (#3214)
* Fix warnings for Rust 1.51 * More fixes * More fixes
This commit is contained in:
@ -716,49 +716,25 @@ mod parse {
|
||||
fn errors_if_flag_passed_is_not_exact() {
|
||||
let actual = nu!(cwd: ".", "debug -ra");
|
||||
|
||||
assert!(
|
||||
actual.err.contains("unexpected flag"),
|
||||
format!(
|
||||
"error message '{}' should contain 'unexpected flag'",
|
||||
actual.err
|
||||
)
|
||||
);
|
||||
assert!(actual.err.contains("unexpected flag"),);
|
||||
|
||||
let actual = nu!(cwd: ".", "debug --rawx");
|
||||
|
||||
assert!(
|
||||
actual.err.contains("unexpected flag"),
|
||||
format!(
|
||||
"error message '{}' should contain 'unexpected flag'",
|
||||
actual.err
|
||||
)
|
||||
);
|
||||
assert!(actual.err.contains("unexpected flag"),);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn errors_if_flag_is_not_supported() {
|
||||
let actual = nu!(cwd: ".", "debug --ferris");
|
||||
|
||||
assert!(
|
||||
actual.err.contains("unexpected flag"),
|
||||
format!(
|
||||
"error message '{}' should contain 'unexpected flag'",
|
||||
actual.err
|
||||
)
|
||||
);
|
||||
assert!(actual.err.contains("unexpected flag"),);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn errors_if_passed_an_unexpected_argument() {
|
||||
let actual = nu!(cwd: ".", "debug ferris");
|
||||
|
||||
assert!(
|
||||
actual.err.contains("unexpected argument"),
|
||||
format!(
|
||||
"error message '{}' should contain 'unexpected argument'",
|
||||
actual.err
|
||||
)
|
||||
);
|
||||
assert!(actual.err.contains("unexpected argument"),);
|
||||
}
|
||||
}
|
||||
|
||||
@ -775,10 +751,7 @@ mod tilde_expansion {
|
||||
"#
|
||||
);
|
||||
|
||||
assert!(
|
||||
!actual.out.contains('~'),
|
||||
format!("'{}' should not contain ~", actual.out)
|
||||
);
|
||||
assert!(!actual.out.contains('~'),);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user