mirror of
https://github.com/nushell/nushell.git
synced 2024-11-27 10:53:57 +01:00
08a09e2273
* Making Commands match what UntaggedValue needs * WIP * WIP * WIP * Moved to expressions for conditions * Add 'each' command to use command blocks * More cleanup * Add test for 'each' * Instead use an expression block
14 lines
289 B
Rust
14 lines
289 B
Rust
use nu_test_support::{nu, pipeline};
|
|
|
|
#[test]
|
|
fn each_works_separately() {
|
|
let actual = nu!(
|
|
cwd: "tests/fixtures/formats", pipeline(
|
|
r#"
|
|
echo [1 2 3] | each { echo $it 10 | sum } | to-json | echo $it
|
|
"#
|
|
));
|
|
|
|
assert_eq!(actual, "[11,12,13]");
|
|
}
|