small fixes for tests on windows
This commit is contained in:
parent
a7e9ae55f4
commit
e4a4588b48
5 changed files with 15 additions and 13 deletions
|
|
@ -823,7 +823,7 @@ proc evalInclude(c: PContext, n: PNode): PNode =
|
||||||
var f = checkModuleName(n.sons[i])
|
var f = checkModuleName(n.sons[i])
|
||||||
var fileIndex = f.fileInfoIdx
|
var fileIndex = f.fileInfoIdx
|
||||||
if ContainsOrIncl(c.includedFiles, fileIndex):
|
if ContainsOrIncl(c.includedFiles, fileIndex):
|
||||||
GlobalError(n.info, errRecursiveDependencyX, f.shortenDir)
|
GlobalError(n.info, errRecursiveDependencyX, f.extractFilename)
|
||||||
addSon(result, semStmt(c, gIncludeFile(f)))
|
addSon(result, semStmt(c, gIncludeFile(f)))
|
||||||
Excl(c.includedFiles, fileIndex)
|
Excl(c.includedFiles, fileIndex)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
|
||||||
|
when not defined(windows):
|
||||||
import posix
|
import posix
|
||||||
|
|
||||||
var inp = ""
|
var inp = ""
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
discard """
|
discard """
|
||||||
file: "trecincb.nim"
|
file: "trecincb.nim"
|
||||||
line: 9
|
line: 9
|
||||||
errormsg: "recursive dependency: 'tests/reject/trecincb.nim'"
|
errormsg: "recursive dependency: 'trecincb.nim'"
|
||||||
"""
|
"""
|
||||||
# Test recursive includes
|
# Test recursive includes
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
discard """
|
discard """
|
||||||
file: "trecincb.nim"
|
file: "trecincb.nim"
|
||||||
line: 9
|
line: 9
|
||||||
errormsg: "recursive dependency: 'tests/reject/trecincb.nim'"
|
errormsg: "recursive dependency: 'trecincb.nim'"
|
||||||
"""
|
"""
|
||||||
# Test recursive includes
|
# Test recursive includes
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ discard """
|
||||||
"""
|
"""
|
||||||
|
|
||||||
template myAssert(cond: expr) =
|
template myAssert(cond: expr) =
|
||||||
when rand(3) < 2:
|
when rand(3) < 3:
|
||||||
let c = cond.astToStr
|
let c = cond.astToStr
|
||||||
if not cond:
|
if not cond:
|
||||||
echo c, "ugh"
|
echo c, "ugh"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue