branch: elpa/forth-mode
commit 9f885433e1927d8b4e64188fef4d178d04fb7ab2
Author: Lars Brinkhoff <[email protected]>
Commit: Lars Brinkhoff <[email protected]>
Use ERT for some light testing as part of build.
---
build.el | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/build.el b/build.el
index 58fda880f7..ca2fded45e 100644
--- a/build.el
+++ b/build.el
@@ -1,7 +1,22 @@
(princ (emacs-version))
+
(let ((generated-autoload-file (concat default-directory "autoloads.el")))
(update-directory-autoloads "."))
(load-file "autoloads.el")
(add-to-list 'load-path ".")
-(let ((result (byte-recompile-directory "." 0)))
- (kill-emacs (if (string-match "failed" result) 1 0)))
+
+(require 'ert)
+(ert-deftest compile-package ()
+ "Compile package."
+ (should-not (string-match "failed" (byte-recompile-directory "." 0))))
+
+(ert-deftest load-forth-mode ()
+ "Load forth-mode."
+ (should (require 'forth-mode))
+ (should (featurep 'forth-mode))
+ (with-temp-buffer
+ (forth-mode)
+ (should (eq major-mode 'forth-mode))
+ (kill-buffer)))
+
+(ert-run-tests-batch-and-exit)