Fix a few leiningen-core tests.
This commit is contained in:
parent
7cc7afc61b
commit
69b03bf327
2 changed files with 8 additions and 8 deletions
|
@ -155,7 +155,7 @@ corresponding .class files before performing actual compilation."
|
|||
(let [classpath (map io/file (classpath/get-classpath project))
|
||||
classloader (cl/classlojure classpath)]
|
||||
;; TODO: special-case :java.library.path
|
||||
(doseq [opt (get-jvm-args)
|
||||
(doseq [opt (get-jvm-args project)
|
||||
:when (.startsWith opt "-D")
|
||||
:let [[_ k v] (re-find #"^-D(.*?)=(.*)$" opt)]]
|
||||
(System/setProperty k v))
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
:compile-path "/tmp/lein-sample-project/classes"})
|
||||
|
||||
(deftest test-eval-in-project
|
||||
(doseq [where [:subprocess :leiningen :classloader]]
|
||||
(let [file (File/createTempFile "lein-eval-test" nil)]
|
||||
(eval-in-project
|
||||
(assoc project :eval-in where)
|
||||
`(spit ~(.getPath file) "foo"))
|
||||
(is (= "foo" (slurp file)))
|
||||
(.delete file))))
|
||||
(with-redefs [prep-tasks (atom #{})]
|
||||
(doseq [where [:subprocess :leiningen :classloader]]
|
||||
(let [file (File/createTempFile "lein-eval-test" nil)]
|
||||
(eval-in-project (assoc project :eval-in where)
|
||||
`(spit ~(.getPath file) "foo"))
|
||||
(is (= "foo" (slurp file)))
|
||||
(.delete file)))))
|
||||
|
|
Loading…
Reference in a new issue