mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 02:35:00 +02:00
Simplify rawstrings in tests (#10180)
Inspired by https://rust-lang.github.io/rust-clippy/master/index.html#/needless_raw_string_hashes Ran `cargo +stable clippy --workspace --all-targets` Fixed manually as I ran into a false positive along the lines of: https://github.com/rust-lang/rust-clippy/issues/11068 Also collapse one set of single line tests. Work for #8670
This commit is contained in:
committed by
GitHub
parent
e68ae4c8d1
commit
7d6b23ee2f
@ -1,23 +1,15 @@
|
||||
use nu_test_support::{nu, pipeline};
|
||||
use nu_test_support::nu;
|
||||
|
||||
#[test]
|
||||
fn test_ansi_shows_error_on_escape() {
|
||||
let actual = nu!(pipeline(
|
||||
r#"
|
||||
ansi -e \
|
||||
"#
|
||||
));
|
||||
let actual = nu!(r"ansi -e \");
|
||||
|
||||
assert!(actual.err.contains("no need for escape characters"))
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ansi_list_outputs_table() {
|
||||
let actual = nu!(pipeline(
|
||||
r#"
|
||||
ansi --list | length
|
||||
"#
|
||||
));
|
||||
let actual = nu!("ansi --list | length");
|
||||
|
||||
assert_eq!(actual.out, "424");
|
||||
}
|
||||
|
Reference in New Issue
Block a user