blob: e1a497c9750d92d355666b88ac6f993d0882aaf5 [file] [log] [blame]
# DO NOT EDIT; generated by go run testdata/gen.go
#
#name: list comprehension
#evalFull
-- in.cue --
a: [ for k, v in b if k < "d" if v > b.a {k}]
b: {
a: 1
b: 2
c: 3
d: 4
}
c: [ for _, x in b for _, y in b if x < y {x}]
d: [ for x, _ in a {x}]
-- out/def --
a: ["b", "c"]
b: {
a: 1
b: 2
c: 3
d: 4
}
c: [1, 1, 1, 2, 2, 3]
d: [0, 1]
-- out/export --
a: ["b", "c"]
b: {
a: 1
b: 2
c: 3
d: 4
}
c: [1, 1, 1, 2, 2, 3]
d: [0, 1]
-- out/yaml --
a:
- b
- c
b:
a: 1
b: 2
c: 3
d: 4
c:
- 1
- 1
- 1
- 2
- 2
- 3
d:
- 0
- 1
-- out/json --
{"a":["b","c"],"b":{"a":1,"b":2,"c":3,"d":4},"c":[1,1,1,2,2,3],"d":[0,1]}
-- out/legacy-debug --
<0>{a: ["b","c"], b: <1>{a: 1, b: 2, c: 3, d: 4}, c: [1,1,1,2,2,3], d: [0,1]}