tests: Trim .nim files trailing whitespace

via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
This commit is contained in:
Adam Strzelecki 2015-09-04 23:04:32 +02:00
commit e80465dacf
372 changed files with 4486 additions and 4486 deletions

View file

@ -3,16 +3,16 @@ discard """
line: 14
errormsg: "undeclared identifier: \'ha\'"
"""
# check for forward label and
# for failure when label is not declared
proc main =
block endLess:
write(stdout, "Muaahh!\N")
break endLess
break ha #ERROR
main()
# check for forward label and
# for failure when label is not declared
proc main =
block endLess:
write(stdout, "Muaahh!\N")
break endLess
break ha #ERROR
main()

View file

@ -6,7 +6,7 @@ var i = 0
while i < 400:
if i == 10: break
elif i == 3:
elif i == 3:
inc i
continue
inc i
@ -16,7 +16,7 @@ var j = 0
while j < 300:
for x in 0..34:
if j < 300: continue
if x == 10:
if x == 10:
echo "failure: should never happen"
break
f = "came here"

View file

@ -2,23 +2,23 @@ discard """
file: "tnestif.nim"
output: "i == 2"
"""
# test nested ifs
var
x, y: int
x = 2
if x == 0:
write(stdout, "i == 0")
if y == 0:
write(stdout, x)
else:
write(stdout, y)
elif x == 1:
write(stdout, "i == 1")
elif x == 2:
write(stdout, "i == 2")
else:
write(stdout, "looks like Python")
#OUT i == 2
# test nested ifs
var
x, y: int
x = 2
if x == 0:
write(stdout, "i == 0")
if y == 0:
write(stdout, x)
else:
write(stdout, y)
elif x == 1:
write(stdout, "i == 1")
elif x == 2:
write(stdout, "i == 2")
else:
write(stdout, "looks like Python")
#OUT i == 2

View file

@ -3,10 +3,10 @@ discard """
line: 9
errormsg: "statement not allowed after"
"""
# no statement after return
proc main() =
return
echo("huch?") #ERROR_MSG statement not allowed after
# no statement after return
proc main() =
return
echo("huch?") #ERROR_MSG statement not allowed after