Failing test case for standalone-install bug.
This commit is contained in:
parent
dad7910664
commit
b17731b748
3 changed files with 14 additions and 3 deletions
|
@ -18,6 +18,7 @@
|
|||
(when-let [bin-name ((manifest-map (.getManifest jarfile))
|
||||
"Leiningen-shell-wrapper")]
|
||||
(let [bin-file (file (bin-path) (last (.split bin-name "/")))]
|
||||
(.mkdirs (.getParentFile bin-file))
|
||||
(println "Installing shell wrapper to" (.getAbsolutePath bin-file))
|
||||
(copy (.getInputStream jarfile (.getEntry jarfile bin-name)) bin-file)
|
||||
(.setExecutable bin-file true))))
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
(ns test-install
|
||||
(:use [leiningen.core :only [read-project defproject]]
|
||||
(:use [leiningen.core :only [read-project defproject home-dir]]
|
||||
[leiningen.install] :reload-all)
|
||||
(:use [clojure.test]
|
||||
[clojure.contrib.io :only [delete-file-recursively file]]
|
||||
[clojure.contrib.shell :only [with-sh-dir sh]]))
|
||||
|
||||
(def m2-dir (file (System/getProperty "user.home") ".m2" "repository"
|
||||
"nomnomnom" "nomnomnom" "0.5.0-SNAPSHOT"))
|
||||
(def local-repo (file (System/getProperty "user.home") ".m2" "repository"))
|
||||
|
||||
(def m2-dir (file local-repo "nomnomnom" "nomnomnom" "0.5.0-SNAPSHOT"))
|
||||
|
||||
(defonce test-project (read-project "test_projects/sample/project.clj"))
|
||||
|
||||
|
@ -14,3 +15,11 @@
|
|||
(delete-file-recursively m2-dir true)
|
||||
(install test-project)
|
||||
(is (not (empty? (.listFiles m2-dir)))))
|
||||
|
||||
(def jdom-dir (file local-repo "jdom" "jdom" "1.0"))
|
||||
|
||||
(deftest test-standalone-install
|
||||
(delete-file-recursively jdom-dir true)
|
||||
(install "nomnomnom" "0.5.0-SNAPSHOT")
|
||||
(is (not (empty? (.listFiles jdom-dir))))
|
||||
(is (.exists (file (home-dir) "bin" "nom"))))
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
(def clj-version "1.1.0-master-SNAPSHOT")
|
||||
|
||||
(defproject nomnomnom "0.5.0-SNAPSHOT"
|
||||
:description "A test project"
|
||||
:dependencies [[~(symbol "org.clojure" "clojure") ~clj-version]
|
||||
[rome/rome ~(str "0." "9")]
|
||||
[org.ccil.cowan.tagsoup/tagsoup "1.2"]]
|
||||
|
|
Loading…
Reference in a new issue