Updates to work under Nim 1.x
This commit is contained in:
@@ -76,7 +76,7 @@ Expectations JSON definitions follow this format:
|
||||
let args = commandLineParams()
|
||||
|
||||
var expectations: seq[Expectation] = @[]
|
||||
var follow = false
|
||||
var follow = false
|
||||
var cmd = "NOCMD"
|
||||
|
||||
if args.len == 0:
|
||||
@@ -128,7 +128,7 @@ Expectations JSON definitions follow this format:
|
||||
except:
|
||||
exitErr "could not open output file in write mode (" & filename &
|
||||
"):\n\t" & getCurrentExceptionMsg()
|
||||
|
||||
|
||||
elif arg.match(expPattern).isSome:
|
||||
var m = arg.match(expPattern).get().captures()
|
||||
expectations.add(Expectation(
|
||||
@@ -148,7 +148,7 @@ Expectations JSON definitions follow this format:
|
||||
elif arg == "-f": follow = true
|
||||
elif arg == "--": cmd = ""
|
||||
else: exitErr "unrecognized argument: " & arg
|
||||
|
||||
|
||||
if cmd == "NOCMD" and inStream.isNil:
|
||||
exitErr "no input file or command to execute."
|
||||
|
||||
@@ -161,7 +161,7 @@ Expectations JSON definitions follow this format:
|
||||
|
||||
# Init ncurses
|
||||
let stdscr = initscr()
|
||||
var height, width: int
|
||||
var height, width: cint
|
||||
getmaxyx(stdscr, height, width)
|
||||
|
||||
startColor()
|
||||
@@ -230,7 +230,7 @@ Expectations JSON definitions follow this format:
|
||||
|
||||
dispwin.wrefresh()
|
||||
firstPass = false
|
||||
|
||||
|
||||
logwin.wprintw("\n" & line)
|
||||
logwin.wrefresh()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user