mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-01 14:14:52 +08:00
infix reduce
This commit is contained in:
@@ -13,7 +13,7 @@ var pathTests = []struct {
|
||||
expectedPostFix []interface{}
|
||||
}{
|
||||
{
|
||||
`.a as $item reduce (0; . + $item)`, // note - add code to shuffle reduce to this position for postfix
|
||||
`.a as $item ireduce (0; . + $item)`, // note - add code to shuffle reduce to this position for postfix
|
||||
append(make([]interface{}, 0), "a", "ASSIGN_VARIABLE", "GET_VARIABLE", "REDUCE", "(", "0 (int64)", "BLOCK", "SELF", "ADD", "GET_VARIABLE", ")"),
|
||||
append(make([]interface{}, 0), "a", "GET_VARIABLE", "ASSIGN_VARIABLE", "0 (int64)", "SELF", "GET_VARIABLE", "ADD", "BLOCK", "REDUCE"),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user