[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bnf-mode 00a0543 50/74: Removed not used tests macro
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bnf-mode 00a0543 50/74: Removed not used tests macro |
Date: |
Thu, 9 May 2019 08:27:51 -0400 (EDT) |
branch: externals/bnf-mode
commit 00a0543588c740da4875ad219e85855318d342f8
Author: Serghei Iakovlev <address@hidden>
Commit: Serghei Iakovlev <address@hidden>
Removed not used tests macro
---
test/bnf-mode-font-test.el | 2 +-
test/test-helper.el | 42 +++++-------------------------------------
2 files changed, 6 insertions(+), 38 deletions(-)
diff --git a/test/bnf-mode-font-test.el b/test/bnf-mode-font-test.el
index ff4aa09..58fb1f6 100644
--- a/test/bnf-mode-font-test.el
+++ b/test/bnf-mode-font-test.el
@@ -141,7 +141,7 @@ angle-brackets ::= are-optional"
(ert-deftest bnf-mode-syntax-table/fontify-rule-punctuation ()
:tags '(fontification syntax-table)
- (bnf-test-with-temp-buffer"
+ (bnf-test-with-temp-buffer "
<proper string> ::=
<any sequence of symbols not containing ` or ' >
| <empty>"
diff --git a/test/test-helper.el b/test/test-helper.el
index 52cc590..5bbfc83 100644
--- a/test/test-helper.el
+++ b/test/test-helper.el
@@ -32,17 +32,11 @@
;;; Code:
-(require 'ert-x) ; `ert-with-test-buffer'
-(require 'cl-lib) ; `cl-defmacro'
+(require 'cl-lib) ; `cl-defmacro'
;; Make sure the exact Emacs version can be found in the build output
(message "Running tests on Emacs %s" emacs-version)
-;; The test fixtures assume an indentation width of 4, so we need to set that
-;; up for the tests.
-(setq-default default-tab-width 4
- indent-tabs-mode nil)
-
(when (require 'undercover nil t)
(undercover "bnf-mode.el"))
@@ -53,45 +47,19 @@
;; Load the file under test
(load (expand-file-name "bnf-mode" source-directory)))
-;; Helpers
-
-(cl-defmacro bnf-deftest (name args &body body)
- (declare (indent 2))
- `(ert-deftest ,(intern (format "bnf-ert-%s" name)) ()
- ""
- ,@args))
-
-(cl-defmacro bnf-ert-with-test-buffer ((&rest args) initial-contents &body
body)
- (declare (indent 2))
- `(ert-with-test-buffer (,@args)
- (bnf-mode)
- (insert ,initial-contents)
- ,@body))
-
-(defmacro bnf-test-with-temp-buffer (content &rest body)
+(cl-defmacro bnf-test-with-temp-buffer (content &rest body)
"Evaluate BODY in a temporary buffer with CONTENT."
(declare (debug t)
(indent 1))
`(with-temp-buffer
(insert ,content)
(bnf-mode)
- (font-lock-fontify-buffer)
+ ,(if (fboundp 'font-lock-ensure)
+ '(font-lock-ensure)
+ '(with-no-warnings (font-lock-fontify-buffer)))
(goto-char (point-min))
,@body))
-(cl-defmacro bnf-def-indentation-test (name args initial-contents
expected-output)
- (declare (indent 2))
- `(bnf-deftest ,name ,args
- (bnf-ert-with-test-buffer (:name ,(format "(Expected)" name))
- ,initial-contents
- (let ((indented
(ert-buffer-string-reindented)))
- (delete-region (point-min)
(point-max))
- (insert ,expected-output)
- (ert-with-test-buffer (:name
,(format "(Actual)" name))
- (bnf-mode)
- (insert indented)
- (should (equal indented
,expected-output)))))))
-
(defun bnf-test-face-at (pos &optional content)
"Get the face at POS in CONTENT.
- [elpa] externals/bnf-mode c90b14d 26/74: Correct documentation to follow code style guide., (continued)
- [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
- [elpa] externals/bnf-mode 64a32ba 42/74: Cleaned up Makefile, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode a53ade1 24/74: Fixed BNF rule name definition to follow ALGOL 60 report, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 65bfadc 65/74: Fixed orthodox comments regexp, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode e2f8bfa 53/74: Added support of ; character to use in terminals, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 3a46f17 36/74: Correct documentation, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode f99de60 47/74: Cleaned up Makefile, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 7bbf329 49/74: Added comment-start-skip to help comment commands recognize comments, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 00a0543 50/74: Removed not used tests macro,
Stefan Monnier <=
- [elpa] externals/bnf-mode 6eb06a8 52/74: Make tests easier to read, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 273eabd 31/74: Correct change log formatting (II) [ci skip], Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 687ee9e 16/74: Angle brackets to use for nonterminals are optional. Changed, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 83f0e0f 28/74: Code cleanup, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 96c6e76 61/74: Changed CI deploy token [ci skip], Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 8dabc6c 63/74: Minor correction to the change log format, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode e898672 73/74: Removed no longer needed local variables, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode f95ec5f 69/74: Improved preparing package, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 7c98cc9 66/74: Fixed misspelling, updated change log, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode ce5005e 57/74: Install missed dependency on Travis CI, Stefan Monnier, 2019/05/09