Created first draft for jar.clj and jar_test.clj

This commit is contained in:
Clemens Geibel 2020-02-04 19:21:14 +01:00
parent 4306a96d65
commit 505ab143a3
2 changed files with 37 additions and 0 deletions

View 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"))

View 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"))))
)