tests: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
This commit is contained in:
parent
ac9c1cd6b9
commit
e80465dacf
372 changed files with 4486 additions and 4486 deletions
|
|
@ -14,4 +14,4 @@ do (x: int) -> int:
|
|||
echo("multi lines")
|
||||
return x
|
||||
|
||||
echo("end")
|
||||
echo("end")
|
||||
|
|
|
|||
|
|
@ -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!".}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue