Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
plexus committed Jun 7, 2024
1 parent 85c3b1d commit 09cd1f9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions test/lambdaisland/cli_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
{:commands ["run" {:command #'identity
:flags ["-x" {:doc "flag x"
:required required}]}]})
(with-out-str (cli/dispatch* (cmdspec-n false) ["run" "-hx"]))

"NAME\n cli run — Returns its argument.\n\nSYNOPSIS\n cli run [-x] [<args>...]\n\nFLAGS\n -x, flag x (required)\n"
"NAME\n cli run — Returns its argument.\n\nSYNOPSIS\n cli run [-x] [<args>...]\n\nFLAGS\n -x, flag x (required)\n"
;; =>

(deftest required-flag
(testing "successful exit"
Expand All @@ -37,8 +32,8 @@
(is (= expected (with-out-str (cli/dispatch* input args))))
(cmdspec-1 false) ["-h"] "NAME\n cli \n\nSYNOPSIS\n cli [-x] [<args>...]\n\nFLAGS\n -x, flag x \n"
(cmdspec-1 true) ["-hx"] "NAME\n cli \n\nSYNOPSIS\n cli [-x] [<args>...]\n\nFLAGS\n -x, flag x (required)\n"
(cmdspec-n false) ["run" "-h"] "NAME\n cli run — Returns its argument.\n\nSYNOPSIS\n cli run [-x] [<args>...]\n\nFLAGS\n -x, flag x \n"
(cmdspec-n true) ["run" "-hx"] "NAME\n cli run — Returns its argument.\n\nSYNOPSIS\n cli run [-x] [<args>...]\n\nFLAGS\n -x, flag x (required)\n"))
(cmdspec-n false) ["run" "-h"] "NAME\n cli run — Returns its argument.\n\nSYNOPSIS\n cli run [-x] [<args>...]\n\nFLAGS\n -x, flag x \n"
(cmdspec-n true) ["run" "-hx"] "NAME\n cli run — Returns its argument.\n\nSYNOPSIS\n cli run [-x] [<args>...]\n\nFLAGS\n -x, flag x (required)\n"))

(testing "unsuccessful exit"
(are [input args expected]
Expand Down

0 comments on commit 09cd1f9

Please sign in to comment.