emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/bnf-mode 639628a 28/36: Added generic test suite


From: Stefan Monnier
Subject: [elpa] externals/bnf-mode 639628a 28/36: Added generic test suite
Date: Wed, 17 Mar 2021 18:40:18 -0400 (EDT)

branch: externals/bnf-mode
commit 639628a90f81f1c698a6486f4ff6d84d8f4d4e2f
Author: Serghei Iakovlev <egrep@protonmail.ch>
Commit: Serghei Iakovlev <egrep@protonmail.ch>

    Added generic test suite
---
 test/test-bnf-mode-generic.el | 53 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/test/test-bnf-mode-generic.el b/test/test-bnf-mode-generic.el
new file mode 100644
index 0000000..a596720
--- /dev/null
+++ b/test/test-bnf-mode-generic.el
@@ -0,0 +1,53 @@
+;;; test-bnf-mode-generic.el --- BNF Mode: Generic tests -*- lexical-binding: 
t; -*-
+
+;; Copyright (C) 2019-2020 Free Software Foundation, Inc.
+
+;; Author: Serghei Iakovlev <egrep@protonmail.ch>
+;; Maintainer: Serghei Iakovlev <egrep@protonmail.ch>
+;; Version: 0.4.4
+;; URL: https://github.com/sergeyklay/bnf-mode
+
+;;;; License
+
+;; This file is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License
+;; as published by the Free Software Foundation; either version 3
+;; of the License, or (at your option) any later version.
+
+;; This file is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this file.  If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; Define test-suites to test common stuff of `bnf-mode' using `buttercup'.
+
+;;; Code:
+
+(require 'buttercup)
+
+(when (require 'undercover nil t)
+  ;; Track coverage, but don't send to coverage serivice.  Save in parent
+  ;; directory as undercover saves paths relative to the repository root.
+  (undercover "*.el" "test/utils.el"
+              (:report-file "coverage-final.json")
+              (:send-report nil)))
+
+(let* ((current-dir (file-name-directory (or load-file-name (buffer-file-name)
+                                             default-directory))))
+  (load (concat current-dir "utils.el") nil 'nomessage 'nosuffix))
+
+
+;;;; Tests
+
+(describe "bnf-mode"
+  (it "is derived from prog-mode"
+    (with-bnf-buffer
+     ""
+     (expect (derived-mode-p 'prog-mode)))))
+
+;;; test-bnf-mode-generic.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]