Clean up tests/stdlib
2 tests still fail: - tircbot would need a benign pragma because of the locks - tgetfileinfo uses os.getFileInfo() on nil, which segfaults instead of throwing an exception as the tester expects
This commit is contained in:
parent
1b91b3a2a5
commit
e0ae9f5248
3 changed files with 37 additions and 33 deletions
|
|
@ -32,7 +32,7 @@ proc caseOneAndTwo(followLink: bool) =
|
|||
try:
|
||||
discard getFileInfo(getAppFilename(), followLink)
|
||||
#echo("String : Existing File : Symlink $# : Success" % $followLink)
|
||||
except EOS:
|
||||
except OSError:
|
||||
echo("String : Existing File : Symlink $# : Failure" % $followLink)
|
||||
|
||||
proc caseThreeAndFour(followLink: bool) =
|
||||
|
|
@ -40,7 +40,8 @@ proc caseThreeAndFour(followLink: bool) =
|
|||
try:
|
||||
discard getFileInfo(invalidName, true)
|
||||
echo("String : Non-existing File : Symlink $# : Failure" % $followLink)
|
||||
except EOS:
|
||||
except OSError:
|
||||
discard
|
||||
#echo("String : Non-existing File : Symlink $# : Success" % $followLink)
|
||||
|
||||
proc testGetFileInfo =
|
||||
|
|
@ -82,12 +83,14 @@ proc testGetFileInfo =
|
|||
discard getFileInfo(testFile)
|
||||
echo("Handle : Invalid File : Failure")
|
||||
except EIO, EOS:
|
||||
discard
|
||||
#echo("Handle : Invalid File : Success")
|
||||
|
||||
try:
|
||||
discard getFileInfo(testHandle)
|
||||
echo("Handle : Invalid File : Failure")
|
||||
except EIO, EOS:
|
||||
discard
|
||||
#echo("Handle : Invalid File : Success")
|
||||
|
||||
testGetFileInfo()
|
||||
testGetFileInfo()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue