test: test on 'to yaml' boolean parsing in spec 1.2

This commit is contained in:
RikukiIX 2024-12-20 16:23:59 +08:00
parent d6c134c98f
commit 0db506921c
No known key found for this signature in database
GPG Key ID: A47AC7978F25F882

View File

@ -48,3 +48,18 @@ fn convert_dict_to_yaml_with_integer_floats_key() {
assert!(actual.out.contains("2.11")); assert!(actual.out.contains("2.11"));
assert!(actual.err.is_empty()); assert!(actual.err.is_empty());
} }
#[test]
fn convert_bool_to_yaml_in_yaml_spec_1_2() {
let actual = nu!(pipeline(
r#"
[y n no On OFF True true false] | to yaml
"#
));
assert_eq!(
actual.out,
"- 'y'- 'n'- 'no'- 'On'- 'OFF'- 'True'- true- false"
);
assert!(actual.err.is_empty());
}