 (ns uio.test-uio
   (:require [uio.uio :refer :all]
-            [uio.impl :refer [url->ext+s->s intercalate-with-dirs ensure-has-no-trailing-slash]]
+            [uio.impl :refer [ensure-has-no-trailing-slash
+                              intercalate-with-dirs
+                              url->ext+s->s]]
             [midje.sweet :refer :all])
   (:import (java.util.zip GZIPOutputStream)
            (org.apache.commons.compress.compressors CompressorStreamFactory)))

  (port          "foo://user@host:8080/some-dir/file.txt?arg=value") => 8080
  (path          "foo://user@host:8080/some-dir/file.txt?arg=value") => "/some-dir/file.txt"
  (path-no-slash "foo://user@host:8080/some-dir/file.txt?arg=value") => "some-dir/file.txt"

  (ensure-has-no-trailing-slash "test")                              => "test"
  (ensure-has-no-trailing-slash "test/")                             => "test"

                                                         {:url "456/456/3.txt"}
                                                         {:url "456/5.txt"}
                                                         {:url "789.txt"}])

(facts "Normalize works")