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

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

[elpa] master 39f5c24 187/399: ivy-test.el: Use :expected-result


From: Oleh Krehel
Subject: [elpa] master 39f5c24 187/399: ivy-test.el: Use :expected-result
Date: Sat, 20 Jul 2019 14:57:20 -0400 (EDT)

branch: master
commit 39f5c2407e199b4b6a9a7d7b89a8253c12a5edba
Author: Basil L. Contovounesios <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy-test.el: Use :expected-result
    
    (counsel-find-file-with-dollars, counsel-find-file-with-dotfiles):
    Use :expected-result in place of skip-unless, which was
    unfortunately only added in Emacs 24.4.
    
    Fixes #2050
---
 ivy-test.el | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/ivy-test.el b/ivy-test.el
index f4d727e..c7cf9b6 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -1096,7 +1096,9 @@ a buffer visiting a file."
                      ""))))
 
 (ert-deftest counsel-find-file-with-dollars ()
-  (skip-unless (file-exists-p "test"))
+  ;; This should be `skip-unless' instead,
+  ;; but it was only added in Emacs 24.4.
+  :expected-result (if (file-exists-p "test") :passed :failed)
   (should (string=
            (file-relative-name
             (ivy-with '(counsel-find-file) "fo C-m"
@@ -1104,8 +1106,12 @@ a buffer visiting a file."
            "test/find-file/files-with-dollar/foo$")))
 
 (ert-deftest counsel-find-file-with-dotfiles ()
-  (skip-unless (and (file-exists-p "test")
-                    (= emacs-major-version 26)))
+  ;; This should be `skip-unless' instead,
+  ;; but it was only added in Emacs 24.4.
+  :expected-result (if (and (file-exists-p "test")
+                            (= emacs-major-version 26))
+                       :passed
+                     :failed)
   (should (string=
            (file-relative-name
             (ivy-with '(counsel-find-file) "f C-m"



reply via email to

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