mirror of
https://github.com/taigrr/yq
synced 2025-01-18 04:53:17 -08:00
Fixed explode for simple anchors
This commit is contained in:
@@ -293,6 +293,20 @@ func TestReadMergeAnchorsExplodeJsonCmd(t *testing.T) {
|
||||
test.AssertResult(t, expectedOutput, result.Output)
|
||||
}
|
||||
|
||||
func TestReadMergeAnchorsExplodeSimpleCmd(t *testing.T) {
|
||||
cmd := getRootCommand()
|
||||
result := test.RunCmd(cmd, "read -X ../examples/simple-anchor.yaml")
|
||||
if result.Error != nil {
|
||||
t.Error(result.Error)
|
||||
}
|
||||
expectedOutput := `foo:
|
||||
a: 1
|
||||
foobar:
|
||||
a: 1
|
||||
`
|
||||
test.AssertResult(t, expectedOutput, result.Output)
|
||||
}
|
||||
|
||||
func TestReadMergeAnchorsExplodeCmd(t *testing.T) {
|
||||
cmd := getRootCommand()
|
||||
result := test.RunCmd(cmd, "read -X ../examples/merge-anchor.yaml")
|
||||
|
||||
Reference in New Issue
Block a user