Delete now supports multi docs!

This commit is contained in:
Mike Farah
2018-06-15 09:43:20 +10:00
parent 1b22e1d812
commit 1a4064429d
3 changed files with 101 additions and 52 deletions
-16
View File
@@ -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)
}