mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Add padding in single-item YAML flow lists
To match the style that we use in LOOT's masterlists.
This commit is contained in:
@@ -387,7 +387,7 @@ TEST_F(PluginMetadataTest,
|
||||
|
||||
EXPECT_EQ(
|
||||
"name: 'Blank.esm'\n"
|
||||
"after: ['Blank.esm']",
|
||||
"after: [ 'Blank.esm' ]",
|
||||
plugin.AsYaml());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -889,7 +889,7 @@ mod tests {
|
||||
|
||||
assert_eq!(
|
||||
format!(
|
||||
"name: '{}'\nafter: ['{}']",
|
||||
"name: '{}'\nafter: [ '{}' ]",
|
||||
plugin.name(),
|
||||
plugin.load_after[0].name()
|
||||
),
|
||||
@@ -1054,7 +1054,7 @@ mod tests {
|
||||
|
||||
assert_eq!(
|
||||
format!(
|
||||
"name: '{}'\nafter: ['{}']",
|
||||
"name: '{}'\nafter: [ '{}' ]",
|
||||
plugin.name(),
|
||||
plugin.load_after[0].name()
|
||||
),
|
||||
@@ -1109,7 +1109,7 @@ mod tests {
|
||||
|
||||
assert_eq!(
|
||||
format!(
|
||||
"name: '{}'\nreq: ['{}']",
|
||||
"name: '{}'\nreq: [ '{}' ]",
|
||||
plugin.name(),
|
||||
plugin.requirements[0].name()
|
||||
),
|
||||
@@ -1125,7 +1125,7 @@ mod tests {
|
||||
|
||||
assert_eq!(
|
||||
format!(
|
||||
"name: '{}'\ninc: ['{}']",
|
||||
"name: '{}'\ninc: [ '{}' ]",
|
||||
plugin.name(),
|
||||
plugin.incompatibilities[0].name()
|
||||
),
|
||||
@@ -1163,7 +1163,7 @@ mod tests {
|
||||
|
||||
assert_eq!(
|
||||
format!(
|
||||
"name: '{}'\ntag: [{}]",
|
||||
"name: '{}'\ntag: [ {} ]",
|
||||
plugin.name(),
|
||||
plugin.tags[0].name()
|
||||
),
|
||||
@@ -1213,7 +1213,7 @@ mod tests {
|
||||
|
||||
assert_eq!(
|
||||
format!(
|
||||
"name: '{}'\nurl: ['{}']",
|
||||
"name: '{}'\nurl: [ '{}' ]",
|
||||
plugin.name(),
|
||||
plugin.locations[0].url()
|
||||
),
|
||||
|
||||
@@ -308,7 +308,9 @@ impl<T: EmitYaml> EmitYaml for &[T] {
|
||||
[element] if element.is_scalar() => {
|
||||
emitter.set_flow_style();
|
||||
emitter.begin_array();
|
||||
emitter.write(" ");
|
||||
element.emit_yaml(emitter);
|
||||
emitter.write(" ");
|
||||
emitter.end_array();
|
||||
emitter.set_block_style();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user