Permalink
Browse files

Merge pull request #33 from deduktion/patch-1

zip should not change content
  • Loading branch information...
2 parents f87d554 + eb8138f commit 8b191d63fbe58d6035538dbe79318d2c6a2ebe35 @Raynes committed Nov 8, 2012
Showing with 6 additions and 1 deletion.
  1. +1 −1 src/fs/compression.clj
  2. +5 −0 test/fs/core_test.clj
View
@@ -27,7 +27,7 @@
(.putNextEntry zip-output-stream (java.util.zip.ZipEntry. name))
(if (string? content) ;string and byte-array must have different methods
(doto (java.io.PrintStream. zip-output-stream true)
- (.println content))
+ (.print content))
(.write zip-output-stream content))
(.closeEntry zip-output-stream)
(when (seq (drop 1 remain))
View
@@ -269,6 +269,11 @@
(delete "fro.zip")
(delete-dir "fro"))
+ (fact "about zip round trip"
+ (zip "round.zip" ["some.txt" "some text"])
+ (unzip "round.zip" "round")
+ (slurp (file "round/some.txt")) => "some text")
+
(fact
(untar "ggg.tar" "zggg")
(exists? "zggg/ggg") => true

0 comments on commit 8b191d6

Please sign in to comment.