rcl/golden/cmd/patch_let_seq.test
Ruud van Asseldonk 606cdf08f5 Add more goldens to test 'rcl patch'
These tests together now provide 100% line coverage of rcl::patch.
2025-08-25 22:58:11 +02:00

29 lines
595 B
Text

# command: ["patch", "-", "a.b", "1"]
// This requires traversing let bindings in both a dict and list.
// In both cases, we also include a non-immediate match, and we throw
// in a SeqControl which is not a let-binding.
{
p = 0,
let a = [
let q = 0;
if q > 0:
let b = 0;
42
];
q = 0,
}
# output:
// This requires traversing let bindings in both a dict and list.
// In both cases, we also include a non-immediate match, and we throw
// in a SeqControl which is not a let-binding.
{
p = 0,
let a = [
let q = 0;
if q > 0:
let b = 1;
42
];
q = 0,
}