pkgs/lib/formats: test more explicitly for YAML 1.1 compat

This commit is contained in:
Martin Weinelt 2024-11-09 06:27:37 +01:00
parent 29fbef9adb
commit 80a4fc03f0
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -118,7 +118,7 @@ in runBuildTests {
''; '';
}; };
yamlAtoms = shouldPass { yaml_1_1Atoms = shouldPass {
format = formats.yaml {}; format = formats.yaml {};
input = { input = {
null = null; null = null;
@ -129,6 +129,8 @@ in runBuildTests {
attrs.foo = null; attrs.foo = null;
list = [ null null ]; list = [ null null ];
path = ./formats.nix; path = ./formats.nix;
no = "no";
time = "22:30:00";
}; };
expected = '' expected = ''
attrs: attrs:
@ -138,9 +140,11 @@ in runBuildTests {
list: list:
- null - null
- null - null
'no': 'no'
'null': null 'null': null
path: ${./formats.nix} path: ${./formats.nix}
str: foo str: foo
time: '22:30:00'
'true': true 'true': true
''; '';
}; };