Make more awesome
This commit is contained in:
parent
c4d8e4de4c
commit
d8cd25a84d
2 changed files with 13 additions and 7 deletions
|
|
@ -607,9 +607,8 @@ Use -- to separate script command line args from bb command line args.
|
|||
(let [cmd-line-args args]
|
||||
(parse-opts (seq (map str (concat cmd-line-args command-line-args)))))
|
||||
shell
|
||||
(let [args (if (and (= 1 (count args))
|
||||
(string? (first args)))
|
||||
(p/tokenize (first args))
|
||||
(let [args (if (string? (first args))
|
||||
(into (p/tokenize (first args)) (rest args))
|
||||
args)
|
||||
args (into (vec args) command-line-args)]
|
||||
{:exec (fn []
|
||||
|
|
|
|||
|
|
@ -42,13 +42,20 @@
|
|||
(is (fs/exists? temp-file))
|
||||
(bb :clean)
|
||||
(is (not (fs/exists? temp-file)))))
|
||||
(let [temp-dir (fs/create-temp-dir)
|
||||
temp-file (fs/create-file (fs/path temp-dir "temp-file.txt"))]
|
||||
(testing "tokenization"
|
||||
(testing "tokenization"
|
||||
(let [temp-dir (fs/create-temp-dir)
|
||||
temp-file (fs/create-file (fs/path temp-dir "temp-file.txt"))]
|
||||
(with-config {:tasks {:clean ['shell (str "rm " (str temp-file))]}}
|
||||
(is (fs/exists? temp-file))
|
||||
(bb :clean)
|
||||
(is (not (fs/exists? temp-file)))))))
|
||||
(is (not (fs/exists? temp-file)))))
|
||||
(testing "first string is tokenized even with following args"
|
||||
(let [temp-dir (fs/create-temp-dir)
|
||||
temp-file (fs/create-file (fs/path temp-dir "temp-file.txt"))]
|
||||
(with-config {:tasks {:clean ['shell (str "rm -rf " (str temp-file))]}}
|
||||
(is (fs/exists? temp-file))
|
||||
(bb :clean)
|
||||
(is (not (fs/exists? temp-file))))))))
|
||||
|
||||
(deftest sequential-task-test
|
||||
(testing ":and-do"
|
||||
|
|
|
|||
Loading…
Reference in a new issue