branch: elpa/beancount commit b1fa650c5ba68c226368e03a19ae7dba7f8ba6f2 Author: Daniele Nicolodi <dani...@grinta.net> Commit: Daniele Nicolodi <dani...@grinta.net>
beancount.el: Add tests Add a trivial test that verifies that the major mode can be loaded in a buffer. More tests will be added later. --- Makefile | 9 +++++++++ beancount-tests.el | 25 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..e80b067359 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +EMACS ?= emacs +SRC = beancount.el +TESTS = beancount-tests.el + +compile: $(SRC) + $(EMACS) -batch -f batch-byte-compile $< + +test: + $(EMACS) -batch -L . -l ert -l $(TESTS) -f ert-run-tests-batch-and-exit diff --git a/beancount-tests.el b/beancount-tests.el new file mode 100644 index 0000000000..56f11a0a44 --- /dev/null +++ b/beancount-tests.el @@ -0,0 +1,25 @@ +;;; beancount-test.el --- ERT for beancount-mode + +;; Copyright 2019 Daniele Nicolodi <dani...@grinta.net> + +;; This file is not part of GNU Emacs. + +;; 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 3 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. + + +(require 'ert) +(require 'beancount) + +(ert-deftest beancount/smoke-001 () + :tags '(regress) + (with-temp-buffer + (beancount-mode) + (font-lock-ensure)))