Debian Codegraph @

tools/trim/testdata/constraintroots.txtar

raw
1 # TODO(fmt): tabs incorrectly converted to spaces within comments: cuelang.org/issue/1040
2
3 // Issue #716
4 -- in.cue --
5 keepPatternConstraintRoot: {
6 if true {
7 deployment: "name": {spec: []}
8 }
9
10 deployment: name: spec: []
11
12 deployment: [string]: spec: []
13 }
14
15 keepAdditionalRoots: {
16 if true {
17 deployment: "name": {spec: [1]}
18 }
19
20 deployment: name: spec: [1]
21
22 deployment: [string]: spec: [1]
23 }
24
25 keepPatternConstraintRootSolo: {
26 if true {
27 deployment: "name": {spec: [1]}
28 }
29
30 deployment: [string]: spec: [1]
31 }
32
33 keepPatternConstraintRootIndirect: {
34 if true {
35 deployment: "name": {spec: []}
36 }
37
38 deployment: name: spec: []
39
40 deployment: indirect
41
42 indirect: {{[string]: spec: []}}
43 }
44
45 keepPatternConstraintRootDef: {
46 if true {
47 deployment: "name": {spec: []}
48 }
49
50 #Deployment: spec: []
51
52 deployment: name: #Deployment
53
54 deployment: [string]: spec: []
55 }
56 -- out/trim-v3 --
57 == in.cue
58 keepPatternConstraintRoot: {
59 if true {
60 deployment: "name": _
61 }
62
63 deployment: _
64
65 deployment: [string]: spec: []
66 }
67
68 keepAdditionalRoots: {
69 if true {
70 deployment: "name": _
71 }
72
73 deployment: _
74
75 deployment: [string]: spec: [1]
76 }
77
78 keepPatternConstraintRootSolo: {
79 if true {
80 deployment: "name": _
81 }
82
83 deployment: [string]: spec: [1]
84 }
85
86 keepPatternConstraintRootIndirect: {
87 if true {
88 deployment: "name": {spec: []}
89 }
90
91 deployment: name: spec: []
92
93 deployment: indirect
94
95 indirect: {{[string]: spec: []}}
96 }
97
98 keepPatternConstraintRootDef: {
99 if true {
100 deployment: "name": _
101 }
102
103 #Deployment: spec: []
104
105 deployment: name: #Deployment
106
107 deployment: [string]: spec: []
108 }
109 -- diff/-out/trim-v3<==>+out/trim --
110 diff old new
111 --- old
112 +++ new
113 @@ -1,8 +1,10 @@
114 == in.cue
115 keepPatternConstraintRoot: {
116 if true {
117 - deployment: "name": {spec: []}
118 - }
119 + deployment: "name": _
120 + }
121 +
122 + deployment: _
123
124 deployment: [string]: spec: []
125 }
126 @@ -9,8 +11,10 @@
127
128 keepAdditionalRoots: {
129 if true {
130 - deployment: "name": {spec: [1]}
131 - }
132 + deployment: "name": _
133 + }
134 +
135 + deployment: _
136
137 deployment: [string]: spec: [1]
138 }
139 @@ -17,7 +21,7 @@
140
141 keepPatternConstraintRootSolo: {
142 if true {
143 - deployment: "name": {spec: [1]}
144 + deployment: "name": _
145 }
146
147 deployment: [string]: spec: [1]
148 @@ -28,6 +32,8 @@
149 deployment: "name": {spec: []}
150 }
151
152 + deployment: name: spec: []
153 +
154 deployment: indirect
155
156 indirect: {{[string]: spec: []}}
157 @@ -35,10 +41,12 @@
158
159 keepPatternConstraintRootDef: {
160 if true {
161 - deployment: "name": {spec: []}
162 + deployment: "name": _
163 }
164
165 #Deployment: spec: []
166
167 + deployment: name: #Deployment
168 +
169 deployment: [string]: spec: []
170 }
171 -- out/trim-v3-noshare --
172 == in.cue
173 keepPatternConstraintRoot: {
174 if true {
175 deployment: "name": _
176 }
177
178 deployment: _
179
180 deployment: [string]: spec: []
181 }
182
183 keepAdditionalRoots: {
184 if true {
185 deployment: "name": _
186 }
187
188 deployment: _
189
190 deployment: [string]: spec: [1]
191 }
192
193 keepPatternConstraintRootSolo: {
194 if true {
195 deployment: "name": _
196 }
197
198 deployment: [string]: spec: [1]
199 }
200
201 keepPatternConstraintRootIndirect: {
202 if true {
203 deployment: "name": {spec: []}
204 }
205
206 deployment: name: spec: []
207
208 deployment: indirect
209
210 indirect: {{[string]: spec: []}}
211 }
212
213 keepPatternConstraintRootDef: {
214 if true {
215 deployment: "name": _
216 }
217
218 #Deployment: spec: []
219
220 deployment: name: #Deployment
221
222 deployment: [string]: spec: []
223 }
224 -- diff/-out/trim-v3-noshare<==>+out/trim --
225 diff old new
226 --- old
227 +++ new
228 @@ -1,8 +1,10 @@
229 == in.cue
230 keepPatternConstraintRoot: {
231 if true {
232 - deployment: "name": {spec: []}
233 - }
234 + deployment: "name": _
235 + }
236 +
237 + deployment: _
238
239 deployment: [string]: spec: []
240 }
241 @@ -9,8 +11,10 @@
242
243 keepAdditionalRoots: {
244 if true {
245 - deployment: "name": {spec: [1]}
246 - }
247 + deployment: "name": _
248 + }
249 +
250 + deployment: _
251
252 deployment: [string]: spec: [1]
253 }
254 @@ -17,7 +21,7 @@
255
256 keepPatternConstraintRootSolo: {
257 if true {
258 - deployment: "name": {spec: [1]}
259 + deployment: "name": _
260 }
261
262 deployment: [string]: spec: [1]
263 @@ -28,6 +32,8 @@
264 deployment: "name": {spec: []}
265 }
266
267 + deployment: name: spec: []
268 +
269 deployment: indirect
270
271 indirect: {{[string]: spec: []}}
272 @@ -35,10 +41,12 @@
273
274 keepPatternConstraintRootDef: {
275 if true {
276 - deployment: "name": {spec: []}
277 + deployment: "name": _
278 }
279
280 #Deployment: spec: []
281
282 + deployment: name: #Deployment
283 +
284 deployment: [string]: spec: []
285 }
286 -- out/trim --
287 == in.cue
288 keepPatternConstraintRoot: {
289 if true {
290 deployment: "name": {spec: []}
291 }
292
293 deployment: [string]: spec: []
294 }
295
296 keepAdditionalRoots: {
297 if true {
298 deployment: "name": {spec: [1]}
299 }
300
301 deployment: [string]: spec: [1]
302 }
303
304 keepPatternConstraintRootSolo: {
305 if true {
306 deployment: "name": {spec: [1]}
307 }
308
309 deployment: [string]: spec: [1]
310 }
311
312 keepPatternConstraintRootIndirect: {
313 if true {
314 deployment: "name": {spec: []}
315 }
316
317 deployment: indirect
318
319 indirect: {{[string]: spec: []}}
320 }
321
322 keepPatternConstraintRootDef: {
323 if true {
324 deployment: "name": {spec: []}
325 }
326
327 #Deployment: spec: []
328
329 deployment: [string]: spec: []
330 }