Skip to content

Commit

Permalink
A few more tests to reduce risk of regressions
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasfj committed May 6, 2024
1 parent fe2699d commit ca50d4b
Show file tree
Hide file tree
Showing 4 changed files with 352 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/testdata/input/remove_block_list.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
REMOVE FROM LIST IN BLOCK MODE
---
- true
- test:
- foo: true
bar:
- baz:
- nested:
foo:
---
- [remove, [1, 'test']]
- [remove, [2, 'bar']]
- [remove, [3, 'baz']]
- [remove, [4, 'nested', 'foo']]
44 changes: 44 additions & 0 deletions test/testdata/input/remove_flow_map.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
REMOVE FROM MAP IN FLOW MODE
---
A: true
B: {foo: }
C: {
foo:,bar:true
}
D: {
foo:
,bar:true
}
E: {
foo: # comment
,bar:true
}
F: {
# comment
foo:
,bar:true
}
G: {
# comment
foo:
# comment
,bar:true
}
H: {
foo: # comment
,
bar:true
}
I: {
bar: true, foo: }
J: { foo : }
---
- [remove, [B, foo]]
- [remove, [C, foo]]
- [remove, [D, foo]]
- [remove, [E, foo]]
- [remove, [F, foo]]
- [remove, [G, foo]]
- [remove, [H, foo]]
- [remove, [I, foo]]
- [remove, [J, foo]]
36 changes: 36 additions & 0 deletions test/testdata/output/remove_block_list.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
- true
- test:
- foo: true
bar:
- baz:
- nested:
foo:
---
- true
- {}
- foo: true
bar:
- baz:
- nested:
foo:
---
- true
- {}
- foo: true
- baz:
- nested:
foo:
---
- true
- {}
- foo: true
- {}
- nested:
foo:
---
- true
- {}
- foo: true
- {}
- nested:
{}
258 changes: 258 additions & 0 deletions test/testdata/output/remove_flow_map.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
A: true
B: {foo: }
C: {
foo:,bar:true
}
D: {
foo:
,bar:true
}
E: {
foo: # comment
,bar:true
}
F: {
# comment
foo:
,bar:true
}
G: {
# comment
foo:
# comment
,bar:true
}
H: {
foo: # comment
,
bar:true
}
I: {
bar: true, foo: }
J: { foo : }
---
A: true
B: {}
C: {
foo:,bar:true
}
D: {
foo:
,bar:true
}
E: {
foo: # comment
,bar:true
}
F: {
# comment
foo:
,bar:true
}
G: {
# comment
foo:
# comment
,bar:true
}
H: {
foo: # comment
,
bar:true
}
I: {
bar: true, foo: }
J: { foo : }
---
A: true
B: {}
C: {bar:true
}
D: {
foo:
,bar:true
}
E: {
foo: # comment
,bar:true
}
F: {
# comment
foo:
,bar:true
}
G: {
# comment
foo:
# comment
,bar:true
}
H: {
foo: # comment
,
bar:true
}
I: {
bar: true, foo: }
J: { foo : }
---
A: true
B: {}
C: {bar:true
}
D: {bar:true
}
E: {
foo: # comment
,bar:true
}
F: {
# comment
foo:
,bar:true
}
G: {
# comment
foo:
# comment
,bar:true
}
H: {
foo: # comment
,
bar:true
}
I: {
bar: true, foo: }
J: { foo : }
---
A: true
B: {}
C: {bar:true
}
D: {bar:true
}
E: {bar:true
}
F: {
# comment
foo:
,bar:true
}
G: {
# comment
foo:
# comment
,bar:true
}
H: {
foo: # comment
,
bar:true
}
I: {
bar: true, foo: }
J: { foo : }
---
A: true
B: {}
C: {bar:true
}
D: {bar:true
}
E: {bar:true
}
F: {bar:true
}
G: {
# comment
foo:
# comment
,bar:true
}
H: {
foo: # comment
,
bar:true
}
I: {
bar: true, foo: }
J: { foo : }
---
A: true
B: {}
C: {bar:true
}
D: {bar:true
}
E: {bar:true
}
F: {bar:true
}
G: {bar:true
}
H: {
foo: # comment
,
bar:true
}
I: {
bar: true, foo: }
J: { foo : }
---
A: true
B: {}
C: {bar:true
}
D: {bar:true
}
E: {bar:true
}
F: {bar:true
}
G: {bar:true
}
H: {
bar:true
}
I: {
bar: true, foo: }
J: { foo : }
---
A: true
B: {}
C: {bar:true
}
D: {bar:true
}
E: {bar:true
}
F: {bar:true
}
G: {bar:true
}
H: {
bar:true
}
I: {
bar: true}
J: { foo : }
---
A: true
B: {}
C: {bar:true
}
D: {bar:true
}
E: {bar:true
}
F: {bar:true
}
G: {bar:true
}
H: {
bar:true
}
I: {
bar: true}
J: {}

0 comments on commit ca50d4b

Please sign in to comment.