mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 13:48:06 +00:00
22 lines
361 B
Go
22 lines
361 B
Go
package treeops
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
var traversePathOperatorScenarios = []expressionScenario{
|
|
{
|
|
document: `{a: {b: apple}}`,
|
|
expression: `.a`,
|
|
expected: []string{
|
|
"D0, P[a], (!!map)::{b: apple}\n",
|
|
},
|
|
},
|
|
}
|
|
|
|
func TestTraversePathOperatorScenarios(t *testing.T) {
|
|
for _, tt := range traversePathOperatorScenarios {
|
|
testScenario(t, &tt)
|
|
}
|
|
}
|