[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/mmm-mode e5456ed 1/7: Update html-erb tests
From: |
ELPA Syncer |
Subject: |
[elpa] externals/mmm-mode e5456ed 1/7: Update html-erb tests |
Date: |
Tue, 29 Dec 2020 20:57:14 -0500 (EST) |
branch: externals/mmm-mode
commit e5456eddac048dddabf2cdd0040714f198f003c5
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Update html-erb tests
The approach in sgml-mode has changed:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33887#124
One of the rare cases where the checks have failed, but the behavior
has not degraded a bit.
---
tests/html-erb.el | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/tests/html-erb.el b/tests/html-erb.el
index fe34c86..25188e5 100644
--- a/tests/html-erb.el
+++ b/tests/html-erb.el
@@ -1,4 +1,4 @@
-;; Copyright (C) 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2013, 2020 Free Software Foundation, Inc.
;; This file is part of GNU Emacs.
@@ -66,38 +66,37 @@
(should (mmm-update-current-submode))
(should (string= " end " (mmm-erb-current-overlay-string))))
-(defun mmm-erb-assert-string-syntax ()
+(defun mmm-erb-assert-string-faces ()
(goto-char (point-min))
+ (font-lock-ensure (point-min) (point-max))
(search-forward "\"")
- (should (nth 3 (syntax-ppss)))
- (search-forward "\"")
- (should (not (nth 3 (syntax-ppss)))))
+ (should (eq (get-text-property (point) 'face)
+ 'font-lock-string-face)))
-(defun mmm-erb-assert-non-string-syntax ()
+(defun mmm-erb-assert-non-string-faces ()
(goto-char (point-min))
+ (font-lock-ensure (point-min) (point-max))
(search-forward "\"")
- (should (not (nth 3 (syntax-ppss))))
- (search-forward "\"")
- (should (not (nth 3 (syntax-ppss)))))
+ (should (not (eq (get-text-property (point) 'face)
+ 'font-lock-string-face))))
(mmm-erb-deftest attribute-values-are-strings
(insert mmm-erb-text)
(mmm-apply-all)
- (mmm-erb-assert-string-syntax))
+ (mmm-erb-assert-string-faces))
(mmm-erb-deftest quotes-outside-tags-dont-make-strings
- :expected-result (if mmm-erb-edge-emacs :passed :failed)
(insert "<% foo do %><p>\"foo bar\"</p><% end %>")
(mmm-apply-all)
- (mmm-erb-assert-non-string-syntax))
+ (mmm-erb-assert-non-string-faces))
(mmm-erb-deftest gt-inside-subregion-doesnt-change-nesting
(insert "<% if 2 > 1 %><div class=\"foo\"/><% end %>")
(mmm-apply-all)
- (mmm-erb-assert-string-syntax))
+ (mmm-erb-assert-string-faces))
(mmm-erb-deftest lt-inside-subregion-doesnt-change-nesting
- :expected-result (if mmm-erb-edge-emacs :passed :failed)
(insert "<% if 2 < 1 %><p>\"foo bar\"</p><% end %>")
+ ;; FIXME: Perhaps check sgml-lexical-context as well?
(mmm-apply-all)
- (mmm-erb-assert-non-string-syntax))
+ (mmm-erb-assert-non-string-faces))
- [elpa] externals/mmm-mode updated (8aed53f -> 0d00cdf), ELPA Syncer, 2020/12/29
- [elpa] externals/mmm-mode 77e15d7 2/7: Add typescript-mode vars, ELPA Syncer, 2020/12/29
- [elpa] externals/mmm-mode e5456ed 1/7: Update html-erb tests,
ELPA Syncer <=
- [elpa] externals/mmm-mode b45a864 3/7: mmm-update-mode-info: Call font-lock-set-defaults once per submode, ELPA Syncer, 2020/12/29
- [elpa] externals/mmm-mode 3e4b068 4/7: Prioritize mason-one-line-comment over mason-inline, ELPA Syncer, 2020/12/29
- [elpa] externals/mmm-mode 58c2267 5/7: mmm-save-local-variables: Add nxml-prolog-end, ELPA Syncer, 2020/12/29
- [elpa] externals/mmm-mode 9ffe364 6/7: Refontify lazily, ELPA Syncer, 2020/12/29
- [elpa] externals/mmm-mode 0d00cdf 7/7: Add more vars for C mode, ELPA Syncer, 2020/12/29