From 5851fecefa63666d4bc504a9b03917a2789f0c23 Mon Sep 17 00:00:00 2001 From: Max Shenfield Date: Mon, 18 Jan 2016 00:39:40 -0600 Subject: [PATCH] Make clojail compatible with Clojure version 1.5-1.7 Implement profiles for each version, and add to testall alias to simplify cross version testing. Update one test for cross-compatibility. The threading macro `->` was changed to output a complete result instead of a recursive definition in terms of `->` in Clojure 1.6. See [this patch](http://dev.clojure.org/jira/browse/CLJ-1121). --- project.clj | 10 ++++++---- test/clojail/core_test.clj | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/project.clj b/project.clj index 0086bd0..5a94692 100644 --- a/project.clj +++ b/project.clj @@ -3,10 +3,12 @@ :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :url "https://github.com/flatland/clojail" - :dependencies [[org.clojure/clojure "1.4.0"] + :dependencies [[org.clojure/clojure "1.7.0"] [bultitude "0.1.6"] [serializable-fn "1.1.3"] [org.flatland/useful "0.9.3"]] - :aliases {"testall" ["with-profile" "dev,1.5:dev" "test"]} - :profiles {:1.5 {:dependencies [[org.clojure/clojure "1.5.0-RC16"]]}} - :jvm-opts ["-Djava.security.policy=example.policy"]) \ No newline at end of file + :aliases {"testall" ["with-profile" "dev,1.5:dev,1.6:dev,1.7:dev" "test"]} + :profiles {:1.5 {:dependencies [[org.clojure/clojure "1.5.0-RC16"]]} + :1.6 {:dependencies [[org.clojure/clojure "1.6.0"]]} + :1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]}} + :jvm-opts ["-Djava.security.policy=example.policy"]) diff --git a/test/clojail/core_test.clj b/test/clojail/core_test.clj index 0a0afd2..10ea82e 100644 --- a/test/clojail/core_test.clj +++ b/test/clojail/core_test.clj @@ -33,8 +33,8 @@ (deftest macroexpand-test (is (= 'let (sb '(first '(let [x 1] x))))) - (is (= '(dec (clojure.core/-> x inc)) - (sb '(macroexpand '(-> x inc dec))))) + (is (= '(inc x)) + (sb '(macroexpand '(-> x inc)))) (is (= 1 (sb '(-> 0 inc dec inc)))) (is (= '(. "" length) (sb ''(. "" length)))))