[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 2b994bf 3/6: Fix remaining test case issues,
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole 2b994bf 3/6: Fix remaining test case issues, except for org-mode one |
Date: |
Mon, 19 Apr 2021 00:57:08 -0400 (EDT) |
branch: externals/hyperbole
commit 2b994bf327e01884720fe4645f768587ae7593b1
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>
Fix remaining test case issues, except for org-mode one
---
hypb-ert.el | 10 +++++++---
test/demo-tests.el | 2 +-
test/hbut-tests.el | 2 +-
test/hibtypes-tests.el | 4 +---
test/hpath-tests.el | 5 ++---
5 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/hypb-ert.el b/hypb-ert.el
index df0c556..c2db761 100644
--- a/hypb-ert.el
+++ b/hypb-ert.el
@@ -29,14 +29,18 @@
(require 'hbut)
(require 'hargs)
+(defun hypb-run-ert-test-libraries ()
+ "Return the list of test Lisp libraries to load."
+ (directory-files (expand-file-name "test" hyperb:dir) t "^[a-zA-Z].*\\.el$"))
+
(defun hypb-run-ert-test-symbol (test-symbol)
"Run the specified TEST-SYMBOL ert test."
- (mapc 'load-file (directory-files "test" t "\\.el$"))
+ (mapc #'load-file (hypb-run-ert-test-libraries))
(ert (intern test-symbol)))
(defun hypb-run-ert-test-selector (test-selector)
"Run the specified TEST-SELECTOR defined ert test."
- (mapc 'load-file (directory-files "test" t "\\.el$"))
+ (mapc #'load-file (hypb-run-ert-test-libraries))
(ert test-selector))
(defal hypb-ert-sym 'hypb-run-ert-test-symbol)
@@ -45,7 +49,7 @@
(defun hypb-run-all-tests ()
"Run every ert test."
(interactive)
- (mapc 'load-file (directory-files (expand-file-name "test" hyperb:dir) t
"\\.el$"))
+ (mapc #'load-file (hypb-run-ert-test-libraries))
(ert t))
(provide 'hypb-ert)
diff --git a/test/demo-tests.el b/test/demo-tests.el
index 1a4aed8..2db85d1 100644
--- a/test/demo-tests.el
+++ b/test/demo-tests.el
@@ -91,7 +91,7 @@
(re-search-forward "Table of Contents")
(beginning-of-line)
(let ((smart-scroll-proportional nil)
- (pos (point)))
+ (pos (window-start)))
(end-of-line)
(action-key)
(should (< pos (window-start)))))
diff --git a/test/hbut-tests.el b/test/hbut-tests.el
index a0b581c..f688029 100644
--- a/test/hbut-tests.el
+++ b/test/hbut-tests.el
@@ -101,7 +101,7 @@ the button text"
(error
(progn
(should (equal (car err) 'error))
- (should (string-search "hpath:find" (cadr err)))))))
+ (should (string-match "hpath:find" (cadr err)))))))
(ibtype:delete 'ibtypes::defal-path-missing)))
(ert-deftest hbut-defil-it ()
diff --git a/test/hibtypes-tests.el b/test/hibtypes-tests.el
index cacdc6c..4571baf 100644
--- a/test/hibtypes-tests.el
+++ b/test/hibtypes-tests.el
@@ -137,9 +137,7 @@
(kill-buffer "hypb.el")))
(ert-deftest ibtypes::pathname-with-dash-loads-file-test ()
- "Pathname with dash loads file.
-Bug: Fails with 'Invalid function: hact'."
- :expected-result :failed
+ "Pathname with dash loads file."
(with-temp-buffer
(insert "\"-${hyperb:dir}/test/hy-test-dependencies.el\"")
(goto-char 2)
diff --git a/test/hpath-tests.el b/test/hpath-tests.el
index 525433c..eeabe54 100644
--- a/test/hpath-tests.el
+++ b/test/hpath-tests.el
@@ -19,11 +19,10 @@
(require 'hpath)
(ert-deftest hpath:find-report-lisp-variable-path-name-when-not-exists ()
- "hpath:find prints out the wrong filename on lisp variable expanded
filenames"
- :expected-result :failed
+ "Test that hpath:find expands and returns filename when it is non-existent."
(condition-case err
(hpath:find "${hyperb:dir}/UNKNOWNFILE")
- (error (should (string-search (concat hyperb:dir "UNKNOWNFILE") (cadr
err))))))
+ (error (should (string-match (concat hyperb:dir "UNKNOWNFILE") (cadr
err))))))
(provide 'hpath-tests)
;;; hpath-tests.el ends here
- [elpa] externals/hyperbole updated (a0be037 -> d91d546), ELPA Syncer, 2021/04/19
- [elpa] externals/hyperbole f56dc21 1/6: Update some doc with latest changes, ELPA Syncer, 2021/04/19
- [elpa] externals/hyperbole 2b994bf 3/6: Fix remaining test case issues, except for org-mode one,
ELPA Syncer <=
- [elpa] externals/hyperbole 69c2c7d 4/6: Small syntactic updates, ELPA Syncer, 2021/04/19
- [elpa] externals/hyperbole 84e1b11 2/6: Update kotl-orgtbl.el with Copyright and doc, ELPA Syncer, 2021/04/19
- [elpa] externals/hyperbole c5dbb88 5/6: Bunch of fixes and improvements in prep for next release, ELPA Syncer, 2021/04/19
- [elpa] externals/hyperbole d91d546 6/6: Merge branch 'master' of hyperbole, ELPA Syncer, 2021/04/19