mirror of
https://github.com/taigrr/yq
synced 2025-01-18 04:53:17 -08: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)
|
|
}
|
|
}
|