[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/adoc-mode 504d490785 055/199: test: running the test is no
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/adoc-mode 504d490785 055/199: test: running the test is now more smoothly |
Date: |
Sun, 3 Sep 2023 06:59:34 -0400 (EDT) |
branch: elpa/adoc-mode
commit 504d4907858db9b63b4b0552b8a9a98b9e709a0a
Author: Florian Kaufmann <sensorflo@gmail.com>
Commit: Florian Kaufmann <sensorflo@gmail.com>
test: running the test is now more smoothly
---
adoc-mode-test.el | 37 +++++++++++++++++++++++++------------
1 file changed, 25 insertions(+), 12 deletions(-)
diff --git a/adoc-mode-test.el b/adoc-mode-test.el
index d72a663edf..16afb6500b 100644
--- a/adoc-mode-test.el
+++ b/adoc-mode-test.el
@@ -53,9 +53,9 @@
(should (equal tmp tmp2)))))
(if (< (point) (point-max))
(forward-char 1)
- (setq not-done nil))))))
- ;; tear-down
- (kill-buffer buf-name)))
+ (setq not-done nil)))))
+ ;; tear-down
+ (kill-buffer buf-name))))
(defun adoctest-trans (original-text expected-text transform-fn &optional args)
(let ((pos 0)
@@ -80,9 +80,9 @@
;; exercise
(funcall transform-fn args)
;; verify
- (should (string-equal (buffer-substring (point-min) (point-max))
expected-text))))
- ;; tear-down
- (kill-buffer "adoctest-trans")))
+ (should (string-equal (buffer-substring (point-min) (point-max))
expected-text)))
+ ;; tear-down
+ (kill-buffer "adoctest-trans"))))
(ert-deftest adoctest-test-titles-simple-one-line-before ()
(adoctest-faces "titles-simple-one-line-before"
@@ -510,19 +510,32 @@
(ert-deftest adoctest-pre-test-byte-compile ()
;; todo: also test for warnings
+ (when (file-exists-p "adoc-mode.elc")
+ (delete-file "adoc-mode.elc"))
(should (byte-compile-file (locate-library "adoc-mode.el" t)))
(should (load "adoc-mode.el" nil nil t))
+
+ (when (file-exists-p "adoc-mode-test.elc")
+ (delete-file "adoc-mode-test.elc"))
(should (byte-compile-file (locate-library "adoc-mode-test.el" t)))
(should (load "adoc-mode-test.el" nil nil t)))
(defun adoc-test-run()
(interactive)
- (save-buffer "adoc-mode.el")
- (save-buffer "adoc-mode-test.el")
- ;; todo: execute tests in an smart order: the basic/simple tests first, so
- ;; when a complicated test fails one knows that the simple things do work
- (ert-run-tests-interactively "^adoctest-pre-test-byte-compile")
- (ert-run-tests-interactively "^adoctest-test-"))
+ (unwind-protect
+ (progn
+ (when (get-buffer "*ert*")
+ (kill-buffer "*ert*")) ; so after a test failed it can be re-run
+ (save-buffer "adoc-mode.el")
+ (save-buffer "adoc-mode-test.el")
+ ;; todo: execute tests in an smart order: the basic/simple tests first,
so
+ ;; when a complicated test fails one knows that the simple things do
work
+ (ert-run-tests-interactively "^adoctest-pre-test-byte-compile")
+ (ert-run-tests-interactively "^adoctest-test-"))
+ (when (file-exists-p "adoc-mode.elc")
+ (delete-file "adoc-mode.elc"))
+ (when (file-exists-p "adoc-mode-test.elc")
+ (delete-file "adoc-mode-test.elc"))))
;;; adoc-mode-test.el ends here
- [nongnu] elpa/adoc-mode 6ccb9d6de5 009/199: intermediate checkin - to be removed, (continued)
- [nongnu] elpa/adoc-mode 6ccb9d6de5 009/199: intermediate checkin - to be removed, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode ce247928ec 021/199: added test for byte-compile-file without errors, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 105519ce37 033/199: changed image fontification without tests, added tests for attribute lists, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 3d2ab81750 041/199: new style font lock for xref inline macro, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 9c404a4e2d 042/199: test2, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 2756c62d86 043/199: revert test2, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode d4a57c5c03 045/199: cleaned up file comments a bit, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 97602c1577 046/199: fixed important typo, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 7b0009904e 047/199: updated URL and copyright date, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode a08c7f26cc 053/199: bugfixes for promote / denote title, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 504d490785 055/199: test: running the test is now more smoothly,
ELPA Syncer <=
- [nongnu] elpa/adoc-mode fb170735f8 056/199: bugfixes and new tests for promote/denote/toggle title, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 4e13247892 058/199: test: added test for adjust-title-del, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 73b790fcf2 064/199: Merge branch 'develop', ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode fb4e940e0d 066/199: edited adoc-version's doc string, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode a805bd9787 071/199: bump version to 0.5.1, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 4b6054b5c8 079/199: added adoc-insert-indented, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode f779544180 084/199: bumped version to 0.6.1, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 27bf57f6fd 095/199: in commentary section, fixed wrong recipe how to use autoload, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 1b3a175861 100/199: renamings and improved comments in field of macros, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode fc590439b0 110/199: attribute list of macros can now spawn more than two lines, ELPA Syncer, 2023/09/03