diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-06-08 00:00:00 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-06-08 00:00:00 +0200 |
commit | 9f82e07b2dc2ea89e1e35d5ec470fae84eab66b4 (patch) | |
tree | 0a9654fa2dbb34d9a58bd725d7d5d805279eed86 /nimpretty | |
parent | 2c03c9f42e882eaff4f8e8fa358b9c66ecdd803a (diff) | |
download | Nim-9f82e07b2dc2ea89e1e35d5ec470fae84eab66b4.tar.gz |
nimpretty: fixes #10156 [bugfix]
Diffstat (limited to 'nimpretty')
-rw-r--r-- | nimpretty/tests/expected/wrong_ind.nim | 49 | ||||
-rw-r--r-- | nimpretty/tests/wrong_ind.nim | 49 |
2 files changed, 98 insertions, 0 deletions
diff --git a/nimpretty/tests/expected/wrong_ind.nim b/nimpretty/tests/expected/wrong_ind.nim index a21e94618..9855e0c4d 100644 --- a/nimpretty/tests/expected/wrong_ind.nim +++ b/nimpretty/tests/expected/wrong_ind.nim @@ -22,3 +22,52 @@ proc funB() = 3 ] discard + + +# bug #10156 +proc foo = + ## Comment 1 + ## Comment 2 + discard + +proc bar = + ## Comment 3 + ## Comment 4 + ## More here. + discard + + +proc barB = + # Comment 5 + # Comment 6 + discard + + +var x: int = 2 + +echo x +# bug #9144 + +proc a() = + if cond: + while true: + discard + # comment 1 + # end while + #end if + + # comment 2 + #if + #case + #end case + #end if + discard + + +proc a() = + while true: + discard + # comment 1 + + # comment 2 + discard diff --git a/nimpretty/tests/wrong_ind.nim b/nimpretty/tests/wrong_ind.nim index 0559673f8..eaa561b51 100644 --- a/nimpretty/tests/wrong_ind.nim +++ b/nimpretty/tests/wrong_ind.nim @@ -22,3 +22,52 @@ proc funB() = 3 ] discard + + +# bug #10156 +proc foo = + ## Comment 1 + ## Comment 2 + discard + +proc bar = + ## Comment 3 + ## Comment 4 + ## More here. + discard + + +proc barB = + # Comment 5 + # Comment 6 + discard + + +var x: int = 2 + +echo x +# bug #9144 + +proc a() = + if cond: + while true: + discard + # comment 1 + # end while + #end if + + # comment 2 + #if + #case + #end case + #end if + discard + + +proc a() = + while true: + discard + # comment 1 + + # comment 2 + discard |