renamed writeln to writeLine in tests
This commit is contained in:
parent
b6252af5c6
commit
69e15ac32f
39 changed files with 456 additions and 456 deletions
|
|
@ -137,11 +137,11 @@ proc doScenario(script: string, output: Stream, mode: TRunMode, verbose: bool):
|
|||
if line.strip.len == 0: continue
|
||||
|
||||
if line.startsWith("#"):
|
||||
output.writeln line
|
||||
output.writeLine line
|
||||
continue
|
||||
elif line.startsWith(">"):
|
||||
s.doCommand(line.substr(1).strip)
|
||||
output.writeln line, "\n", if verbose: s.lastOutput else: ""
|
||||
output.writeLine line, "\n", if verbose: s.lastOutput else: ""
|
||||
else:
|
||||
var expectMatch = true
|
||||
var pattern = s.replaceVars(line)
|
||||
|
|
@ -153,9 +153,9 @@ proc doScenario(script: string, output: Stream, mode: TRunMode, verbose: bool):
|
|||
s.lastOutput.find(re(pattern, flags = {reStudy})) != -1
|
||||
|
||||
if expectMatch == actualMatch:
|
||||
output.writeln "SUCCESS ", line
|
||||
output.writeLine "SUCCESS ", line
|
||||
else:
|
||||
output.writeln "FAILURE ", line
|
||||
output.writeLine "FAILURE ", line
|
||||
result = false
|
||||
|
||||
iterator caasTestsRunner*(filter = "", verbose = false): tuple[test,
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ proc generateHtml*(filename: string, commit: int; onlyFailing: bool) =
|
|||
# generate navigation:
|
||||
outfile.write("""<ul id="tabs">""")
|
||||
for m in db.rows(sql"select id, name, os, cpu from Machine order by id"):
|
||||
outfile.writeln """<li><a href="#$#">$#: $#, $#</a></li>""" % m
|
||||
outfile.writeLine """<li><a href="#$#">$#: $#, $#</a></li>""" % m
|
||||
outfile.write("</ul>")
|
||||
|
||||
for currentMachine in db.rows(sql"select id from Machine order by id"):
|
||||
|
|
@ -195,7 +195,7 @@ proc generateJson*(filename: string, commit: int) =
|
|||
let machine = $backend.getMachine(db)
|
||||
let data = db.getRow(sql(selRow), lastCommit, machine)
|
||||
|
||||
outfile.writeln("""{"total": $#, "passed": $#, "skipped": $#""" % data)
|
||||
outfile.writeLine("""{"total": $#, "passed": $#, "skipped": $#""" % data)
|
||||
|
||||
let results = newJArray()
|
||||
for row in db.rows(sql(selResults), lastCommit):
|
||||
|
|
@ -208,7 +208,7 @@ proc generateJson*(filename: string, commit: int) =
|
|||
obj["expected"] = %row[5]
|
||||
obj["given"] = %row[6]
|
||||
results.add(obj)
|
||||
outfile.writeln(""", "results": """)
|
||||
outfile.writeLine(""", "results": """)
|
||||
outfile.write(results.pretty)
|
||||
|
||||
if not previousCommit.isNil:
|
||||
|
|
@ -220,9 +220,9 @@ proc generateJson*(filename: string, commit: int) =
|
|||
obj["old"] = %row[1]
|
||||
obj["new"] = %row[2]
|
||||
diff.add obj
|
||||
outfile.writeln(""", "diff": """)
|
||||
outfile.writeln(diff.pretty)
|
||||
outfile.writeLine(""", "diff": """)
|
||||
outfile.writeLine(diff.pretty)
|
||||
|
||||
outfile.writeln "}"
|
||||
outfile.writeLine "}"
|
||||
close(db)
|
||||
close(outfile)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue