Skip to content

Commit a32ff55

Browse files
authored
A few more tests to reduce risk of regressions (dart-archive/yaml_edit#77)
1 parent e81707f commit a32ff55

File tree

4 files changed

+352
-0
lines changed

4 files changed

+352
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
REMOVE FROM LIST IN BLOCK MODE
2+
---
3+
- true
4+
- test:
5+
- foo: true
6+
bar:
7+
- baz:
8+
- nested:
9+
foo:
10+
---
11+
- [remove, [1, 'test']]
12+
- [remove, [2, 'bar']]
13+
- [remove, [3, 'baz']]
14+
- [remove, [4, 'nested', 'foo']]
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
REMOVE FROM MAP IN FLOW MODE
2+
---
3+
A: true
4+
B: {foo: }
5+
C: {
6+
foo:,bar:true
7+
}
8+
D: {
9+
foo:
10+
,bar:true
11+
}
12+
E: {
13+
foo: # comment
14+
,bar:true
15+
}
16+
F: {
17+
# comment
18+
foo:
19+
,bar:true
20+
}
21+
G: {
22+
# comment
23+
foo:
24+
# comment
25+
,bar:true
26+
}
27+
H: {
28+
foo: # comment
29+
,
30+
bar:true
31+
}
32+
I: {
33+
bar: true, foo: }
34+
J: { foo : }
35+
---
36+
- [remove, [B, foo]]
37+
- [remove, [C, foo]]
38+
- [remove, [D, foo]]
39+
- [remove, [E, foo]]
40+
- [remove, [F, foo]]
41+
- [remove, [G, foo]]
42+
- [remove, [H, foo]]
43+
- [remove, [I, foo]]
44+
- [remove, [J, foo]]
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
- true
2+
- test:
3+
- foo: true
4+
bar:
5+
- baz:
6+
- nested:
7+
foo:
8+
---
9+
- true
10+
- {}
11+
- foo: true
12+
bar:
13+
- baz:
14+
- nested:
15+
foo:
16+
---
17+
- true
18+
- {}
19+
- foo: true
20+
- baz:
21+
- nested:
22+
foo:
23+
---
24+
- true
25+
- {}
26+
- foo: true
27+
- {}
28+
- nested:
29+
foo:
30+
---
31+
- true
32+
- {}
33+
- foo: true
34+
- {}
35+
- nested:
36+
{}
Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
A: true
2+
B: {foo: }
3+
C: {
4+
foo:,bar:true
5+
}
6+
D: {
7+
foo:
8+
,bar:true
9+
}
10+
E: {
11+
foo: # comment
12+
,bar:true
13+
}
14+
F: {
15+
# comment
16+
foo:
17+
,bar:true
18+
}
19+
G: {
20+
# comment
21+
foo:
22+
# comment
23+
,bar:true
24+
}
25+
H: {
26+
foo: # comment
27+
,
28+
bar:true
29+
}
30+
I: {
31+
bar: true, foo: }
32+
J: { foo : }
33+
---
34+
A: true
35+
B: {}
36+
C: {
37+
foo:,bar:true
38+
}
39+
D: {
40+
foo:
41+
,bar:true
42+
}
43+
E: {
44+
foo: # comment
45+
,bar:true
46+
}
47+
F: {
48+
# comment
49+
foo:
50+
,bar:true
51+
}
52+
G: {
53+
# comment
54+
foo:
55+
# comment
56+
,bar:true
57+
}
58+
H: {
59+
foo: # comment
60+
,
61+
bar:true
62+
}
63+
I: {
64+
bar: true, foo: }
65+
J: { foo : }
66+
---
67+
A: true
68+
B: {}
69+
C: {bar:true
70+
}
71+
D: {
72+
foo:
73+
,bar:true
74+
}
75+
E: {
76+
foo: # comment
77+
,bar:true
78+
}
79+
F: {
80+
# comment
81+
foo:
82+
,bar:true
83+
}
84+
G: {
85+
# comment
86+
foo:
87+
# comment
88+
,bar:true
89+
}
90+
H: {
91+
foo: # comment
92+
,
93+
bar:true
94+
}
95+
I: {
96+
bar: true, foo: }
97+
J: { foo : }
98+
---
99+
A: true
100+
B: {}
101+
C: {bar:true
102+
}
103+
D: {bar:true
104+
}
105+
E: {
106+
foo: # comment
107+
,bar:true
108+
}
109+
F: {
110+
# comment
111+
foo:
112+
,bar:true
113+
}
114+
G: {
115+
# comment
116+
foo:
117+
# comment
118+
,bar:true
119+
}
120+
H: {
121+
foo: # comment
122+
,
123+
bar:true
124+
}
125+
I: {
126+
bar: true, foo: }
127+
J: { foo : }
128+
---
129+
A: true
130+
B: {}
131+
C: {bar:true
132+
}
133+
D: {bar:true
134+
}
135+
E: {bar:true
136+
}
137+
F: {
138+
# comment
139+
foo:
140+
,bar:true
141+
}
142+
G: {
143+
# comment
144+
foo:
145+
# comment
146+
,bar:true
147+
}
148+
H: {
149+
foo: # comment
150+
,
151+
bar:true
152+
}
153+
I: {
154+
bar: true, foo: }
155+
J: { foo : }
156+
---
157+
A: true
158+
B: {}
159+
C: {bar:true
160+
}
161+
D: {bar:true
162+
}
163+
E: {bar:true
164+
}
165+
F: {bar:true
166+
}
167+
G: {
168+
# comment
169+
foo:
170+
# comment
171+
,bar:true
172+
}
173+
H: {
174+
foo: # comment
175+
,
176+
bar:true
177+
}
178+
I: {
179+
bar: true, foo: }
180+
J: { foo : }
181+
---
182+
A: true
183+
B: {}
184+
C: {bar:true
185+
}
186+
D: {bar:true
187+
}
188+
E: {bar:true
189+
}
190+
F: {bar:true
191+
}
192+
G: {bar:true
193+
}
194+
H: {
195+
foo: # comment
196+
,
197+
bar:true
198+
}
199+
I: {
200+
bar: true, foo: }
201+
J: { foo : }
202+
---
203+
A: true
204+
B: {}
205+
C: {bar:true
206+
}
207+
D: {bar:true
208+
}
209+
E: {bar:true
210+
}
211+
F: {bar:true
212+
}
213+
G: {bar:true
214+
}
215+
H: {
216+
bar:true
217+
}
218+
I: {
219+
bar: true, foo: }
220+
J: { foo : }
221+
---
222+
A: true
223+
B: {}
224+
C: {bar:true
225+
}
226+
D: {bar:true
227+
}
228+
E: {bar:true
229+
}
230+
F: {bar:true
231+
}
232+
G: {bar:true
233+
}
234+
H: {
235+
bar:true
236+
}
237+
I: {
238+
bar: true}
239+
J: { foo : }
240+
---
241+
A: true
242+
B: {}
243+
C: {bar:true
244+
}
245+
D: {bar:true
246+
}
247+
E: {bar:true
248+
}
249+
F: {bar:true
250+
}
251+
G: {bar:true
252+
}
253+
H: {
254+
bar:true
255+
}
256+
I: {
257+
bar: true}
258+
J: {}

0 commit comments

Comments
 (0)