commit 8347b89c85f6351dfbf5b9b6920952cae6d7910f
parent 8f0a8fb408c9fb91e5e86c40f9521b42ed297884
Author: Iqbal Ansari <iqbal.ansari@ignitesol.com>
Date: Thu, 8 Sep 2016 14:49:37 +0530
Improve tests for prettify symbols mode
Diffstat:
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/test/emojify-test.el b/test/emojify-test.el
@@ -541,7 +541,8 @@
x = 1
except:
raise(Exception)
-
+lambdalambda
+\"lambda\"
yield 3
return 4
"
@@ -555,22 +556,28 @@ return 4
(emojify-tests-should-not-be-emojified (point-min))
(emojify-tests-should-not-be-emojified (line-beginning-position 3))
(emojify-tests-should-not-be-emojified (+ (line-beginning-position 4) 5))
+ (emojify-tests-should-not-be-emojified (line-beginning-position 5))
(emojify-tests-should-not-be-emojified (line-beginning-position 6))
(emojify-tests-should-not-be-emojified (line-beginning-position 7))
+ (emojify-tests-should-not-be-emojified (line-beginning-position 8))
(prettify-symbols-mode +1)
(emojify-tests-should-be-emojified (point-min))
(should (equal (get-text-property (point-min) 'emojify-text) "try"))
(emojify-tests-should-not-be-emojified (line-beginning-position 3))
(emojify-tests-should-be-emojified (+ (line-beginning-position 4) 5))
(should (equal (get-text-property (+ (line-beginning-position 4) 5) 'emojify-text) "raise"))
+ (emojify-tests-should-not-be-emojified (line-beginning-position 5))
(emojify-tests-should-not-be-emojified (line-beginning-position 6))
- (emojify-tests-should-be-emojified (line-beginning-position 7))
- (should (equal (get-text-property (line-beginning-position 7) 'emojify-text) "return"))
+ (emojify-tests-should-not-be-emojified (line-beginning-position 7))
+ (emojify-tests-should-be-emojified (line-beginning-position 8))
+ (should (equal (get-text-property (line-beginning-position 8) 'emojify-text) "return"))
(prettify-symbols-mode -1)
(emojify-tests-should-not-be-emojified (point-min))
(emojify-tests-should-not-be-emojified (line-beginning-position 3))
(emojify-tests-should-not-be-emojified (+ (line-beginning-position 4) 5))
(emojify-tests-should-not-be-emojified (line-beginning-position 6))
+ (emojify-tests-should-not-be-emojified (line-beginning-position 5))
+ (emojify-tests-should-not-be-emojified (line-beginning-position 6))
(emojify-tests-should-not-be-emojified (line-beginning-position 7)))))
(ert-deftest emojify-tests-prettify-symbols-with-custom-images ()