Fix tests a bit more
This commit is contained in:
parent
573fa9b891
commit
69e2b61c0a
5 changed files with 13 additions and 13 deletions
|
|
@ -3,7 +3,7 @@ discard """
|
||||||
WARNING: false first assertion from bar
|
WARNING: false first assertion from bar
|
||||||
ERROR: false second assertion from bar
|
ERROR: false second assertion from bar
|
||||||
-1
|
-1
|
||||||
tfailedassert.nim:27 false assertion from foo
|
tests/assert/tfailedassert.nim:27 false assertion from foo
|
||||||
'''
|
'''
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ const
|
||||||
PARAM_BACKGROUND = @["-b", "--background"]
|
PARAM_BACKGROUND = @["-b", "--background"]
|
||||||
PARAM_OUTPUT = @["-o", "--output"]
|
PARAM_OUTPUT = @["-o", "--output"]
|
||||||
PARAM_NO_CLOBBER = @["-nc", "--no-clobber"]
|
PARAM_NO_CLOBBER = @["-nc", "--no-clobber"]
|
||||||
PARAM_PROGRESS = "--progress"
|
PARAM_PROGRESS = @["--progress"]
|
||||||
PARAM_NO_PROXY = "--no-proxy"
|
PARAM_NO_PROXY = @["--no-proxy"]
|
||||||
|
|
||||||
|
|
||||||
template P(tnames: varargs[string], thelp: string, ttype = PK_EMPTY,
|
template P(tnames: varargs[string], thelp: string, ttype = PK_EMPTY,
|
||||||
|
|
@ -77,8 +77,8 @@ proc process_commandline(): Tcommandline_results =
|
||||||
quit()
|
quit()
|
||||||
echo "Will download to $1" % [result.options[PARAM_OUTPUT[0]].str_val]
|
echo "Will download to $1" % [result.options[PARAM_OUTPUT[0]].str_val]
|
||||||
|
|
||||||
if result.options.hasKey(PARAM_PROGRESS):
|
if result.options.hasKey(PARAM_PROGRESS[0]):
|
||||||
echo "Will use progress type $1" % [result.options[PARAM_PROGRESS].str_val]
|
echo "Will use progress type $1" % [result.options[PARAM_PROGRESS[0]].str_val]
|
||||||
|
|
||||||
|
|
||||||
when isMainModule:
|
when isMainModule:
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
discard """
|
discard """
|
||||||
file: "tests/reject/trecincb.nim"
|
file: "tests/reject/trecincb.nim"
|
||||||
line: 9
|
line: 9
|
||||||
errormsg: "recursive dependency: 'trecincb.nim'"
|
errormsg: "recursive dependency: 'tests/modules/trecincb.nim'"
|
||||||
"""
|
"""
|
||||||
# Test recursive includes
|
# Test recursive includes
|
||||||
|
|
||||||
include trecincb #ERROR_MSG recursive dependency: 'tests/trecincb.nim'
|
include trecincb
|
||||||
|
|
||||||
echo "trecina"
|
echo "trecina"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
discard """
|
discard """
|
||||||
file: "trecincb.nim"
|
file: "trecincb.nim"
|
||||||
line: 9
|
line: 9
|
||||||
errormsg: "recursive dependency: 'trecincb.nim'"
|
errormsg: "recursive dependency: 'tests/modules/trecincb.nim'"
|
||||||
"""
|
"""
|
||||||
# Test recursive includes
|
# Test recursive includes
|
||||||
|
|
||||||
|
|
||||||
include trecincb #ERROR_MSG recursive dependency: 'tests/trecincb.nim'
|
include trecincb
|
||||||
|
|
||||||
echo "trecinb"
|
echo "trecinb"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,13 +65,13 @@ proc testGetFileInfo =
|
||||||
try:
|
try:
|
||||||
discard getFileInfo(testFile)
|
discard getFileInfo(testFile)
|
||||||
#echo("Handle : Valid File : Success")
|
#echo("Handle : Valid File : Success")
|
||||||
except EIO:
|
except IOError:
|
||||||
echo("Handle : Valid File : Failure")
|
echo("Handle : Valid File : Failure")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
discard getFileInfo(testHandle)
|
discard getFileInfo(testHandle)
|
||||||
#echo("Handle : Valid File : Success")
|
#echo("Handle : Valid File : Success")
|
||||||
except EIO:
|
except IOError:
|
||||||
echo("Handle : Valid File : Failure")
|
echo("Handle : Valid File : Failure")
|
||||||
|
|
||||||
# Case 6 and 8
|
# Case 6 and 8
|
||||||
|
|
@ -82,14 +82,14 @@ proc testGetFileInfo =
|
||||||
try:
|
try:
|
||||||
discard getFileInfo(testFile)
|
discard getFileInfo(testFile)
|
||||||
echo("Handle : Invalid File : Failure")
|
echo("Handle : Invalid File : Failure")
|
||||||
except EIO, EOS:
|
except IOError, OSError:
|
||||||
discard
|
discard
|
||||||
#echo("Handle : Invalid File : Success")
|
#echo("Handle : Invalid File : Success")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
discard getFileInfo(testHandle)
|
discard getFileInfo(testHandle)
|
||||||
echo("Handle : Invalid File : Failure")
|
echo("Handle : Invalid File : Failure")
|
||||||
except EIO, EOS:
|
except IOError, OSError:
|
||||||
discard
|
discard
|
||||||
#echo("Handle : Invalid File : Success")
|
#echo("Handle : Invalid File : Success")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue