Added global xml prefs for simplicity

This commit is contained in:
Mike Farah
2021-12-21 16:52:54 +11:00
parent 6bcbd873a6
commit 2ee9c65bc2
13 changed files with 155 additions and 28 deletions
+1 -3
View File
@@ -110,8 +110,6 @@ var xmlScenarios = []xmlScenario{
},
}
//encode
func testXmlScenario(t *testing.T, s *xmlScenario) {
if s.encodeScenario {
test.AssertResultWithContext(t, s.expected, yamlToXml(s.input, 2), s.description)
@@ -179,7 +177,7 @@ func documentXmlEncodeScenario(w *bufio.Writer, s xmlScenario) {
writeOrPanic(w, "```bash\nyq e -o=xml '.' sample.yml\n```\n")
writeOrPanic(w, "will output\n")
writeOrPanic(w, fmt.Sprintf("```xml\n%v\n```\n\n", yamlToXml(s.input, 2)))
writeOrPanic(w, fmt.Sprintf("```xml\n%v```\n\n", yamlToXml(s.input, 2)))
}
func TestXmlScenarios(t *testing.T) {