From 69e2b61c0a990452045d2157c095edfe9225a59b Mon Sep 17 00:00:00 2001 From: def Date: Tue, 10 Mar 2015 15:34:15 +0100 Subject: [PATCH] Fix tests a bit more --- tests/assert/tfailedassert.nim | 2 +- tests/manyloc/argument_parser/ex_wget.nim | 8 ++++---- tests/modules/trecinca.nim | 4 ++-- tests/modules/trecincb.nim | 4 ++-- tests/stdlib/tgetfileinfo.nim | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/assert/tfailedassert.nim b/tests/assert/tfailedassert.nim index 16769f529..729cdcac7 100644 --- a/tests/assert/tfailedassert.nim +++ b/tests/assert/tfailedassert.nim @@ -3,7 +3,7 @@ discard """ WARNING: false first assertion from bar ERROR: false second assertion from bar -1 -tfailedassert.nim:27 false assertion from foo +tests/assert/tfailedassert.nim:27 false assertion from foo ''' """ diff --git a/tests/manyloc/argument_parser/ex_wget.nim b/tests/manyloc/argument_parser/ex_wget.nim index d36947b34..625a6f595 100644 --- a/tests/manyloc/argument_parser/ex_wget.nim +++ b/tests/manyloc/argument_parser/ex_wget.nim @@ -8,8 +8,8 @@ const PARAM_BACKGROUND = @["-b", "--background"] PARAM_OUTPUT = @["-o", "--output"] PARAM_NO_CLOBBER = @["-nc", "--no-clobber"] - PARAM_PROGRESS = "--progress" - PARAM_NO_PROXY = "--no-proxy" + PARAM_PROGRESS = @["--progress"] + PARAM_NO_PROXY = @["--no-proxy"] template P(tnames: varargs[string], thelp: string, ttype = PK_EMPTY, @@ -77,8 +77,8 @@ proc process_commandline(): Tcommandline_results = quit() echo "Will download to $1" % [result.options[PARAM_OUTPUT[0]].str_val] - if result.options.hasKey(PARAM_PROGRESS): - echo "Will use progress type $1" % [result.options[PARAM_PROGRESS].str_val] + if result.options.hasKey(PARAM_PROGRESS[0]): + echo "Will use progress type $1" % [result.options[PARAM_PROGRESS[0]].str_val] when isMainModule: diff --git a/tests/modules/trecinca.nim b/tests/modules/trecinca.nim index bedea8d7e..14a91ba5c 100644 --- a/tests/modules/trecinca.nim +++ b/tests/modules/trecinca.nim @@ -1,11 +1,11 @@ discard """ file: "tests/reject/trecincb.nim" line: 9 - errormsg: "recursive dependency: 'trecincb.nim'" + errormsg: "recursive dependency: 'tests/modules/trecincb.nim'" """ # Test recursive includes -include trecincb #ERROR_MSG recursive dependency: 'tests/trecincb.nim' +include trecincb echo "trecina" diff --git a/tests/modules/trecincb.nim b/tests/modules/trecincb.nim index eb0f72db0..299a242e1 100644 --- a/tests/modules/trecincb.nim +++ b/tests/modules/trecincb.nim @@ -1,12 +1,12 @@ discard """ file: "trecincb.nim" line: 9 - errormsg: "recursive dependency: 'trecincb.nim'" + errormsg: "recursive dependency: 'tests/modules/trecincb.nim'" """ # Test recursive includes -include trecincb #ERROR_MSG recursive dependency: 'tests/trecincb.nim' +include trecincb echo "trecinb" diff --git a/tests/stdlib/tgetfileinfo.nim b/tests/stdlib/tgetfileinfo.nim index c8e496cc1..8a0538a5f 100644 --- a/tests/stdlib/tgetfileinfo.nim +++ b/tests/stdlib/tgetfileinfo.nim @@ -65,13 +65,13 @@ proc testGetFileInfo = try: discard getFileInfo(testFile) #echo("Handle : Valid File : Success") - except EIO: + except IOError: echo("Handle : Valid File : Failure") try: discard getFileInfo(testHandle) #echo("Handle : Valid File : Success") - except EIO: + except IOError: echo("Handle : Valid File : Failure") # Case 6 and 8 @@ -82,14 +82,14 @@ proc testGetFileInfo = try: discard getFileInfo(testFile) echo("Handle : Invalid File : Failure") - except EIO, EOS: + except IOError, OSError: discard #echo("Handle : Invalid File : Success") try: discard getFileInfo(testHandle) echo("Handle : Invalid File : Failure") - except EIO, EOS: + except IOError, OSError: discard #echo("Handle : Invalid File : Success")