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

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

[nongnu] elpa/d-mode 2ef7c5c 077/346: Add d-mode testing infrastructure.


From: ELPA Syncer
Subject: [nongnu] elpa/d-mode 2ef7c5c 077/346: Add d-mode testing infrastructure.
Date: Sun, 29 Aug 2021 11:00:07 -0400 (EDT)

branch: elpa/d-mode
commit 2ef7c5cbcec5ada9dcfd0ca28e1cd9db13e30bf3
Author: Dmitri Makarov <dmakarov@alumni.stanford.edu>
Commit: Dmitri Makarov <dmakarov@alumni.stanford.edu>

    Add d-mode testing infrastructure.
---
 .travis.yml    | 26 ++++++++++++++++++++++++++
 Cask           |  5 +++++
 Makefile       | 13 +++++++++++++
 d-mode-test.el | 30 ++++++++++++++++++++++++++++++
 tests/I0039.d  | 18 ++++++++++++++++++
 5 files changed, 92 insertions(+)

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..8cf2346
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,26 @@
+language: emacs-lisp
+
+before_install:
+  # PPA for stable Emacs packages
+  - sudo add-apt-repository -y ppa:cassou/emacs
+  # PPA for Emacs nightlies
+  - sudo add-apt-repository -y ppa:ubuntu-elisp/ppa
+
+install:
+  # Update and install the Emacs for our environment
+  - sudo apt-get update -qq
+  - sudo apt-get install -qq -yy ${EMACS}-nox ${EMACS}-el
+  # Install cask dependencies
+  - curl -fsSLo /tmp/cask-master.zip 
https://github.com/cask/cask/archive/master.zip
+  - sudo unzip -qq -d /opt /tmp/cask-master.zip
+  - sudo ln -sf /opt/cask-master/bin/cask /usr/local/bin/cask
+  - cask
+
+env:
+  - EMACS=emacs24
+  - EMACS=emacs-snapshot
+
+script:
+  - emacs --version
+  - make compile
+  - make test
diff --git a/Cask b/Cask
new file mode 100644
index 0000000..5336cec
--- /dev/null
+++ b/Cask
@@ -0,0 +1,5 @@
+(source gnu)
+(source melpa)
+
+(development
+ (depends-on "undercover"))
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..6e5e251
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,13 @@
+emacs ?= emacs
+all: test
+
+test: clean
+       cask exec emacs -Q -batch -l d-mode-test.el -l d-mode.el -f 
ert-run-tests-batch-and-exit
+
+compile:
+       $(emacs) -Q -batch -f batch-byte-compile d-mode.el
+
+clean:
+       rm -f f.elc
+
+.PHONY:        all test
diff --git a/d-mode-test.el b/d-mode-test.el
new file mode 100644
index 0000000..4b7caac
--- /dev/null
+++ b/d-mode-test.el
@@ -0,0 +1,30 @@
+;;; d-mode-test.el --- Tests for D Programming Language major mode
+
+;; Author:  Dmitri Makarov <dmakarov@alumni.stanford.edu>
+;; Maintainer:  Russel Winder <russel@winder.org.uk>
+;; Created:  April 2015
+
+;; This program 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 2 of the License, or
+;; (at your option) any later version.
+;;
+;; This program 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 program; see the file COPYING.  If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+(when (require 'undercover nil t)
+  (undercover "d-mode.el"))
+
+(require 'd-mode nil t)
+
+(ert-deftest d-mode-basic ()
+  (should (equal (car '("abc" "edf")) "abc")))
+
+(provide 'd-mode-test)
diff --git a/tests/I0039.d b/tests/I0039.d
new file mode 100644
index 0000000..299da99
--- /dev/null
+++ b/tests/I0039.d
@@ -0,0 +1,18 @@
+void foo()
+{
+  version (a) {
+    // 
+  }
+  else version (b) {
+  }
+  else {
+  }
+
+  debug (A) {
+  }
+  else debug (B) {
+  }
+  else
+  {
+  }
+}



reply via email to

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