emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 4836dd0 10/21: Add tests for prettifying symbols.


From: Jackson Ray Hamilton
Subject: [elpa] master 4836dd0 10/21: Add tests for prettifying symbols.
Date: Fri, 23 Dec 2016 20:27:51 +0000 (UTC)

branch: master
commit 4836dd069b8d328f994810bd38962e917c274b00
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>

    Add tests for prettifying symbols.
---
 context-coloring-test.el          |   23 +++++++++++++++++++++++
 fixtures/test/prettify-symbols.el |    1 +
 2 files changed, 24 insertions(+)

diff --git a/context-coloring-test.el b/context-coloring-test.el
index ab77254..5ab7d60 100644
--- a/context-coloring-test.el
+++ b/context-coloring-test.el
@@ -344,6 +344,29 @@ signaled."
             '(context-coloring-level-0-face nil))
            (disable-theme 'context-coloring-test-custom-theme)))
 
+(defun context-coloring-test-assert-prettify-symbols-text-properties ()
+  (unless (and (get-text-property 2 'prettify-symbols-start)
+               (get-text-property 2 'prettify-symbols-end))
+    (ert-fail "Expected buffer to have it's symbols prettified, but it 
didn't.")))
+
+(context-coloring-test-deftest prettify-symbols-enabled-before
+  (lambda ()
+    (context-coloring-test-with-fixture
+     "./fixtures/test/prettify-symbols.el"
+     (emacs-lisp-mode)
+     (prettify-symbols-mode)
+     (context-coloring-mode)
+     (context-coloring-test-assert-prettify-symbols-text-properties))))
+
+(context-coloring-test-deftest prettify-symbols-enabled-after
+  (lambda ()
+    (context-coloring-test-with-fixture
+     "./fixtures/test/prettify-symbols.el"
+     (emacs-lisp-mode)
+     (context-coloring-mode)
+     (prettify-symbols-mode)
+     (context-coloring-test-assert-prettify-symbols-text-properties))))
+
 
 ;;; Coloring tests
 
diff --git a/fixtures/test/prettify-symbols.el 
b/fixtures/test/prettify-symbols.el
new file mode 100644
index 0000000..52295a6
--- /dev/null
+++ b/fixtures/test/prettify-symbols.el
@@ -0,0 +1 @@
+(lambda ())



reply via email to

[Prev in Thread] Current Thread [Next in Thread]