Next test to pass

This commit is contained in:
jem 2020-01-20 22:03:16 +01:00
parent 7e39965e14
commit 214b31eb99
2 changed files with 14 additions and 3 deletions

View file

@ -176,6 +176,8 @@
:from-fs from-fs)
result (into result
[resource-to-work-with])]
; (println path-to-work-with)
; (println (:java-path resource-to-work-with))
(cond
(nil? resource-to-work-with) []
(is-file? resource-to-work-with)

View file

@ -21,14 +21,16 @@
(def target "target/tmp")
; TODO: Fix this test!
(deftest test-file-from-cp
(is
(sut/path-from-cp "dummy")))
; TODO: one dummy from jar and one dummy from cp-filesystem and one from filesystem
; get resources and see all
(deftest test-resource-from-cp-or-fs
(is
(some? (sut/resource-from-cp-or-fs
"not-existing-filesystem-path"
""
"dummy")))
(is
(Files/exists
(:java-path
@ -63,6 +65,13 @@
(is (=
[]
(sut/get-resources-recursive "" "templates/themes/bootstrap4-test" ["not-existing"])))
; TODO: one dummy from jar and one dummy from cp-filesystem and one from filesystem
; get resources and see all
(is (=
[{:short-path "dummy", :source-type :classpath, :resource-type :dir}
{:short-path "dummy/dummy_from_jar", :source-type :classpath, :resource-type :file}]
(map ftt/filter-object
(sut/get-resources-recursive "not-existing" "" ["dummy"]))))
(is (=
[{:short-path "js/dummy.js"
:source-type :classpath