forked from technomancy/leiningen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdo.clj
More file actions
35 lines (29 loc) · 1.24 KB
/
Copy pathdo.clj
File metadata and controls
35 lines (29 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
(ns leiningen.test.do
(:refer-clojure :exclude [do])
(:use [clojure.test]
[leiningen.do]))
(deftest test-group-args-empty-args
(is (= [] (group-args []))))
(deftest test-group-args-single-task
(is (= [["pom"]] (group-args ["pom"]))))
(deftest test-group-args-without-args
(is (= [["clean"] ["deps"] ["test"]]
(group-args ["clean," "deps," "test"]))))
(deftest test-group-args-with-args
(is (= [["test" "test-core"] ["version"]]
(group-args ["test" "test-core," "version"]))))
(deftest test-group-args-with-long-chain
(is (= [["help" "help"] ["help" "version"] ["version"]
["test" "test-compile"]]
(group-args '("help" "help," "help" "version," "version,"
"test" "test-compile")))))
(deftest test-group-existing-collections
(is (= [["clean"] ["test" ":integration"] '("deploy" "clojars")]
(group-args ["clean" ["test" ":integration"]
'("deploy" "clojars")])))
(is (= [["foo" "bar"] ["baz" "quux"]]
(group-args [["foo" "bar"] ["baz" "quux"]])))
(is (= [["foo" "bar"] ["baz"]]
(group-args [["foo" "bar"] "baz"])))
(is (= [["combinations"] ["work"] ["as" "well"]]
(group-args ["combinations," "work" ["as" "well"]]))))