mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 06:30:08 +02:00
Refactor tests (using cococo instead of ^echo) (#11479)
- related PR: #11478 # Description Now we can use `nu --testbin cococo` instead of `^echo` to echo messages to stdout in tests. But `nu` treats parameters as its own flags when parameter starts with `-`. So `^echo --foo='bar'` still use `^echo`. # User-Facing Changes (none) # Tests + Formatting - [x] `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - [x] `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - [x] `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - [x] `cargo run -- -c "use std testing; testing run-tests --path crates/nu-std"` to run the tests for the standard library # After Submitting (none)
This commit is contained in:
@ -197,7 +197,7 @@ fn def_wrapped_with_block() {
|
||||
#[test]
|
||||
fn def_wrapped_from_module() {
|
||||
let actual = nu!(r#"module spam {
|
||||
export def --wrapped my-echo [...rest] { ^echo ...$rest }
|
||||
export def --wrapped my-echo [...rest] { nu --testbin cococo ...$rest }
|
||||
}
|
||||
|
||||
use spam
|
||||
|
Reference in New Issue
Block a user