forked from extern/nushell
29431e73c2
This commit changes the way we shell out externals when using the `"$it"` argument. Also pipes per row to an external's stdin if no `"$it"` argument is present for external commands. Further separation of logic (preparing the external's command arguments, getting the data for piping, emitting values, spawning processes) will give us a better idea for lower level details regarding external commands until we can find the right abstractions for making them more generic and unify within the pipeline calling logic of Nu internal's and external's.
19 lines
367 B
Rust
19 lines
367 B
Rust
use nu_test_support::{nu, pipeline};
|
|
|
|
#[test]
|
|
fn table_to_bson_and_back_into_table() {
|
|
let actual = nu!(
|
|
cwd: "tests/fixtures/formats", pipeline(
|
|
r#"
|
|
open sample.bson
|
|
| to-bson
|
|
| from-bson
|
|
| get root
|
|
| get 1.b
|
|
| echo $it
|
|
"#
|
|
));
|
|
|
|
assert_eq!(actual, "whel");
|
|
}
|