added a test for 'nim doc'

This commit is contained in:
Andreas Rumpf 2018-09-07 13:13:35 +02:00 • committed by Araq
commit b017138c32
10 changed files with 2696 additions and 7 deletions

View file

@ -63,7 +63,7 @@ proc fileInfoKnown*(conf: ConfigRef; filename: AbsoluteFile): bool =
canon: AbsoluteFile
try:
canon = canonicalizePath(conf, filename)
except:
except OSError:
canon = filename
result = conf.m.filenameToIndexTbl.hasKey(canon.string)
@ -75,7 +75,7 @@ proc fileInfoIdx*(conf: ConfigRef; filename: AbsoluteFile; isKnownFile: var bool
try:
canon = canonicalizePath(conf, filename)
shallow(canon.string)
except:
except OSError:
canon = filename
# The compiler uses "filenames" such as `command line` or `stdin`
# This flag indicates that we are working with such a path here