diff options
author | Paul Landes <landes@mailc.net> | 2017-07-15 02:36:26 -0500 |
---|---|---|
committer | Bozhidar Batsov <bozhidar.batsov@gmail.com> | 2017-07-15 10:36:26 +0300 |
commit | 0c6f998c61668b91ee52ff7a643b84675feebf98 (patch) | |
tree | 82be6f6b03b4923bc3a92b60da7b18661d443894 /test | |
parent | 2f3c9f52c073c9b09a19df2f9dc8657085fa55b8 (diff) |
Handle ANSI color REPL evaluation created by Puget (#2021)
Basically we simply apply the ANSI color and discard it, so it would interfere with the `clojure-mode` font-locking we're doing.
Diffstat (limited to 'test')
-rw-r--r-- | test/cider-util-tests.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/cider-util-tests.el b/test/cider-util-tests.el index af6ef5f8..8b694d41 100644 --- a/test/cider-util-tests.el +++ b/test/cider-util-tests.el @@ -191,3 +191,14 @@ (insert "(test-function arg1 arg2 arg3)") (backward-char 2) (expect (cider-second-sexp-in-list) :to-equal "arg1")))) + +(describe "cider-ansi-color-string-detect" + (it "detect ansi color successfully" + (expect (cider-ansi-color-string-p "[31man-ansi-str[0m") + :to-be-truthy) + (expect (cider-ansi-color-string-p "[34m[[0m[31man-ansi-str[0m[34m][0m") + :to-be-truthy) + (expect (cider-ansi-color-string-p "[an-ansi-str]") + :not :to-be-truthy) + (expect (cider-ansi-color-string-p "'an-ansi-str") + :not :to-be-truthy))) |