Liking cljdoc? Tell your friends :D

com.mjdowney.rich-comment-tests

RCT turns rich comment forms into tests.

RCT turns rich comment forms into tests.
raw docstring

?comment-expectation-stringclj

(?comment-expectation-string z)
source

?result-comment-zlocclj

(?result-comment-zloc z)
source

advanceclj

(advance zloc & {:keys [to through] :as ops})
source

capture-clojure-test-outcljmacro

(capture-clojure-test-out & body)

Capture any string output fom clojure.test while invoking body, and isolate test state.

Capture any string output fom clojure.test while invoking `body`, and
isolate test state.
sourceraw docstring

clojure-test-reporting-active?clj

(clojure-test-reporting-active?)
source

context-stringsclj

(context-strings test-sexpr-zloc)

A series of string comments preceding the test sexpr.

A series of string comments preceding the test sexpr.
sourceraw docstring

expectation-dataclj

(expectation-data test-sexpr-zloc)

Parse a string representing the expectation for a test expression and an expression type, returning a vector of [type str] (or nil if none).

The expected result is designated by a =>-prefixed comment, either directly after or on a line following the test expression.

For example:

(+ 1 1) ;=> 2

(+ 1 1) ;;=> 2

(+ 1 1) ;; => 2

Parse a string representing the expectation for a test expression and an
expression type, returning a vector of `[type str]` (or nil if none).

The expected result is designated by a =>-prefixed comment, either directly
after or on a line following the test expression.

For example:

  (+ 1 1) ;=> 2

  (+ 1 1)
  ;;=> 2

  (+ 1 1)
  ;; => 2
sourceraw docstring

iterate1clj

(iterate1 f x)

Like clojure.core/iterate, but stops at the first nil element.

Like `clojure.core/iterate`, but stops at the first `nil` element.
sourceraw docstring

pairsclj

(pairs)

Transducer from [a b c ... z] => [[a b] [b c] ... [z nil]].

Transducer from [a b c ... z] => [[a b] [b c] ... [z nil]].
sourceraw docstring

rct-data-seqclj

(rct-data-seq rct-zloc)

Take an rct zloc and return a series of maps with information about tests to run.

Take an rct zloc and return a series of maps with information about
tests to run.
sourceraw docstring

rct-zlocsclj

(rct-zlocs source-file-root-zloc)

Given the root zloc for a source file, return a series of rct zlocs.

Given the root zloc for a source file, return a series of rct zlocs.
sourceraw docstring

rct?clj

(rct? zloc)

Is the node at the zloc a ^:rct/test (comment ...) block?

Is the node at the `zloc` a ^:rct/test (comment ...) block?
sourceraw docstring

require-file-for-nsclj

(require-file-for-ns ns)

Given a Namespace, attempt to find a corresponding source file, or throw an exception if this isn't possible.

Given a Namespace, attempt to find a corresponding source file, or throw an
exception if this isn't possible.
sourceraw docstring

result-comment-typeclj

(result-comment-type z)
source

result-comment?clj

(result-comment? s)

A string like ";=> _" or ";=>> _" or ";; => _"

A string like ";=> _" or ";=>> _" or ";; => _"
sourceraw docstring

rsequenceclj

(rsequence xform coll)

Like (reverse (sequence xform coll)).

Like `(reverse (sequence xform coll))`.
sourceraw docstring

run-file-tests!clj

(run-file-tests! file ns)

Take a file path and the namespace it corresponds to, and run tests.

Take a file path and the namespace it corresponds to, and run tests.
sourceraw docstring

run-ns-tests!clj

(run-ns-tests! ns)

Take a namespace or namespace symbol, attempt to find the corresponding source file, and run tests in the namespace.

Take a namespace or namespace symbol, attempt to find the corresponding
source file, and run tests in the namespace.
sourceraw docstring

run-tests*clj

(run-tests* zloc)

Take a rewrite-clj zipper pointed at the root of a file and run all rich comment tests.

The zipper must have be configured with {:track-position? true}.

ns and file should be bound before calling this.

Take a `rewrite-clj` zipper pointed at the root of a file and run all rich
comment tests.

The zipper must have be configured with {:track-position? true}.

*ns* and *file* should be bound before calling this.
sourceraw docstring

tag?clj

(tag? x)
source

test-sexpr-zlocsclj

(test-sexpr-zlocs rct-zloc)

All sexpr-able nodes inside a rct form.

All sexpr-able nodes inside a rct form.
sourceraw docstring

with-clojure-test-reportingcljmacro

(with-clojure-test-reporting & body)

Run body with clojure.test reporting, unless it is already active.

Run `body` with clojure.test reporting, unless it is already active.
sourceraw docstring

with-printlnscljmacro

(with-printlns & body)

Rebind println during the execution of body to print as normal, PLUS save each line of output, and return a vector of printed lines.

Rebind `println` during the execution of body to print as normal, PLUS
save each line of output, and return a vector of printed lines.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close