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

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

[nongnu] elpa/forth-mode 9f885433e1 048/153: Use ERT for some light test


From: ELPA Syncer
Subject: [nongnu] elpa/forth-mode 9f885433e1 048/153: Use ERT for some light testing as part of build.
Date: Sat, 29 Jan 2022 08:02:15 -0500 (EST)

branch: elpa/forth-mode
commit 9f885433e1927d8b4e64188fef4d178d04fb7ab2
Author: Lars Brinkhoff <lars@nocrew.org>
Commit: Lars Brinkhoff <lars@nocrew.org>

    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)



reply via email to

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