mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
Columnpath support when passing fields for formatting. (#1472)
This commit is contained in:
committed by
GitHub
parent
54bf671a50
commit
db16b56fe1
@ -14,3 +14,17 @@ fn creates_the_resulting_string_from_the_given_fields() {
|
||||
|
||||
assert_eq!(actual, "nu has license ISC");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn given_fields_can_be_column_paths() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
open cargo_sample.toml
|
||||
| format "{package.name} is {package.description}"
|
||||
| echo $it
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "nu is a new type of shell");
|
||||
}
|
||||
|
@ -42,6 +42,6 @@ fn writes_out_csv() {
|
||||
);
|
||||
|
||||
let actual = file_contents(expected_file);
|
||||
assert!(actual.contains("[Table],A shell for the GitHub era,2018,ISC,nu,0.1.1"));
|
||||
assert!(actual.contains("[Table],a new type of shell,2018,ISC,nu,0.1.1"));
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user