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

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

[elpa] externals/hyperbole 6b2c073 49/50: Correct test cases failing on


From: Stefan Monnier
Subject: [elpa] externals/hyperbole 6b2c073 49/50: Correct test cases failing on mac (#55)
Date: Wed, 17 Mar 2021 18:44:24 -0400 (EDT)

branch: externals/hyperbole
commit 6b2c073eb0582c0410c09e07e5241769635e43b8
Author: Mats Lidell <mats.lidell@lidells.se>
Commit: GitHub <noreply@github.com>

    Correct test cases failing on mac (#55)
    
    Use env for HOME in comparison
    Make non proportional scrolling test more robust
---
 Changes                | 8 ++++++++
 test/demo-tests.el     | 5 +++--
 test/hibtypes-tests.el | 2 +-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/Changes b/Changes
index da33caa..abdd041 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,11 @@
+2021-03-14  Mats Lidell  <matsl@gnu.org>
+
+* test/demo-tests.el (demo-smart-scrolling-non-proportional-test): Make
+    test more robust
+
+* test/hibtypes-tests.el (ibtypes::pathname-env-variable-test): Use env
+    for HOME to not depend on machine or OS specifics
+
 2021-03-14  Bob Weiner  <rsw@gnu.org>
 
 * man/hyperbole.texi (Smart Key - Magit Mode):
diff --git a/test/demo-tests.el b/test/demo-tests.el
index e258f4e..a0cc222 100644
--- a/test/demo-tests.el
+++ b/test/demo-tests.el
@@ -79,7 +79,6 @@
               (pos (point)))
           (end-of-line)
           (action-key)
-          (beginning-of-line)
           (should (= pos (window-start)))))
     (kill-buffer "DEMO")))
 
@@ -89,10 +88,12 @@
         (hypb:display-file-with-logo (expand-file-name "DEMO" hyperb:dir))
         (goto-char (point-min))
         (re-search-forward "Table of Contents")
+        (beginning-of-line)
         (let ((smart-scroll-proportional nil)
               (pos (point)))
+          (end-of-line)
           (action-key)
-          (should (< pos (point)))))
+          (should (< pos (window-start)))))
     (kill-buffer "DEMO")))
 
 ;; Hyperbole menus
diff --git a/test/hibtypes-tests.el b/test/hibtypes-tests.el
index c095711..4f74482 100644
--- a/test/hibtypes-tests.el
+++ b/test/hibtypes-tests.el
@@ -76,7 +76,7 @@
         (goto-char 2)
         (ibtypes::pathname)
         (should (equal major-mode 'dired-mode))
-        (should (= 0 (string-match "/home/.*" (file-truename 
default-directory)))))
+        (should (= 0 (string-match (getenv "HOME") (file-truename 
default-directory)))))
     nil))
 
 (ert-deftest ibtypes::pathname-emacs-lisp-file-test ()



reply via email to

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