mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-01 14:14:52 +08:00
Fixed delete command for arrays
This commit is contained in:
@@ -106,3 +106,11 @@ func TestDeleteYaml(t *testing.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