diff options
| author | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-10 22:12:41 +0100 |
|---|---|---|
| committer | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-10 22:12:41 +0100 |
| commit | 9596dadf3ad99aefec2547f4f8294d772811d8be (patch) | |
| tree | 3dbcd78b5acfdb34d8e6053fa4517a5c619c11ac | |
| parent | cd1e464c11fb84ef8319e52019c23c0a91d5e3a7 (diff) | |
| download | sylt-9596dadf3ad99aefec2547f4f8294d772811d8be.tar.gz | |
add regression tests
| -rw-r--r-- | src/lib.rs | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -1050,4 +1050,33 @@ a.a <=> 0" simple: "a := 1 // blargh \na += 1 // blargh \n a <=> 2 // HARGH", expressions: "1 + 1 // blargh \n 2 // blargh \n // HARGH \n", ); + + test_multiple!( + assignment_op_regression, + simple_add: " +a := 0 +b := 99999 +a += 1 +a <=> 1 +", + + simple_sub: " +a := 0 +b := 99999 +a -= 1 +a <=> -1 +", + + strange: " +a := 0 +{ + b := 99999 + { + a := 99999 + } + a -= 1 +} +a <=> -1 +", + ); } |
