mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-06 18:24:57 +08:00
Fixed test flakeyness with using printf
This commit is contained in:
+6
-4
@@ -59,9 +59,11 @@ func TestUpdateYaml_WithScript(t *testing.T) {
|
||||
|
||||
func TestNewYaml_WithScript(t *testing.T) {
|
||||
writeScript = "instruction_sample.yaml"
|
||||
expectedResult := `b:
|
||||
c: cat
|
||||
e:
|
||||
- name: Mike Farah`
|
||||
result := newYaml([]string{""})
|
||||
formattedResult := fmt.Sprintf("%v", result)
|
||||
assertResult(t,
|
||||
"[{b [{c cat} {e [[{name Mike Farah}]]}]}]",
|
||||
formattedResult)
|
||||
actualResult := yamlToString(result)
|
||||
assertResult(t, expectedResult, actualResult)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user