[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bnf-mode 3beded6 15/74: Rule names are case insensitive
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bnf-mode 3beded6 15/74: Rule names are case insensitive. Added test. |
Date: |
Thu, 9 May 2019 08:27:44 -0400 (EDT) |
branch: externals/bnf-mode
commit 3beded6594876625283ac11ee0f3a32c9716ec58
Author: Serghei Iakovlev <address@hidden>
Commit: Serghei Iakovlev <address@hidden>
Rule names are case insensitive. Added test.
---
bnf-mode.el | 7 ++++---
test/bnf-mode-font-test.el | 21 ++++++++++++++++++---
2 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/bnf-mode.el b/bnf-mode.el
index dd3e1c1..dd685ef 100644
--- a/bnf-mode.el
+++ b/bnf-mode.el
@@ -212,9 +212,10 @@ See `rx' documentation for more information about REGEXPS
param."
bnf-font-lock-keywords
;; keywords-only
nil
- ;; Regarding to RFC5234#2.1
- ;; The names <rulename>, <Rulename>, <RULENAME>,
- ;; and <rUlENamE> all refer to the same rule.
+ ;; Regarding to RFC5234#2.1 rule names are case
+ ;; insensitive. The names <rulename>, <Rulename>,
+ ;; <RULENAME>, and <rUlENamE> all refer to the
+ ;; same rule.
t
)))
diff --git a/test/bnf-mode-font-test.el b/test/bnf-mode-font-test.el
index e099d26..2300695 100644
--- a/test/bnf-mode-font-test.el
+++ b/test/bnf-mode-font-test.el
@@ -61,7 +61,8 @@ buffer."
(should (eq (bnf-test-face-at 1)
'font-lock-comment-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-test-face-at 24) '
+ font-lock-comment-face))))
(ert-deftest bnf-mode-syntax-table/fontify-nonterminals ()
:tags '(fontification syntax-table)
@@ -75,11 +76,25 @@ buffer."
(should-not (bnf-test-face-at 5))
;; "may expand into" symbol
(should-not (eq (bnf-test-face-at 7)
'font-lock-function-name-face))
+ (should-not (eq (bnf-test-face-at 9)
'font-lock-function-name-face))
;; angle bracket
(should-not (bnf-test-face-at 11))
;; "dec" symbol
- (should-not (eq (bnf-test-face-at 12)
'font-lock-function-name-face))
- (should-not (eq (bnf-test-face-at 15)
'font-lock-function-name-face))))
+ (should (eq (bnf-test-face-at 12)
'font-lock-builtin-face))
+ (should (eq (bnf-test-face-at 15)
'font-lock-builtin-face))))
+
+(ert-deftest bnf-mode-syntax-table/fontify-nonterminals-case ()
+ :tags '(fontification syntax-table)
+ (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 (eq (bnf-test-face-at 17)
'font-lock-function-name-face))
+ (should (eq (bnf-test-face-at 20)
'font-lock-function-name-face))
+ (should-not (bnf-test-face-at 21))
+ (should (eq (bnf-test-face-at 28)
'font-lock-builtin-face))
+ (should (eq (bnf-test-face-at 30)
'font-lock-builtin-face))
+ (should-not (bnf-test-face-at 31))))
(provide 'bnf-mode-font-test)
- [elpa] externals/bnf-mode d50ded2 13/74: Amended tests, (continued)
- [elpa] externals/bnf-mode d50ded2 13/74: Amended tests, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 1d8c1e7 14/74: Update change log [ci skip], Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 7e37702 25/74: Correct BNF description [ci skip], Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode f6fd97b 07/74: Setup Travis CI builds, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 246a24f 22/74: Bump version, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 3e48f65 27/74: BNF has no strings. Treat ' and " as a symbols, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode a7ea867 32/74: Correct documentation, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 1ad5de5 37/74: Amended installation methods, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode b18b10c 05/74: Implemented font locking, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 388206f 09/74: Correct copyright date, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 3beded6 15/74: Rule names are case insensitive. Added test.,
Stefan Monnier <=
- [elpa] externals/bnf-mode af8cf6d 18/74: Correct change log [ci skip], Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode fd83621 20/74: Bump version, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode f917836 23/74: Change default goal for make, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode ed24bee 21/74: Bumb version, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode a7df2dd 17/74: Fontify sequences, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode defc412 11/74: Amended description and docs, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode aa2c7a2 30/74: Correct change log formatting [ci skip], Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode c90b14d 26/74: Correct documentation to follow code style guide., Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode a3a77e3 29/74: In the BNF there are no grouping brackets except angle ones. Fixed, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 1698dc8 39/74: Improved documentation, Stefan Monnier, 2019/05/09