mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-19 07:21:19 +00:00
Fix guard for streams tests
This commit is contained in:
@@ -449,7 +449,7 @@ else:
|
||||
if handle < 0: raise newEOS("posix.open() call failed")
|
||||
result = newFileHandleStream(handle)
|
||||
|
||||
when defined(testing):
|
||||
when isMainModule and defined(testing):
|
||||
var ss = newStringStream("The quick brown fox jumped over the lazy dog.\nThe lazy dog ran")
|
||||
assert(ss.getPosition == 0)
|
||||
assert(ss.peekStr(5) == "The q")
|
||||
|
||||
Reference in New Issue
Block a user