diff --git a/faststreams.nimble b/faststreams.nimble index f93b569..6f7b4b8 100644 --- a/faststreams.nimble +++ b/faststreams.nimble @@ -10,11 +10,7 @@ skipDirs = @["tests"] requires "nim >= 0.17.0", "stew" -task test, "Run tests": - for filename in [ - "test_input_stream", - "test_output_stream" - ]: - exec "nim c -r tests/" & filename - rmFile "tests/" & filename +task test, "Run all tests": + exec "nim c -r --threads:off tests/all_tests" + exec "nim c -r --threads:on tests/all_tests" diff --git a/tests/all_tests.nim b/tests/all_tests.nim new file mode 100644 index 0000000..396b78c --- /dev/null +++ b/tests/all_tests.nim @@ -0,0 +1,4 @@ +import + test_input_stream, + test_output_stream + diff --git a/tests/test_output_stream.nim b/tests/test_output_stream.nim index 4514743..d62d582 100644 --- a/tests/test_output_stream.nim +++ b/tests/test_output_stream.nim @@ -47,10 +47,12 @@ suite "output stream": # fileContents = readFile(tempFilePath).string.bytes memStreamContents = memStream.getOutput - check altOutput == memStreamContents - # check altOutput == fileContents - check altOutput == makeOpenArray(cast[ptr byte](buffer), - existingBufferStream.pos) + let outputsMatch = + altOutput == memStreamContents and + altOutput == makeOpenArray(cast[ptr byte](buffer), + existingBufferStream.pos) + + check outputsMatch test "no appends produce an empty output": checkOutputsMatch()