Fix native-path and repl test failures.

This commit is contained in:
Phil Hagelberg 2012-04-18 21:49:50 -07:00
parent a7ea1c5b5a
commit 5f5c0cdbab
2 changed files with 9 additions and 9 deletions

View file

@ -15,7 +15,7 @@
:test-paths ["test"],
:resource-paths ["dev-resources" "resources"],
:compile-path "target/classes",
:native-path "native",
:native-path "target/native",
:target-path "target"})
(def expected {:name "leiningen", :group "leiningen",

View file

@ -6,14 +6,14 @@
(let [project {}]
(is (= {:attach "9876"
:custom-init nil}
(options-for-reply 9876 project)))))
(options-for-reply project :attach 9876)))))
(deftest test-options-for-reply-host
(let [project {:repl-options {:host "127.0.0.1"}}]
(is (= {:attach "127.0.0.1:9876"
:host "127.0.0.1"
:custom-init nil}
(options-for-reply 9876 project)))))
(options-for-reply project :attach 9876)))))
(deftest test-options-for-reply-prompt
(let [prompt-fn (fn [ns] "hi ")
@ -21,14 +21,14 @@
(is (= {:attach "9876"
:custom-prompt prompt-fn
:custom-init nil}
(options-for-reply 9876 project)))))
(options-for-reply project :attach 9876)))))
(deftest test-options-for-reply-init
(let [init-form '(println "ohai")
project {:repl-options {:init init-form}}]
(is (= {:attach "9876"
:custom-init init-form}
(options-for-reply 9876 project)))))
(options-for-reply project :attach 9876)))))
(deftest test-options-for-reply-init-ns
(let [project {:repl-options {:init-ns 'foo.core}}]
@ -37,7 +37,7 @@
:custom-init '(do (clojure.core/require 'foo.core)
(clojure.core/in-ns 'foo.core)
nil)}
(options-for-reply 9876 project)))))
(options-for-reply project :attach 9876)))))
(deftest test-options-for-reply-init-ns-and-init
(let [project {:repl-options {:init-ns 'foo.core :init '(println "ohai")}}]
@ -46,7 +46,7 @@
:custom-init '(do (clojure.core/require 'foo.core)
(clojure.core/in-ns 'foo.core)
(println "ohai"))}
(options-for-reply 9876 project)))))
(options-for-reply project :attach 9876)))))
(deftest test-options-for-reply-main-ns
(let [project {:main 'foo.core}]
@ -54,7 +54,7 @@
:custom-init '(do (clojure.core/require 'foo.core)
(clojure.core/in-ns 'foo.core)
nil)}
(options-for-reply 9876 project)))))
(options-for-reply project :attach 9876)))))
(deftest test-options-for-reply-init-ns-beats-main
(let [project {:main 'foo.core :repl-options {:init-ns 'winner.here}}]
@ -63,5 +63,5 @@
:custom-init '(do (clojure.core/require 'winner.here)
(clojure.core/in-ns 'winner.here)
nil)}
(options-for-reply 9876 project)))))
(options-for-reply project :attach 9876)))))