File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
main/clojure/clojure/tools
test/clojure/clojure/tools Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 637637 :strict strict
638638 :subcommand subcommand)]
639639 {:options opts
640- :arguments (into rest -args implicit -args)
640+ :arguments (into implicit -args rest -args)
641641 :summary ((or summary-fn summarize) specs)
642642 :errors (when (seq errors) errors)}))
643643
Original file line number Diff line number Diff line change 470470 (is (= (:errors (parse-opts [" -a" " -b" ]
471471 [[" -b" " --beta" ]]
472472 :subcommand :implicit ))
473+ nil ))
474+ (is (= (:arguments (parse-opts [" -a" " foo" " -b" ]
475+ [[" -b" " --beta" ]]
476+ :subcommand :explicit ))
477+ [" foo" " -b" ]))
478+ (is (= (:errors (parse-opts [" -a" " foo" " -b" ]
479+ [[" -b" " --beta" ]]
480+ :subcommand :explicit ))
481+ [" Unknown option: \" -a\" " ]))
482+ (is (= (:arguments (parse-opts [" -a" " foo" " -b" ]
483+ [[" -b" " --beta" ]]
484+ :subcommand :implicit ))
485+ [" -a" " foo" " -b" ]))
486+ (is (= (:errors (parse-opts [" -a" " foo" " -b" ]
487+ [[" -b" " --beta" ]]
488+ :subcommand :implicit ))
473489 nil )))
474490 (testing " does not merge over default values when :no-defaults is true"
475491 (let [option-specs [[" -p" " --port PORT" :default 80 ]
You can’t perform that action at this time.
0 commit comments