mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 08:06:03 +02:00
bugfix: add "to yml" command (#15254)
# Description This fixes #15240, which can be closed after merge. # User-Facing Changes - user get now use `to yml` -> exactly the same as `to yaml`  # Tests + Formatting Cargo fmt and clippy 🆗 I added a test in the only place I could find where `to yaml` was already tested. I didn't see the `save.rs::convert_to_extension` function tested anywhere, but maybe I missed it. # After Submitting Not sure this needs an update on the documentation ❓ What do you suggest? --------- Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
This commit is contained in:
@ -15,6 +15,21 @@ fn table_to_yaml_text_and_from_yaml_text_back_into_table() {
|
||||
assert_eq!(actual.out, "nushell");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn table_to_yml_text_and_from_yml_text_back_into_table() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
open appveyor.yml
|
||||
| to yml
|
||||
| from yml
|
||||
| get environment.global.PROJECT_NAME
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "nushell");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn convert_dict_to_yaml_with_boolean_key() {
|
||||
let actual = nu!(pipeline(
|
||||
|
Reference in New Issue
Block a user