mirror of
https://github.com/TomWright/dasel.git
synced 2022-05-22 02:32:45 +03:00
Add an output formatter test
This commit is contained in:
@@ -132,6 +132,23 @@ Jim
|
||||
---
|
||||
Frank`,
|
||||
))
|
||||
t.Run("QueryMultipleBadSelector", testFormatNode(
|
||||
map[string]interface{}{
|
||||
"users": []map[string]interface{}{
|
||||
{
|
||||
"name": "Tom",
|
||||
},
|
||||
{
|
||||
"name": "Jim",
|
||||
},
|
||||
{
|
||||
"name": "Frank",
|
||||
},
|
||||
},
|
||||
},
|
||||
`{{ queryMultiple ".users.[*].names" | format "{{ . }}{{ if not isLast }}{{ newline }}{{ end }}" }}`,
|
||||
``,
|
||||
))
|
||||
}
|
||||
|
||||
func TestFormatNodes(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user