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

@ -9,4 +9,4 @@ if t==0x950412DE:
echo "equal"
else:
echo "not equal"

View file

@ -1,7 +1,7 @@
type
TArray = array[0x0012..0x0013, int]
var a: TArray
echo a[0x0012] #OUT 0

View file

@ -1,12 +1,12 @@
type
TIdObj* = object of TObject
id*: int # unique id; use this for comparisons and not the pointers
PIdObj* = ref TIdObj
PIdent* = ref TIdent
TIdent*{.acyclic.} = object
s*: string
TIdObj* = object of TObject
id*: int # unique id; use this for comparisons and not the pointers
PIdObj* = ref TIdObj
PIdent* = ref TIdent
TIdent*{.acyclic.} = object
s*: string
proc myNewString(L: int): string {.inline.} =
result = newString(L)
@ -15,8 +15,8 @@ proc myNewString(L: int): string {.inline.} =
for i in 0..L-1:
if result[i] == '\0':
echo("Correct")
else:
else:
echo("Wrong")
var s = myNewString(8)

View file

@ -17,7 +17,7 @@ mymacro:
echo "test"
else:
echo "else part"
if 4 == 3:
echo "bug"

View file

@ -1,60 +1,60 @@
discard """
disabled: true
"""
# We start with a comment
# This is the same comment
# This is a new one!
import
lexbase, os, strutils
type
TMyRec {.final.} = object
x, y: int # coordinates
c: char # a character
a: int32 # an integer
PMyRec = ref TMyRec # a reference to `TMyRec`
proc splitText(txt: string): seq[string] # splits a text into several lines
# the comment continues here
# this is not easy to parse!
proc anotherSplit(txt: string): seq[string] =
# the comment should belong to `anotherSplit`!
# another problem: comments are statements!
const
x = 0B0_10001110100_0000101001000111101011101111111011000101001101001001'f64 # x ~~ 1.72826e35
myNan = 0B01111111100000101100000000001000'f32 # NAN
y = """
a rather long text.
Over many
lines.
"""
s = "\xff"
a = {0..234}
b = {0..high(int)}
v = 0'i32
z = 6767566'f32
# small test program for lexbase
proc main*(infile: string, a, b: int, someverylongnamewithtype = 0,
anotherlongthingie = 3) =
var
myInt: int = 0
s: seq[string]
# this should be an error!
if initBaseLexer(L, infile, 30): nil
else:
writeLine(stdout, "could not open: " & infile)
writeLine(stdout, "Success!")
call(3, # we use 3
12, # we use 12
43) # we use 43
main(ParamStr(1), 9, 0)
discard """
disabled: true
"""
# We start with a comment
# This is the same comment
# This is a new one!
import
lexbase, os, strutils
type
TMyRec {.final.} = object
x, y: int # coordinates
c: char # a character
a: int32 # an integer
PMyRec = ref TMyRec # a reference to `TMyRec`
proc splitText(txt: string): seq[string] # splits a text into several lines
# the comment continues here
# this is not easy to parse!
proc anotherSplit(txt: string): seq[string] =
# the comment should belong to `anotherSplit`!
# another problem: comments are statements!
const
x = 0B0_10001110100_0000101001000111101011101111111011000101001101001001'f64 # x ~~ 1.72826e35
myNan = 0B01111111100000101100000000001000'f32 # NAN
y = """
a rather long text.
Over many
lines.
"""
s = "\xff"
a = {0..234}
b = {0..high(int)}
v = 0'i32
z = 6767566'f32
# small test program for lexbase
proc main*(infile: string, a, b: int, someverylongnamewithtype = 0,
anotherlongthingie = 3) =
var
myInt: int = 0
s: seq[string]
# this should be an error!
if initBaseLexer(L, infile, 30): nil
else:
writeLine(stdout, "could not open: " & infile)
writeLine(stdout, "Success!")
call(3, # we use 3
12, # we use 12
43) # we use 43
main(ParamStr(1), 9, 0)

View file

@ -6,9 +6,9 @@ discard """
const
tripleEmpty = """"long string"""""""" # "long string """""
rawQuote = r"a"""
raw = r"abc""def"
stdout.write(rawQuote)

View file

@ -3,7 +3,7 @@ discard """
line: 8
errormsg: "invalid token: _"
"""
# Bug #502670
# Bug #502670
var ef_ = 3 #ERROR_MSG invalid token: _
var a__b = 1