nushell/crates/nu-command/tests/commands/platform/ansi_.rs
Stefan Holderbach 7d6b23ee2f
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
2023-09-01 00:08:27 +02:00

16 lines
307 B
Rust

use nu_test_support::nu;
#[test]
fn test_ansi_shows_error_on_escape() {
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!("ansi --list | length");
assert_eq!(actual.out, "424");
}