summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Landes <landes@mailc.net>2017-07-15 02:36:26 -0500
committerBozhidar Batsov <bozhidar.batsov@gmail.com>2017-07-15 10:36:26 +0300
commit0c6f998c61668b91ee52ff7a643b84675feebf98 (patch)
tree82be6f6b03b4923bc3a92b60da7b18661d443894 /test
parent2f3c9f52c073c9b09a19df2f9dc8657085fa55b8 (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.el11
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 "an-ansi-str")
+ :to-be-truthy)
+ (expect (cider-ansi-color-string-p "[an-ansi-str]")
+ :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)))