diff options
-rw-r--r-- | tests/tmain.nim | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/tmain.nim b/tests/tmain.nim index 2deb443..07d9c35 100644 --- a/tests/tmain.nim +++ b/tests/tmain.nim | |||
@@ -23,10 +23,18 @@ suite "main": | |||
23 | setup: createDir(tempDir) | 23 | setup: createDir(tempDir) |
24 | teardown: removeDir(tempDir) | 24 | teardown: removeDir(tempDir) |
25 | 25 | ||
26 | test "identity": | 26 | test "identity (text)": |
27 | let input = "license.md" | 27 | let input = "license.md" |
28 | let intermediate = tempDir / "compressed" | 28 | let intermediate = tempDir / "compressed" |
29 | let final = tempDir / "decompressed" | 29 | let final = tempDir / "decompressed" |
30 | compress.transform(input, intermediate) | 30 | compress.transform(input, intermediate) |
31 | decompress.transform(intermediate, final) | 31 | decompress.transform(intermediate, final) |
32 | check startProcess("cmp", args=[input, final], options={poUsePath}).waitForExit() == 0 | 32 | check startProcess("cmp", args=[input, final], options={poUsePath}).waitForExit() == 0 |
33 | |||
34 | test "identity (binary)": | ||
35 | let input = "tests" / "tmain" | ||
36 | let intermediate = tempDir / "compressed" | ||
37 | let final = tempDir / "decompressed" | ||
38 | compress.transform(input, intermediate) | ||
39 | decompress.transform(intermediate, final) | ||
40 | check startProcess("cmp", args=[input, final], options={poUsePath}).waitForExit() == 0 | ||