aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorpacien2018-11-25 21:09:29 +0100
committerpacien2018-11-25 21:09:29 +0100
commit30b8c8e9448c830ffccb0941aa3cac7a6cbb1a34 (patch)
treee9fb1014830af17259c00a665caead3db9361d09 /tests
parentc72f900ccc894aa8830ffe500e88aa0afc0ca8a0 (diff)
downloadgziplike-30b8c8e9448c830ffccb0941aa3cac7a6cbb1a34.tar.gz
Add binary identity test
Diffstat (limited to 'tests')
-rw-r--r--tests/tmain.nim10
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