yq/pkg/yqlib/treeops/operator_multiply_test.go
2020-10-19 16:14:29 +11:00

28 lines
563 B
Go

package treeops
import (
"testing"
)
var multiplyOperatorScenarios = []expressionScenario{
{
// document: `{a: frog, b: cat}`,
// expression: `.a * .b`,
// expected: []string{
// "D0, P[], (!!map)::{a: cat, b: cat}\n",
// },
// }, {
document: `{a: {things: great}, b: {also: me}}`,
expression: `.a * .b`,
expected: []string{
"D0, P[], (!!map)::{a: {things: great, also: me}, b: {also: me}}\n",
},
},
}
func TestMultiplyOperatorScenarios(t *testing.T) {
for _, tt := range multiplyOperatorScenarios {
testScenario(t, &tt)
}
}