Skip to content

Commit

Permalink
Move test project to sample/ dir.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Nov 14, 2009
1 parent e1a2d49 commit 1083c1f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
test/lib
sample/lib
sample/classes/
sample/nomnomnom.jar
classes/
leiningen.jar
2 changes: 1 addition & 1 deletion test/project.clj → sample/project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject nomnomnom "1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.0.0"]
:dependencies [[org.clojure/clojure "1.1.0-alpha-SNAPSHOT"]
[rome/rome "0.9"]
[org.ccil.cowan.tagsoup/tagsoup "1.2"]])
7 changes: 7 additions & 0 deletions sample/src/nom/nom/nom.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(ns nom.nom.nom
(:gen-class))

(defn -main [& args]
(when-not (empty? args)
(println "NOM! Munched" (first args))
(recur (rest args))))
9 changes: 5 additions & 4 deletions test/test_deps.clj
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
(ns test-deps
(:use [leiningen.core :only [read-project]]
(:use [leiningen.core :only [read-project defproject]]
[leiningen.deps :only [deps]] :reload-all)
(:use [clojure.test]
[clojure.contrib.set]
[clojure.contrib.java-utils :only [file delete-file-recursively]]))

(def test-project (read-project "test/project.clj"))
(def test-project (read-project "sample/project.clj"))

(deftest test-deps
(delete-file-recursively (file (:root test-project) "lib"))
(delete-file-recursively (file (:root test-project) "lib") true)
(deps test-project)
(is (subset? #{"jdom-1.0.jar" "tagsoup-1.2.jar" "clojure-1.0.0.jar" "rome-0.9.jar"}
(is (subset? #{"jdom-1.0.jar" "tagsoup-1.2.jar"
"clojure-1.1.0-alpha-SNAPSHOT.jar" "rome-0.9.jar"}
(set (map #(.getName %)
(.listFiles (file (:root test-project) "lib")))))))

0 comments on commit 1083c1f

Please sign in to comment.