renamed writeln to writeLine in tests
This commit is contained in:
parent
b6252af5c6
commit
69e15ac32f
39 changed files with 456 additions and 456 deletions
|
|
@ -3,24 +3,24 @@
|
|||
import
|
||||
parseopt
|
||||
|
||||
proc writeHelp() =
|
||||
writeln(stdout, "Usage: tparsopt [options] filename [options]")
|
||||
proc writeHelp() =
|
||||
writeLine(stdout, "Usage: tparsopt [options] filename [options]")
|
||||
|
||||
proc writeVersion() =
|
||||
writeLine(stdout, "Version: 1.0.0")
|
||||
|
||||
proc writeVersion() =
|
||||
writeln(stdout, "Version: 1.0.0")
|
||||
|
||||
var
|
||||
filename = ""
|
||||
for kind, key, val in getopt():
|
||||
case kind
|
||||
of cmdArgument:
|
||||
of cmdArgument:
|
||||
filename = key
|
||||
of cmdLongOption, cmdShortOption:
|
||||
case key
|
||||
of "help", "h": writeHelp()
|
||||
of "version", "v": writeVersion()
|
||||
else:
|
||||
writeln(stdout, "Unknown command line option: ", key, ": ", val)
|
||||
else:
|
||||
writeLine(stdout, "Unknown command line option: ", key, ": ", val)
|
||||
of cmdEnd: assert(false) # cannot happen
|
||||
if filename == "":
|
||||
# no filename has been given, so we show the help:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue