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

@ -14,4 +14,4 @@ do (x: int) -> int:
echo("multi lines")
return x
echo("end")
echo("end")

View file

@ -3,13 +3,13 @@ discard """
line: 11
errormsg: "invalid indentation"
"""
# This was parsed even though it should not!
proc chdir(path: cstring): cint {.importc: "chdir", header: "dirHeader".}
proc getcwd(buf: cstring, buflen: cint): cstring
when defined(unix): {.importc: "getcwd", header: "<unistd.h>".} #ERROR_MSG invalid indentation
elif defined(windows): {.importc: "getcwd", header: "<direct.h>"}
else: {.error: "os library not ported to your OS. Please help!".}
# This was parsed even though it should not!
proc chdir(path: cstring): cint {.importc: "chdir", header: "dirHeader".}
proc getcwd(buf: cstring, buflen: cint): cstring
when defined(unix): {.importc: "getcwd", header: "<unistd.h>".} #ERROR_MSG invalid indentation
elif defined(windows): {.importc: "getcwd", header: "<direct.h>"}
else: {.error: "os library not ported to your OS. Please help!".}

View file

@ -2,7 +2,7 @@ discard """
file: "toprprec.nim"
output: "done"
"""
# Test operator precedence:
# Test operator precedence:
template `@` (x: expr): expr {.immediate.} = self.x
template `@!` (x: expr): expr {.immediate.} = x
@ -12,7 +12,7 @@ type
TO = object
x: int
TA = tuple[a, b: int, obj: TO]
proc init(self: var TA): string =
@a = 3
=== @b = 4
@ -22,10 +22,10 @@ proc init(self: var TA): string =
assert 3+5*5-2 == 28- -26-28
proc `^-` (x, y: int): int =
proc `^-` (x, y: int): int =
# now right-associative!
result = x - y
assert 34 ^- 6 ^- 2 == 30
assert 34 - 6 - 2 == 26