Skip to content

Commit fef6479

Browse files
committed
Fix -X runner
1 parent 7d2679e commit fef6479

File tree

5 files changed

+16
-17
lines changed

5 files changed

+16
-17
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Version 2.0.0 in progress
22

3-
> NOTE: The dependency name will change from `expectations/clojure-test` to `expectations/cljc-test` to reflect support for ClojureScript (via `planck`) and that `doo` filters out JAR artifacts that begin `clojure-` for self-hosted ClojureScript environments (i.e., `planck`).
3+
> NOTE: The dependency name will change from `expectations/clojure-test` to something still to be determined. Clojars has introduced a [Verified Group Names policy](https://github.com/clojars/clojars-web/wiki/Verified-Group-Names) which means no new libraries can be pushed to the `expectations` group, and because `doo` filters out JAR artifacts that begin `clojure-` for self-hosted ClojureScript environments (i.e., `planck`), continuing to use `clojure-test` for the artifact name is not viable.
44
55
* Make `(defexpect foo)` and `(defexpect foo (bar))` match the behavior of `deftest`, without wrapping the body in `(expect ,,,)`. This is potentially breaking insofar as `(defexpect foo (produces-falsey))` would have been a failing test in 1.x but now silently just runs `(produces-falsey)` in the same way that `(deftest foo (produces-falsey))` does.
6-
* Bring several test-running functions from `clojure.test` in, for convenience in dev/test so users don't need to require `clojure.test` as well.
6+
* Bring in several test-running functions from `clojure.test`, for convenience in dev/test so users don't need to require `clojure.test` as well.
77
* Implement `cljs.test`'s version of `use-fixtures`: accepts functions or hash maps (containing `:before` and/or `:after` keys with 0-arity functions).
88
* Add various macro-like constructs back into the documentation to improve the documentation (`in`, `from-each`, `more-of`, `more->`, `more` are really only syntactic constructs inside `expect`).
99
* Support ClojureScript via `planck` -- see https://github.com/clojure-expectations/clojure-test/pull/16 for details (@kkinear).

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,12 @@ to be aware of:
228228

229229
## Test & Development
230230

231-
To test, run `clj -X:test:runner` (tests against Clojure 1.8).
231+
To test, run `clj -X:test:runner` (tests against Clojure 1.9).
232232

233233
Multi-version testing:
234234

235235
```
236-
for v in 1.8 1.9 1.10
236+
for v in 1.9 1.10
237237
do
238238
clojure -X:test:runner:$v
239239
done
@@ -242,9 +242,9 @@ done
242242
You can also run the tests with Humane Test Output enabled but you need to exclude the negative tests because they assume things about the test report data that HTO modifies:
243243

244244
```
245-
for v in 1.8 1.9 1.10
245+
for v in 1.9 1.10
246246
do
247-
clojure -X:test:runner:$v:humane -e :negative
247+
clojure -X:test:runner:$v:humane :excludes '[:negative]'
248248
done
249249
```
250250

@@ -290,6 +290,6 @@ This will set you up with `defexpect` and `expect`. Add others as required.
290290

291291
## License & Copyright
292292

293-
Copyright © 2018-2020 Sean Corfield, all rights reserved.
293+
Copyright © 2018-2021 Sean Corfield, all rights reserved.
294294

295295
Distributed under the Eclipse Public License version 1.0.

deps.edn

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
{:deps {org.clojure/clojure {:mvn/version "1.8.0"}}
1+
{:deps {org.clojure/clojure {:mvn/version "1.9.0"}}
22
:aliases
3-
{:1.8 {:override-deps {org.clojure/clojure {:mvn/version "1.8.0"}}}
4-
:1.9 {:override-deps {org.clojure/clojure {:mvn/version "1.9.0"}}}
3+
{:1.9 {:override-deps {org.clojure/clojure {:mvn/version "1.9.0"}}}
54
:1.10 {:override-deps {org.clojure/clojure {:mvn/version "1.10.1"}}}
65
:test {:extra-paths ["test"]}
76
:humane {:extra-deps {pjstadig/humane-test-output {:mvn/version "RELEASE"}}}

doc/fixtures-focus.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Here's an example that sets up a database connection pool for use across the who
8484
(expect {:membership/status "active"}
8585
(in (sut/lookup-membership *con* test-user))))
8686

87-
;; lots more tests that use *con*
87+
;; lots more tests that use *con*
8888
```
8989

9090
When the tests in this namespace are run, the underlying `clojure.test` machinery
@@ -141,19 +141,19 @@ The test suite for this library annotates some of the negative tests so that the
141141
`^:negative` is a simple piece of metadata added to `not-collection-test` so that tests can be run like this:
142142

143143
```bash
144-
> clojure -M:test:runner:humane -e :negative
144+
> clojure -X:test:runner:humane :excludes '[:negative]'
145145
```
146146

147147
By contrast, this runs all the tests (without Humane Test Output enabled):
148148

149149
```bash
150-
> clojure -M:test:runner
150+
> clojure -X:test:runner
151151
```
152152

153-
Cognitect's `test-runner` also has a `-i` option to include only tests marked with specific metadata:
153+
Cognitect's `test-runner` also has an `:includes` option to include only tests marked with specific metadata:
154154

155155
```bash
156-
> clojure -M:test:runner -i :negative
156+
> clojure -X:test:runner :includes '[:negative]'
157157
```
158158

159159
This run's _only_ tests marked as being `^:negative`.

run-tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ do
66
then
77
exit 1
88
fi
9-
clojure -X:1.${v}:test:humane:runner -e :negative
9+
clojure -X:1.${v}:test:humane:runner :excludes '[:negative]'
1010
if test $? -ne 0
1111
then
1212
exit 1
1313
fi
1414
done
1515
if test "$1" != "clj-only"
1616
then
17-
clojure -M:test:cljs-runner -e :negative
17+
clojure -M:test:cljs-runner :excludes '[:negative]'
1818
if test $? -ne 0
1919
then
2020
exit 1

0 commit comments

Comments
 (0)