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,12 +1,14 @@
|
||||||
import posix
|
|
||||||
|
|
||||||
var inp = ""
|
when not defined(windows):
|
||||||
var buf: array[0..10, char]
|
import posix
|
||||||
while true:
|
|
||||||
var r = read(0, addr(buf), sizeof(buf)-1)
|
|
||||||
add inp, $buf
|
|
||||||
if r != sizeof(buf)-1: break
|
|
||||||
|
|
||||||
echo inp
|
var inp = ""
|
||||||
#dafkladskölklödsaf ölksdakölfölksfklwe4iojr389wr 89uweokf sdlkf jweklr jweflksdj fioewjfsdlfsd
|
var buf: array[0..10, char]
|
||||||
|
while true:
|
||||||
|
var r = read(0, addr(buf), sizeof(buf)-1)
|
||||||
|
add inp, $buf
|
||||||
|
if r != sizeof(buf)-1: break
|
||||||
|
|
||||||
|
echo inp
|
||||||
|
#dafkladskölklödsaf ölksdakölfölksfklwe4iojr389wr 89uweokf sdlkf jweklr jweflksdj fioewjfsdlfsd
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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