[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bnf-mode d50ded2 13/74: Amended tests
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bnf-mode d50ded2 13/74: Amended tests |
Date: |
Thu, 9 May 2019 08:27:44 -0400 (EDT) |
branch: externals/bnf-mode
commit d50ded2d2125f3085ce70a1e52459e29cf327314
Author: Serghei Iakovlev <address@hidden>
Commit: Serghei Iakovlev <address@hidden>
Amended tests
---
Makefile | 2 +-
test/bnf-mode-font-test.el | 30 +++++++++++++++++++++++++++++-
2 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index c9976cd..3750c2c 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,7 @@
SHELL := $(shell which bash)
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
-EMACS = emacs
+EMACS := emacs
CASK = cask
EMACSFLAGS ?=
TESTFLAGS ?=
diff --git a/test/bnf-mode-font-test.el b/test/bnf-mode-font-test.el
index a0b3805..e099d26 100644
--- a/test/bnf-mode-font-test.el
+++ b/test/bnf-mode-font-test.el
@@ -49,10 +49,38 @@ buffer."
;;;; Font locking
-(ert-deftest bnf-mode-syntax-table/fontify-dq-string ()
+(ert-deftest bnf-mode-syntax-table/fontify-strings ()
:tags '(fontification syntax-table)
(should (eq (bnf-test-face-at 11 "<foo> ::= \"bar\"")
'font-lock-string-face)))
+(ert-deftest bnf-mode-syntax-table/fontify-line-comment ()
+ :tags '(fontification syntax-table)
+ (bnf-test-with-temp-buffer "; A
+
+<stm> ::= <decl> ; foo"
+ (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))))
+
+(ert-deftest bnf-mode-syntax-table/fontify-nonterminals ()
+ :tags '(fontification syntax-table)
+ (bnf-test-with-temp-buffer "<stm> ::= <decl>"
+ ;; angle bracket
+ (should-not (bnf-test-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))
+ ;; angle bracket
+ (should-not (bnf-test-face-at 5))
+ ;; "may expand into" symbol
+ (should-not (eq (bnf-test-face-at 7)
'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))))
+
(provide 'bnf-mode-font-test)
;;; bnf-mode-font-test.el ends here
- [elpa] branch externals/bnf-mode created (now a4ca649), Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode cecdb79 01/74: Initial commit, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode f100f00 04/74: Initial font locking, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode f0a3cd7 03/74: Add CHANGELOG file, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode d3a7059 08/74: Added change log, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode aa8e9af 12/74: Initial test case, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode d50ded2 13/74: Amended tests,
Stefan Monnier <=
- [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, 2019/05/09