Tokenization
This commit is contained in:
parent
6ecc70710e
commit
344ce2dca7
2 changed files with 13 additions and 2 deletions
|
|
@ -587,7 +587,11 @@ 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 (into (vec args) command-line-args)]
|
||||
(let [args (if (and (= 1 (count args))
|
||||
(string? (first args)))
|
||||
(p/tokenize (first args))
|
||||
args)
|
||||
args (into (vec args) command-line-args)]
|
||||
{:exec (fn []
|
||||
[nil
|
||||
(-> (p/process args {:inherit true})
|
||||
|
|
|
|||
|
|
@ -42,7 +42,14 @@
|
|||
(with-config {:tasks {:clean [:shell "rm" (str temp-file)]}}
|
||||
(is (fs/exists? temp-file))
|
||||
(bb :clean)
|
||||
(is (not (fs/exists? temp-file))))))
|
||||
(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"
|
||||
(with-config {:tasks {:clean [:shell (str "rm " (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