commit 1b198fd8eb202f1542d6b1c2aadc4a502af26b5f
parent 38204b281f1e1281f04d0b89c9489aee08b383a7
Author: Iqbal Ansari <iqbalansari02@yahoo.com>
Date: Fri, 9 Aug 2019 15:29:00 +0530
Disable `emojify-tests-org-source-blocks` test for Emacs versions before v26.1
Diffstat:
2 files changed, 31 insertions(+), 29 deletions(-)
diff --git a/.travis.yml b/.travis.yml
@@ -2,9 +2,9 @@ language: generic
sudo: required
env:
- EVM_EMACS=emacs-26.2
- - EVM_EMACS=emacs-26.2
- - EVM_EMACS=emacs-25.1
- - EVM_EMACS=emacs-24.5
+ - EVM_EMACS=emacs-26.1
+ - EVM_EMACS=emacs-25.3
+ - EVM_EMACS=emacs-25.2
cache:
apt: true
diff --git a/test/emojify-test.el b/test/emojify-test.el
@@ -330,7 +330,7 @@
(emojify-tests-should-be-emojified (point-min))
(emojify-tests-should-be-emojified (line-beginning-position 2)))
- (emojify-tests-with-emojified-static-buffer "(
+ (emojify-tests-with-emojified-static-buffer "(
:)"
(fundamental-mode)
(emojify-redisplay-emojis-in-region)
@@ -555,9 +555,11 @@ return 4
(emojify-tests-should-not-be-emojified (line-beginning-position 6))
(emojify-tests-should-not-be-emojified (line-beginning-position 7)))))
-(ert-deftest emojify-tests-org-source-blocks ()
- :tags '(org-mode contextual)
- (emojify-tests-with-emojified-static-buffer "#+begin_src markdown
+
+(unless (version< emacs-version "26.1")
+ (ert-deftest emojify-tests-org-source-blocks ()
+ :tags '(org-mode contextual)
+ (emojify-tests-with-emojified-static-buffer "#+begin_src markdown
:smile:
:)
:slight_smile:
@@ -577,33 +579,33 @@ return 4
🙂
#+end_src
"
- (emojify-set-emoji-styles '(ascii unicode github))
- (setq emojify-program-contexts '(comments string code))
+ (emojify-set-emoji-styles '(ascii unicode github))
+ (setq emojify-program-contexts '(comments string code))
- (org-mode)
- (when (fboundp 'font-lock-ensure)
- (font-lock-ensure)
- (emojify-redisplay-emojis-in-region))
+ (org-mode)
+ (when (fboundp 'font-lock-ensure)
+ (font-lock-ensure)
+ (emojify-redisplay-emojis-in-region))
- ;; The emojis should be always displayed for org source block for
- ;; non-programming languages
- (emojify-tests-should-be-emojified (line-beginning-position 2))
- (emojify-tests-should-be-emojified (line-beginning-position 3))
- (emojify-tests-should-be-emojified (line-beginning-position 4))
+ ;; The emojis should be always displayed for org source block for
+ ;; non-programming languages
+ (emojify-tests-should-be-emojified (line-beginning-position 2))
+ (emojify-tests-should-be-emojified (line-beginning-position 3))
+ (emojify-tests-should-be-emojified (line-beginning-position 4))
- ;; In org source block for programming languages emojis should
- ;; be displayed according to emojify-program-contexts
- (emojify-tests-should-be-emojified (1+ (line-beginning-position 8)))
- (emojify-tests-should-be-emojified (+ 3 (line-beginning-position 9)))
- (emojify-tests-should-not-be-emojified (line-beginning-position 10))
+ ;; In org source block for programming languages emojis should
+ ;; be displayed according to emojify-program-contexts
+ (emojify-tests-should-be-emojified (1+ (line-beginning-position 8)))
+ (emojify-tests-should-be-emojified (+ 3 (line-beginning-position 9)))
+ (emojify-tests-should-not-be-emojified (line-beginning-position 10))
- (emojify-tests-should-be-emojified (1+ (line-beginning-position 12)))
- (emojify-tests-should-be-emojified (+ 3 (line-beginning-position 13)))
- (emojify-tests-should-not-be-emojified (line-beginning-position 14))
+ (emojify-tests-should-be-emojified (1+ (line-beginning-position 12)))
+ (emojify-tests-should-be-emojified (+ 3 (line-beginning-position 13)))
+ (emojify-tests-should-not-be-emojified (line-beginning-position 14))
- (emojify-tests-should-be-emojified (1+ (line-beginning-position 16)))
- (emojify-tests-should-be-emojified (+ 3 (line-beginning-position 17)))
- (emojify-tests-should-be-emojified (line-beginning-position 18))))
+ (emojify-tests-should-be-emojified (1+ (line-beginning-position 16)))
+ (emojify-tests-should-be-emojified (+ 3 (line-beginning-position 17)))
+ (emojify-tests-should-be-emojified (line-beginning-position 18)))))
(ert-deftest emojify-tests-prettify-symbols-with-custom-images ()
:tags '(prettify-symbols)