[PATCH proof-specs] Improve README with example output
Export this patch
---
README.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 56 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 3343fa8..cddd758 100644
--- a/README.md
+++ b/README.md
@@ -41,9 +41,40 @@ given errors.
(proof-specs
:num-vals 10
- :include-regexps [#"your.ns.*"])
+ :include-regexps [#"nl.jomco.*"])
```
+Produces something like:
+
+```clojure
+{:problems #:nl.jomco.blerk{:yelp #error {
+ :cause "Couldn't satisfy such-that predicate after 100 tries."
+ :data {...}
+ :via
+ [{:type clojure.lang.ExceptionInfo
+ :message "Couldn't satisfy such-that predicate after 100 tries."
+ :data {...}
+ :at ...}]
+ :trace
+ [...]}},
+ :specs
+ #{:nl.jomco.blerk/yelp
+ :nl.jomco.proof-specs/error
+ :nl.jomco.proof-specs/exclude-regexps
+ :nl.jomco.proof-specs/include-regexps
+ :nl.jomco.proof-specs/num-vals
+ :nl.jomco.proof-specs/problems
+ :nl.jomco.proof-specs/proof-opts
+ :nl.jomco.proof-specs/regexp
+ :nl.jomco.proof-specs/require-namespaces
+ :nl.jomco.proof-specs/selector
+ :nl.jomco.proof-specs/spec
+ :nl.jomco.proof-specs/specs}}
+```
+
+The return value will not contain a `:problems` key when no problems
+were found.
+
### Running as a leiningen alias
Add a "proof-specs" alias to your `project.clj` - also make sure you
@@ -53,14 +84,35 @@ include `proof-specs` as a development dependency.
...
profiles {:dev {:dependencies [[nl.jomco/proof-specs "<VERSION>"]]}}
...
- :aliases {"proof-specs" ["run" "-m" "nl.jomco.proof-specs" "--include-regexps" ".*jomco.*"
- "--require-namespaces" "nl.jomco.proof-spec-gen"]}
+ :aliases {"proof-specs" ["run" "-m" "nl.jomco.proof-specs"
+ "--include-regexps" ".*jomco.*"
+ "--require-namespaces" "nl.jomco.proof-spec-gen,nl.jomco.blerk"]}
...
```
-And run using
+And run using:
```sh
lein proof-specs
```
+Produces something like:
+
+```
+Problems generating data for 1 out of 12 specs:
+:nl.jomco.blerk/yelp
+
+#:nl.jomco.blerk{:yelp #error {
+ :cause "Couldn't satisfy such-that predicate after 100 tries."
+ :data {...}, :max-tries 100}
+ :via
+ [{:type clojure.lang.ExceptionInfo
+ :message "Couldn't satisfy such-that predicate after 100 tries."
+ :data {...}, :max-tries 100}
+ :at [...]}]
+ :trace
+ [...]}}
+```
+
+The exit status will be `0` when no problems were found, otherwise
+`1`.
base-commit: dd713716c650f1459cacde2cb266a3fb9c1c80ce
--
2.36.1
Great! Applied
Remco van 't Veer <remco@remworks.net> writes: