mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Fixes #9448 # Description Attempts to fix a bug from the linked issue. # User-Facing Changes - The editor doesn't crash on wrong commands # Tests + Formatting Tests cover my changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect -A clippy::result_large_err` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass - `cargo run -- crates/nu-std/tests/run.nu` to run the tests for the standard library
This commit is contained in:
13
crates/nu-command/tests/commands/platform/ansi_.rs
Normal file
13
crates/nu-command/tests/commands/platform/ansi_.rs
Normal file
@ -0,0 +1,13 @@
|
||||
use nu_test_support::{nu, pipeline};
|
||||
|
||||
#[test]
|
||||
fn test_ansi_shows_error_on_escape() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
ansi -e \
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.err.contains("no need for escape characters"))
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
mod ansi_;
|
||||
mod du;
|
||||
mod kill;
|
||||
|
Reference in New Issue
Block a user