yq/pkg/yqlib/treeops/operator_multiply_test.go

28 lines
563 B
Go
Raw Normal View History

2020-10-19 05:14:29 +00:00
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)
}
}