branch: externals/auctex
commit 7119e9b58c747a73fcffce4e98a0bda03b4f2547
Author: Tassilo Horn <t...@gnu.org>
Commit: Tassilo Horn <t...@gnu.org>

    ; Fix tests relying on font-lock has put syntax properties already
---
 tests/context/context-test.el  | 6 ++++++
 tests/latex/font-latex-test.el | 6 ++++++
 tests/latex/latex-test.el      | 6 ++++++
 3 files changed, 18 insertions(+)

diff --git a/tests/context/context-test.el b/tests/context/context-test.el
index 4eeab4b67a..cc7c8d549f 100644
--- a/tests/context/context-test.el
+++ b/tests/context/context-test.el
@@ -24,6 +24,12 @@
 (require 'ert)
 (require 'context)
 
+;; We need to ensure that font-lock has put the syntax properties
+;; already which won't happen in batch mode.  So trigger font-lock
+;; immediately.
+(define-advice ConTeXt-mode-common-initialization (:after ())
+  (font-lock-ensure))
+
 (AUCTeX-set-ert-path
  'ConTeXt-indent-test/in
  "context-indentation-in.tex"
diff --git a/tests/latex/font-latex-test.el b/tests/latex/font-latex-test.el
index 9cc7ac527f..0c81392add 100644
--- a/tests/latex/font-latex-test.el
+++ b/tests/latex/font-latex-test.el
@@ -27,6 +27,12 @@
 (defvar font-lock-beg)
 (defvar font-lock-end)
 
+;; We need to ensure that font-lock has put the syntax properties
+;; already which won't happen in batch mode.  So trigger font-lock
+;; immediately.
+(define-advice LaTeX-common-initialization (:after ())
+  (font-lock-ensure))
+
 (ert-deftest font-latex-three-dollars ()
   "Test three consecutive dollar is ignored."
   ;; When the function `font-latex-match-dollar-math' encounters three
diff --git a/tests/latex/latex-test.el b/tests/latex/latex-test.el
index aff0adcc60..15f31a8e1a 100644
--- a/tests/latex/latex-test.el
+++ b/tests/latex/latex-test.el
@@ -24,6 +24,12 @@
 (require 'ert)
 (require 'latex)
 
+;; We need to ensure that font-lock has put the syntax properties
+;; already which won't happen in batch mode.  So trigger font-lock
+;; immediately.
+(define-advice LaTeX-common-initialization (:after ())
+  (font-lock-ensure))
+
 (AUCTeX-set-ert-path
  'LaTeX-indent-tabular-test/in
  "tabular-in.tex"


_______________________________________________
auctex-diffs mailing list
auctex-di...@gnu.org
https://lists.gnu.org/mailman/listinfo/auctex-diffs

Reply via email to