Skip to content

Commit

Permalink
Fixes #53 - Spec error with 0.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lenz committed Nov 16, 2018
1 parent dd8b516 commit a55a5ce
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject cli-matic "0.2.5"
(defproject cli-matic "0.2.6"
:description "Compact [sub]command line parsing library, for Clojure"
:url "https://github.com/l3nz/cli-matic"
:license {:name "Eclipse Public License, v2"
Expand Down
9 changes: 7 additions & 2 deletions src/cli_matic/help_gen.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
[clojure.string :as str]
[cli-matic.specs :as S]
[cli-matic.platform :as P]
[cli-matic.utils :as U])
[cli-matic.utils :as U]
[cli-matic.optionals :as OPT])
)


Expand Down Expand Up @@ -216,6 +217,10 @@
(s/fdef
generate-help-possible-mistypes
:args (s/cat :cfg ::S/climatic-cfg :cmd ::S/command)
:ret (s/coll-of string?)
:ret (s/coll-of (s/or :str string?
:cs (s/coll-of string?))
)



(OPT/orchestra-instrument)
18 changes: 18 additions & 0 deletions test/cli_matic/help_gen_test.cljc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
(ns cli-matic.help-gen-test
(:require [clojure.test :refer :all])
(:require [cli-matic.help-gen :refer :all]))

(deftest generate-possible-mistypes-test

(are [w c a o]
(= o (generate-possible-mistypes w c a))

;
"purchasse"
["purchase" "purchasing" "add" "remove"]
[nil "PP" "A" "R"]
["purchase" "purchasing"]
))



0 comments on commit a55a5ce

Please sign in to comment.