mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-13 22:38:04 +00:00
28 lines
563 B
Go
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)
|
|
}
|
|
}
|