cue/testdata: add regression test cases to comprehensions/pushdown master
Lock in the correct behavior of two pushdown-related shapes that the upcoming comprehension rework would otherwise regress. The reduced form: #Primary: { _Y: _ let _X = _Y if len(_X.spec.command) > 0 { command: _X.spec.command } } #Rollout: { _X: _ out: #Primary & {_Y: _X} & _X.patch } out: #Rollout & {_X: {spec: command: ["a"], patch: {}}} The @test(eq, at=out, ...) assertions capture the expected final value. Landing the tests here, before the rework, lets us track the behavior through subsequent changes and shows the fix's diff cleanly when it lands. Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com> Change-Id: I93958b5b866433efb21622efb76b7a008ee9292b Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1237189 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc>