Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

A few more tests to reduce risk of regressions #77

Merged
merged 1 commit into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: {}