Skip to content

Commit 9b56d45

Browse files
committed
Apply colorization on actual/expected test output
For matchers like matcher-combinators that rely on that.
1 parent 86dd3fe commit 9b56d45

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Changes
66

7+
* [#3177](https://github.com/clojure-emacs/cider/pull/3177) Apply ANSI colorization to test assertion output
78
* Use clojure-mode [5.14.0](https://github.com/clojure-emacs/clojure-mode/blob/v5.14.0/CHANGELOG.md#5140-2022-03-07).
89
* [#3170](https://github.com/clojure-emacs/cider/issues/3170) Skip ensure repl available on xref functions.
910
* [#3173](https://github.com/clojure-emacs/cider/issues/3173) Locally remove `cider-complete-at-point` from `completion-at-point-functions` instead of killing it as a local variable.

Diff for: cider-test.el

+6-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
;;; Code:
3030

31+
(require 'ansi-color)
3132
(require 'button)
3233
(require 'cl-lib)
3334
(require 'easymenu)
@@ -395,9 +396,11 @@ With the actual value, the outermost '(not ...)' s-expression is removed."
395396
(insert-align-label (s)
396397
(insert (format "%12s" s)))
397398
(insert-rect (s)
398-
(insert-rectangle (thread-first s
399-
cider-font-lock-as-clojure
400-
(split-string "\n")))
399+
(let ((start (point)))
400+
(insert-rectangle (thread-first s
401+
cider-font-lock-as-clojure
402+
(split-string "\n")))
403+
(ansi-color-apply-on-region start (point)))
401404
(beginning-of-line)))
402405
(cider-propertize-region (cider-intern-keys (cdr test))
403406
(let ((beg (point))

0 commit comments

Comments
 (0)