diff options
author | Flaviu Tamas <tamasflaviu@gmail.com> | 2015-05-25 11:49:23 -0400 |
---|---|---|
committer | Flaviu Tamas <tamasflaviu@gmail.com> | 2015-05-25 18:13:20 -0400 |
commit | d3fc943b6d1bf2815bcd77d9a8b5535dc83df468 (patch) | |
tree | 3133fd775b6f0c7f80439353c75db99a18645b59 | |
parent | 55e126c5c8ed63580110110fe56a7c7995940c14 (diff) | |
download | Nim-d3fc943b6d1bf2815bcd77d9a8b5535dc83df468.tar.gz |
Fix guard for streams tests
-rw-r--r-- | lib/pure/streams.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/streams.nim b/lib/pure/streams.nim index f51c979eb..c85a09bad 100644 --- a/lib/pure/streams.nim +++ b/lib/pure/streams.nim @@ -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") |