mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-12 13:48:06 +00:00
24 lines
473 B
Go
24 lines
473 B
Go
|
package yqlib
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
var stringsOperatorScenarios = []expressionScenario{
|
||
|
{
|
||
|
description: "Join strings",
|
||
|
document: `[cat, meow, 1, null, true]`,
|
||
|
expression: `join("; ")`,
|
||
|
expected: []string{
|
||
|
"D0, P[], (!!str)::cat; meow; 1; ; true\n",
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
|
||
|
func TestStringsOperatorScenarios(t *testing.T) {
|
||
|
for _, tt := range stringsOperatorScenarios {
|
||
|
testScenario(t, &tt)
|
||
|
}
|
||
|
documentScenarios(t, "String Operators", stringsOperatorScenarios)
|
||
|
}
|