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

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

[elpa] master e3f8908 186/399: ivy-test.el: Make friendlier


From: Oleh Krehel
Subject: [elpa] master e3f8908 186/399: ivy-test.el: Make friendlier
Date: Sat, 20 Jul 2019 14:57:20 -0400 (EDT)

branch: master
commit e3f89081fe853eb26d822690d352efc01a3d0af1
Author: Basil L. Contovounesios <address@hidden>
Commit: Basil L. Contovounesios <address@hidden>

    ivy-test.el: Make friendlier
    
    Do not pass arbitrary text as first argument to message.  Do not
    clone remote Git repositories at toplevel.  Cloning repositories
    shouldn't be needed at all for the purpose of accessing test data,
    but even if it were, those commands belong in Makefile or similar,
    not at the test suite's toplevel.
    
    For discussion, see:
    
https://github.com/abo-abo/swiper/commit/7e735808e966d70340b5a2cef0430f913151d9b6
    
https://github.com/abo-abo/swiper/commit/fa87b977aecbc7ee5f3b77ddf94c6f040e17c348
    
https://github.com/abo-abo/swiper/commit/4171364ab3cdb21eabb45657a8d20bd85f3ecc9b
    
    (counsel-find-file-with-dollars, counsel-find-file-with-dollars):
    Use skip-unless.
---
 ivy-test.el | 30 ++++++++++++++----------------
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/ivy-test.el b/ivy-test.el
index 4091738..f4d727e 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -35,7 +35,7 @@
 (require 'ivy)
 (require 'counsel)
 
-(message (emacs-version))
+(message "%s" (emacs-version))
 
 (defvar ivy-expr nil
   "Holds a test expression to evaluate with `ivy-eval'.")
@@ -1095,10 +1095,8 @@ a buffer visiting a file."
                                "C-p C-m")
                      ""))))
 
-(unless (file-exists-p "test")
-  (shell-command "git clone -b test --single-branch 
https://github.com/abo-abo/swiper/ test"))
-
 (ert-deftest counsel-find-file-with-dollars ()
+  (skip-unless (file-exists-p "test"))
   (should (string=
            (file-relative-name
             (ivy-with '(counsel-find-file) "fo C-m"
@@ -1106,18 +1104,18 @@ a buffer visiting a file."
            "test/find-file/files-with-dollar/foo$")))
 
 (ert-deftest counsel-find-file-with-dotfiles ()
-  (when (and (version<= emacs-version "26.2")
-             (not (version< emacs-version "26.1")))
-    (should (string=
-             (file-relative-name
-              (ivy-with '(counsel-find-file) "f C-m"
-                        :dir "test/find-file/dotfiles/"))
-             "test/find-file/dotfiles/foo/"))
-    (should (string=
-             (file-relative-name
-              (ivy-with '(counsel-find-file) "foob C-m"
-                        :dir "test/find-file/dotfiles/"))
-             "test/find-file/dotfiles/.foobar1"))))
+  (skip-unless (and (file-exists-p "test")
+                    (= emacs-major-version 26)))
+  (should (string=
+           (file-relative-name
+            (ivy-with '(counsel-find-file) "f C-m"
+                      :dir "test/find-file/dotfiles/"))
+           "test/find-file/dotfiles/foo/"))
+  (should (string=
+           (file-relative-name
+            (ivy-with '(counsel-find-file) "foob C-m"
+                      :dir "test/find-file/dotfiles/"))
+           "test/find-file/dotfiles/.foobar1")))
 
 (provide 'ivy-test)
 



reply via email to

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