[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bnf-mode 8948987 20/36: Rename bnf-test-face-at => bnf-
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bnf-mode 8948987 20/36: Rename bnf-test-face-at => bnf-get-face-at |
Date: |
Wed, 17 Mar 2021 18:40:17 -0400 (EDT) |
branch: externals/bnf-mode
commit 89489874a048e95a5274ce380288ffbeaccaa485
Author: Serghei Iakovlev <egrep@protonmail.ch>
Commit: Serghei Iakovlev <egrep@protonmail.ch>
Rename bnf-test-face-at => bnf-get-face-at
---
test/test-bnf-mode-font-lock.el | 116 ++++++++++++++++++++--------------------
test/utils.el | 2 +-
2 files changed, 59 insertions(+), 59 deletions(-)
diff --git a/test/test-bnf-mode-font-lock.el b/test/test-bnf-mode-font-lock.el
index 046ef63..7aabae3 100644
--- a/test/test-bnf-mode-font-lock.el
+++ b/test/test-bnf-mode-font-lock.el
@@ -48,10 +48,10 @@
(it "does not fontify strings"
(bnf-test-with-temp-buffer
"<string delimers> ::= \" | ' | ` | ”"
- (should-not (bnf-test-face-at 23))
- (should-not (bnf-test-face-at 27))
- (should-not (bnf-test-face-at 31))
- (should-not (bnf-test-face-at 35))))
+ (should-not (bnf-get-face-at 23))
+ (should-not (bnf-get-face-at 27))
+ (should-not (bnf-get-face-at 31))
+ (should-not (bnf-get-face-at 35))))
(it "fontify line comments"
(custom-set-variables '(bnf-mode-algol-comments-style nil))
@@ -59,10 +59,10 @@
"; A
<stm> ::= <decl> ; foo"
- (should (eq (bnf-test-face-at 1) 'font-lock-comment-delimiter-face))
- (should (eq (bnf-test-face-at 3) 'font-lock-comment-face))
- (should-not (bnf-test-face-at 5))
- (should (eq (bnf-test-face-at 24) 'font-lock-comment-face))))
+ (should (eq (bnf-get-face-at 1) 'font-lock-comment-delimiter-face))
+ (should (eq (bnf-get-face-at 3) 'font-lock-comment-face))
+ (should-not (bnf-get-face-at 5))
+ (should (eq (bnf-get-face-at 24) 'font-lock-comment-face))))
;; TODO(sergei): Implement me
(it "fontify ALGOL comments"
@@ -74,85 +74,85 @@
"<stm> ::= <decl>
angle-brackets ::= are-optional"
;; angle bracket
- (should-not (bnf-test-face-at 1))
+ (should-not (bnf-get-face-at 1))
;; "stm"
- (should (eq (bnf-test-face-at 2) 'font-lock-function-name-face))
- (should (eq (bnf-test-face-at 4) 'font-lock-function-name-face))
+ (should (eq (bnf-get-face-at 2) 'font-lock-function-name-face))
+ (should (eq (bnf-get-face-at 4) 'font-lock-function-name-face))
;; angle bracket
- (should-not (bnf-test-face-at 5))
+ (should-not (bnf-get-face-at 5))
;; "::=" symbol
- (should (eq (bnf-test-face-at 7) 'font-lock-constant-face))
- (should (eq (bnf-test-face-at 9) 'font-lock-constant-face))
+ (should (eq (bnf-get-face-at 7) 'font-lock-constant-face))
+ (should (eq (bnf-get-face-at 9) 'font-lock-constant-face))
;; angle bracket
- (should-not (bnf-test-face-at 11))
+ (should-not (bnf-get-face-at 11))
;; "dec" symbol
- (should (eq (bnf-test-face-at 12) 'font-lock-builtin-face))
- (should (eq (bnf-test-face-at 15) 'font-lock-builtin-face))))
+ (should (eq (bnf-get-face-at 12) 'font-lock-builtin-face))
+ (should (eq (bnf-get-face-at 15) 'font-lock-builtin-face))))
(it "fontify nonterminals despite the case"
(bnf-test-with-temp-buffer
"<RULE> ::= <foo>
<RuLe> ::= <foO>"
- (should (eq (bnf-test-face-at 2) 'font-lock-function-name-face))
- (should (eq (bnf-test-face-at 5) 'font-lock-function-name-face))
- (should-not (bnf-test-face-at 17))
- (should (eq (bnf-test-face-at 19) 'font-lock-function-name-face))
- (should (eq (bnf-test-face-at 22) 'font-lock-function-name-face))
- (should-not (bnf-test-face-at 23))
- (should (eq (bnf-test-face-at 30) 'font-lock-builtin-face))
- (should (eq (bnf-test-face-at 32) 'font-lock-builtin-face))
- (should-not (bnf-test-face-at 33))))
+ (should (eq (bnf-get-face-at 2) 'font-lock-function-name-face))
+ (should (eq (bnf-get-face-at 5) 'font-lock-function-name-face))
+ (should-not (bnf-get-face-at 17))
+ (should (eq (bnf-get-face-at 19) 'font-lock-function-name-face))
+ (should (eq (bnf-get-face-at 22) 'font-lock-function-name-face))
+ (should-not (bnf-get-face-at 23))
+ (should (eq (bnf-get-face-at 30) 'font-lock-builtin-face))
+ (should (eq (bnf-get-face-at 32) 'font-lock-builtin-face))
+ (should-not (bnf-get-face-at 33))))
(it "fontify nonterminals despite the indentation"
(bnf-test-with-temp-buffer
" <rule> ::= <foo>"
- (should-not (bnf-test-face-at 4))
- (should (eq (bnf-test-face-at 5) 'font-lock-function-name-face))
- (should (eq (bnf-test-face-at 6) 'font-lock-function-name-face))
- (should (eq (bnf-test-face-at 7) 'font-lock-function-name-face))
- (should (eq (bnf-test-face-at 8) 'font-lock-function-name-face))
- (should-not (bnf-test-face-at 9))))
+ (should-not (bnf-get-face-at 4))
+ (should (eq (bnf-get-face-at 5) 'font-lock-function-name-face))
+ (should (eq (bnf-get-face-at 6) 'font-lock-function-name-face))
+ (should (eq (bnf-get-face-at 7) 'font-lock-function-name-face))
+ (should (eq (bnf-get-face-at 8) 'font-lock-function-name-face))
+ (should-not (bnf-get-face-at 9))))
(it "fontify sequences"
(bnf-test-with-temp-buffer
"<rule> ::= <foo> <bar> <baz>"
;; "<" angle bracket
- (should-not (bnf-test-face-at 1))
+ (should-not (bnf-get-face-at 1))
;; "rule"
- (should (eq (bnf-test-face-at 2) 'font-lock-function-name-face))
- (should (eq (bnf-test-face-at 5) 'font-lock-function-name-face))
+ (should (eq (bnf-get-face-at 2) 'font-lock-function-name-face))
+ (should (eq (bnf-get-face-at 5) 'font-lock-function-name-face))
;; ">" angle bracket
- (should-not (bnf-test-face-at 6))
+ (should-not (bnf-get-face-at 6))
;; "foo"
- (should (eq (bnf-test-face-at 13) 'font-lock-builtin-face))
- (should (eq (bnf-test-face-at 15) 'font-lock-builtin-face))
+ (should (eq (bnf-get-face-at 13) 'font-lock-builtin-face))
+ (should (eq (bnf-get-face-at 15) 'font-lock-builtin-face))
;; space
- (should-not (bnf-test-face-at 17))
+ (should-not (bnf-get-face-at 17))
;; "bar"
- (should (eq (bnf-test-face-at 19) 'font-lock-builtin-face))
- (should (eq (bnf-test-face-at 21) 'font-lock-builtin-face))
+ (should (eq (bnf-get-face-at 19) 'font-lock-builtin-face))
+ (should (eq (bnf-get-face-at 21) 'font-lock-builtin-face))
;; space
- (should-not (bnf-test-face-at 23))
+ (should-not (bnf-get-face-at 23))
;; "baz"
- (should (eq (bnf-test-face-at 25) 'font-lock-builtin-face))
- (should (eq (bnf-test-face-at 27) 'font-lock-builtin-face))))
+ (should (eq (bnf-get-face-at 25) 'font-lock-builtin-face))
+ (should (eq (bnf-get-face-at 27) 'font-lock-builtin-face))))
(it "fontify alternatives"
(bnf-test-with-temp-buffer
"<foo> | <bar> | <baz>"
;; "foo"
- (should (eq (bnf-test-face-at 2) 'font-lock-builtin-face))
- (should (eq (bnf-test-face-at 4) 'font-lock-builtin-face))
+ (should (eq (bnf-get-face-at 2) 'font-lock-builtin-face))
+ (should (eq (bnf-get-face-at 4) 'font-lock-builtin-face))
;; "|"
- (should (eq (bnf-test-face-at 7) 'font-lock-warning-face))
+ (should (eq (bnf-get-face-at 7) 'font-lock-warning-face))
;; "bar"
- (should (eq (bnf-test-face-at 10) 'font-lock-builtin-face))
- (should (eq (bnf-test-face-at 12) 'font-lock-builtin-face))
+ (should (eq (bnf-get-face-at 10) 'font-lock-builtin-face))
+ (should (eq (bnf-get-face-at 12) 'font-lock-builtin-face))
;; "|"
- (should (eq (bnf-test-face-at 15) 'font-lock-warning-face))
+ (should (eq (bnf-get-face-at 15) 'font-lock-warning-face))
;; "baz"
- (should (eq (bnf-test-face-at 18) 'font-lock-builtin-face))
- (should (eq (bnf-test-face-at 20) 'font-lock-builtin-face))))
+ (should (eq (bnf-get-face-at 18) 'font-lock-builtin-face))
+ (should (eq (bnf-get-face-at 20) 'font-lock-builtin-face))))
(it "fontify rule punctuation"
(bnf-test-with-temp-buffer
@@ -161,13 +161,13 @@ angle-brackets ::= are-optional"
<any sequence of symbols not containing ` or ' >
| <empty>"
;; "proper string"
- (should (eq (bnf-test-face-at 3) 'font-lock-function-name-face))
- (should (eq (bnf-test-face-at 15) 'font-lock-function-name-face))
+ (should (eq (bnf-get-face-at 3) 'font-lock-function-name-face))
+ (should (eq (bnf-get-face-at 15) 'font-lock-function-name-face))
;; "any sequence of symbols not containing ` or ' "
- (should (eq (bnf-test-face-at 31) 'font-lock-builtin-face))
- (should (eq (bnf-test-face-at 76) 'font-lock-builtin-face))
+ (should (eq (bnf-get-face-at 31) 'font-lock-builtin-face))
+ (should (eq (bnf-get-face-at 76) 'font-lock-builtin-face))
;; "empty"
- (should (eq (bnf-test-face-at 90) 'font-lock-builtin-face))
- (should (eq (bnf-test-face-at 94) 'font-lock-builtin-face)))))
+ (should (eq (bnf-get-face-at 90) 'font-lock-builtin-face))
+ (should (eq (bnf-get-face-at 94) 'font-lock-builtin-face)))))
;;; test-bnf-mode-font-lock.el ends here
diff --git a/test/utils.el b/test/utils.el
index 8ef5e69..6a2144e 100644
--- a/test/utils.el
+++ b/test/utils.el
@@ -55,7 +55,7 @@
(unwind-protect
(progn ,@body))))
-(defun bnf-test-face-at (pos &optional content)
+(defun bnf-get-face-at (pos &optional content)
"Get the face at POS in CONTENT.
If CONTENT is not given, return the face at POS in the current
buffer."
- [elpa] externals/bnf-mode 0bbd059 19/36: Added abbreviation table used in bnf-mode buffers, (continued)
- [elpa] externals/bnf-mode 0bbd059 19/36: Added abbreviation table used in bnf-mode buffers, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode dd6fae4 23/36: Added mised define-abbrev-table call, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 3d5c4fd 30/36: Cleaned up comments syntax propertize for ALGOL 60 style, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 5b223e8 34/36: Provide canonical BNF sytax, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 1b4f75f 06/36: Add field containing commit SHA expanded during archive creation, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 8799c4a 09/36: Add a workaround for ert-runner to work with Emacs > 26, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode d697e0a 10/36: Migrate tests to use buttercup, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 4ba8d28 14/36: Load undercover first to improve coverage report, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 62238ee 16/36: Cleaned up Makefile, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode a3b6d86 21/36: Update change log, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 8948987 20/36: Rename bnf-test-face-at => bnf-get-face-at,
Stefan Monnier <=
- [elpa] externals/bnf-mode 2756c7c 26/36: Use default abbrev table provided by define-derived-mode, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode b9a8446 25/36: Refactor test to use shorten font lock helpers, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode d8cb802 27/36: Amended tests, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 27e45bd 31/36: Cleaned up syntax table, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode a4fe013 33/36: Bump version, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode e99dd39 35/36: Amended documentation, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 0f7ebc1 17/36: Move revision number to the common place, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 4d9ca0a 22/36: Updated documentation, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode e3489f3 24/36: Use years range in copyright notice, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 639628a 28/36: Added generic test suite, Stefan Monnier, 2021/03/17