mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-07 02:48:27 +08:00
Delete now supports multi docs!
This commit is contained in:
-16
@@ -98,19 +98,3 @@ func TestNewYaml_WithUnknownScript(t *testing.T) {
|
||||
expectedOutput := `open fake-unknown: no such file or directory`
|
||||
assertResult(t, expectedOutput, err.Error())
|
||||
}
|
||||
|
||||
func TestDeleteYaml(t *testing.T) {
|
||||
result, _ := deleteYaml([]string{"examples/sample.yaml", "b.c"})
|
||||
formattedResult := fmt.Sprintf("%v", result)
|
||||
assertResult(t,
|
||||
"[{a Easy! as one two three} {b [{d [3 4]} {e [[{name fred} {value 3}] [{name sam} {value 4}]]}]}]",
|
||||
formattedResult)
|
||||
}
|
||||
|
||||
func TestDeleteYamlArray(t *testing.T) {
|
||||
result, _ := deleteYaml([]string{"examples/sample_array.yaml", "[1]"})
|
||||
formattedResult := fmt.Sprintf("%v", result)
|
||||
assertResult(t,
|
||||
"[1 3]",
|
||||
formattedResult)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user