mirror of
https://github.com/nushell/nushell.git
synced 2025-08-18 15:48:54 +02:00
let format access variables also (#1842)
This commit is contained in:
@@ -28,3 +28,17 @@ fn given_fields_can_be_column_paths() {
|
||||
|
||||
assert_eq!(actual.out, "nu is a new type of shell");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn can_use_variables() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
open cargo_sample.toml
|
||||
| format "{$it.package.name} is {$it.package.description}"
|
||||
| echo $it
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "nu is a new type of shell");
|
||||
}
|
||||
|
Reference in New Issue
Block a user