add a couple tests for arg parsing
This commit is contained in:
parent
5cd2b9d6e6
commit
bad1628607
1 changed files with 4 additions and 0 deletions
|
|
@ -68,6 +68,10 @@
|
|||
(is (= {:force? true :repl true} (parse-opts ["--force" "repl"])))
|
||||
(is (= {:force? true :clojure true :command-line-args '("-M" "-r")}
|
||||
(parse-opts ["--force" "clojure" "-M" "-r"])))
|
||||
(is (= {:command-line-args '("asdf" "fdsa")}
|
||||
(main/parse-opts ["--" "asdf" "fdsa"])))
|
||||
(is (= {:repl true :command-line-args '("asdf" "fdsa")}
|
||||
(main/parse-opts ["repl" "--" "asdf" "fdsa"])))
|
||||
(testing "file opts parsing does not mess with :command-line-args"
|
||||
(is (= {:prn true, :expressions ["(prn :foo)"]}
|
||||
(-> (let [[_ opts] (main/parse-file-opt ["-e" "(prn :foo)"] {})]
|
||||
|
|
|
|||
Loading…
Reference in a new issue