mirror of
https://github.com/mikefarah/yq.git
synced 2025-01-13 11:55:38 +00:00
Fixed test flakeyness with using printf
This commit is contained in:
parent
a7c4813703
commit
0facf35d60
10
yaml_test.go
10
yaml_test.go
@ -59,9 +59,11 @@ func TestUpdateYaml_WithScript(t *testing.T) {
|
|||||||
|
|
||||||
func TestNewYaml_WithScript(t *testing.T) {
|
func TestNewYaml_WithScript(t *testing.T) {
|
||||||
writeScript = "instruction_sample.yaml"
|
writeScript = "instruction_sample.yaml"
|
||||||
|
expectedResult := `b:
|
||||||
|
c: cat
|
||||||
|
e:
|
||||||
|
- name: Mike Farah`
|
||||||
result := newYaml([]string{""})
|
result := newYaml([]string{""})
|
||||||
formattedResult := fmt.Sprintf("%v", result)
|
actualResult := yamlToString(result)
|
||||||
assertResult(t,
|
assertResult(t, expectedResult, actualResult)
|
||||||
"[{b [{c cat} {e [[{name Mike Farah}]]}]}]",
|
|
||||||
formattedResult)
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user