Created first draft for jar.clj and jar_test.clj
This commit is contained in:
parent
4306a96d65
commit
505ab143a3
2 changed files with 37 additions and 0 deletions
17
src/cryogen_core/classpath_able_io/jar.clj
Normal file
17
src/cryogen_core/classpath_able_io/jar.clj
Normal file
|
@ -0,0 +1,17 @@
|
|||
; Copyright (c) meissa. All rights reserved.
|
||||
; The use and distribution terms for this software are covered by the
|
||||
; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
|
||||
; which can be found in the file epl-v10.html at the root of this distribution.
|
||||
; By using this software in any fashion, you are agreeing to be bound by
|
||||
; the terms of this license.
|
||||
; You must not remove this notice, or any other, from this software.
|
||||
|
||||
(ns cryogen-core.classpath-able-io.jar
|
||||
(:require [cryogen-core.classpath-able-io.type :as type])
|
||||
(:import [java.net URI]
|
||||
[java.nio.file Paths Files LinkOption]))
|
||||
|
||||
(defn is-from-classpath-jar?
|
||||
[uri ;:- JavaUri
|
||||
]
|
||||
(= (.getScheme uri) "jar"))
|
20
test/cryogen_core/classpath_able_io/jar_test.clj
Normal file
20
test/cryogen_core/classpath_able_io/jar_test.clj
Normal file
|
@ -0,0 +1,20 @@
|
|||
; Copyright (c) meissa. All rights reserved.
|
||||
; The use and distribution terms for this software are covered by the
|
||||
; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
|
||||
; which can be found in the file epl-v10.html at the root of this distribution.
|
||||
; By using this software in any fashion, you are agreeing to be bound by
|
||||
; the terms of this license.
|
||||
; You must not remove this notice, or any other, from this software.
|
||||
|
||||
(ns cryogen-core.classpath-able-io.jar-test
|
||||
(:require [clojure.test :refer :all]
|
||||
[clojure.java.io :as io]
|
||||
[schema.core :as s]
|
||||
[cryogen-core.file-test-tools :as ftt]
|
||||
[cryogen-core.classpath-able-io.jar :as sut])
|
||||
(:import [java.net URI]))
|
||||
|
||||
(deftest test-is-from-classpath-jar?
|
||||
(is
|
||||
(sut/is-from-classpath-jar? (.toURI (io/resource "dummy"))))
|
||||
)
|
Loading…
Reference in a new issue