Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a test for :skip-aot on :main. Fixes #145.

  • Loading branch information...
commit c5c760329b6629ebe67eaede4cc30a2fe33f3a99 1 parent c4271c0
@technomancy authored
Showing with 9 additions and 2 deletions.
  1. +8 −1 test/test_compile.clj
  2. +1 −1  test_projects/tricky-name/project.clj
View
9 test/test_compile.clj
@@ -32,7 +32,8 @@
:compiled)))))
(deftest test-cleared-transitive-aot
- (is (zero? (compile (make-project "test_projects/sample"))))
+ (is (zero? (compile (assoc (make-project "test_projects/sample")
+ :clean-non-project-classes true))))
(let [classes (seq (.list (file "test_projects" "sample"
"classes" "nom" "nom")))]
(doseq [r [#"nom\$fn__\d+.class" #"nom\$loading__\d+__auto____\d+.class"
@@ -46,3 +47,9 @@
(fn [] ["-Dleiningen.original.pwd=/path/with" "spaces/got-broken"])]
(is (zero? (eval-in-project (make-project "test_projects/sample")
`(System/exit 0))))))
+
+(deftest test-skip-aot-on-main
+ (let [tricky-name (make-project "test_projects/tricky-name")]
+ (delete-file-recursively (file (:root tricky-name) "classes") :silently)
+ (is (zero? (compile tricky-name)))
+ (is (empty? (.list (file (:root tricky-name) "classes"))))))
View
2  test_projects/tricky-name/project.clj
@@ -2,6 +2,6 @@
:description "One with a tricky group and project name"
:dev-dependencies [[clojure "1.2.0"]]
:shell-wrapper true
- :main org.domain.tricky-name.core
+ :main ^{:skip-aot true} org.domain.tricky-name.core
:run-aliases {:bbb org.domain.tricky-name.brunch
:mmm org.domain.tricky-name.munch})
Please sign in to comment.
Something went wrong with that request. Please try again.