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

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

[elpa] externals/hyperbole bb9ced6 1/4: Update some test cases to work w


From: ELPA Syncer
Subject: [elpa] externals/hyperbole bb9ced6 1/4: Update some test cases to work with latest code
Date: Sun, 23 May 2021 23:57:09 -0400 (EDT)

branch: externals/hyperbole
commit bb9ced67fed4dae4fbe50c848a80846dcfb8fbaf
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>

    Update some test cases to work with latest code
---
 ChangeLog               |  9 +++++++++
 test/hbut-tests.el      |  3 ++-
 test/hibtypes-tests.el  | 14 ++++++++------
 test/hypb-tests.el      | 10 +++++-----
 test/kotl-mode-tests.el |  2 ++
 5 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3fd5323..0518c2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2021-05-23  Bob Weiner  <rsw@gnu.org>
 
+* test/kotl-mode-tests.el (kotl-mode-indent-cell-changes-level):
+    Ensure always at the beginning of buffer for the test.
+  test/hbut-tests.el (hbut-pathname-env-variable-test):
+  test/hibtypes-tests.el (ibtyeps::pathname-env-variable-test):
+    Use file-truename to normalize both names.
+  test/hypb-tests.el (hypb:replace-match-string-after-27.1-test):
+    Conditionalize but don't skip so no issue arises when looking
+    at all test results.
+
 * kotl/kexport.el (kexport:html-replacement-alist): Change \0
     back to \\& to try to fix link replacements again.
 
diff --git a/test/hbut-tests.el b/test/hbut-tests.el
index 06b4c4e..6363c20 100644
--- a/test/hbut-tests.el
+++ b/test/hbut-tests.el
@@ -259,7 +259,8 @@
         (goto-char 2)
         (action-key)
         (should (equal major-mode 'dired-mode))
-        (should (= 0 (string-match (getenv "HOME") (file-truename 
default-directory)))))
+       (should (= 0 (string-match (file-truename (getenv "HOME"))
+                                  (file-truename default-directory)))))
     nil))
 
 (ert-deftest hbut-pathname-emacs-lisp-file-test ()
diff --git a/test/hibtypes-tests.el b/test/hibtypes-tests.el
index fa12357..f287d53 100644
--- a/test/hibtypes-tests.el
+++ b/test/hibtypes-tests.el
@@ -71,12 +71,14 @@
 
 (ert-deftest ibtypes::pathname-env-variable-test ()
   (unwind-protect
-      (with-temp-buffer
-        (insert "\"${HOME}\"")
-        (goto-char 2)
-        (ibtypes::pathname)
-        (should (equal major-mode 'dired-mode))
-        (should (= 0 (string-match (getenv "HOME") (file-truename 
default-directory)))))
+      (when (getenv "HOME")
+       (with-temp-buffer
+          (insert "\"${HOME}\"")
+          (goto-char 2)
+          (ibtypes::pathname)
+          (should (equal major-mode 'dired-mode))
+          (should (= 0 (string-match (file-truename (getenv "HOME"))
+                                    (file-truename default-directory))))))
     nil))
 
 (ert-deftest ibtypes::pathname-emacs-lisp-file-test ()
diff --git a/test/hypb-tests.el b/test/hypb-tests.el
index c89c6f3..3109503 100644
--- a/test/hypb-tests.el
+++ b/test/hypb-tests.el
@@ -83,11 +83,11 @@
 
 (ert-deftest hypb:replace-match-string-after-27.1-test ()
   ;; anchors (bug#15107, bug#44861)
-  (skip-unless (version< "27.1" emacs-version))
-  (should (equal (hypb:replace-match-string "a\\B" "a aaaa" "b")
-                 "a bbba"))
-  (should (equal (hypb:replace-match-string "\\`\\|x" "--xx--" "z")
-                 "z--zz--")))
+  (when (version< "27.1" emacs-version)
+    (should (equal (hypb:replace-match-string "a\\B" "a aaaa" "b")
+                   "a bbba"))
+    (should (equal (hypb:replace-match-string "\\`\\|x" "--xx--" "z")
+                   "z--zz--"))))
 
 (provide 'hypb-tests)
 ;;; hypb-tests.el ends here
diff --git a/test/kotl-mode-tests.el b/test/kotl-mode-tests.el
index ddbe7be..36c0d39 100644
--- a/test/kotl-mode-tests.el
+++ b/test/kotl-mode-tests.el
@@ -51,6 +51,7 @@
   (setup-kotl-mode-example-test
    ;; Start in first cell
    (kotl-mode:example temporary-file-directory t)
+   (kotl-mode:beginning-of-buffer)
    (should (kotl-mode:first-cell-p))
 
    ;; Move to next cell
@@ -71,6 +72,7 @@
   (skip-unless (not noninteractive))
   (setup-kotl-mode-example-test
    (kotl-mode:example temporary-file-directory t)
+   (kotl-mode:beginning-of-buffer)
    (should (kotl-mode:first-cell-p))
    (kotl-mode:next-cell 1)
    (should (hact 'kbd-key "TAB"))



reply via email to

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