branch: elpa/flycheck
commit 0097c0ba01d9ebf503d0998f1322df95b4cf6355
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Move the Windows skip into the expand-file-name specs
    
    A buttercup assume in before-each does not skip the specs; put it inside
    each it, matching the other POSIX-only specs, so they are skipped on
    Windows rather than run and failed.
---
 test/specs/test-util.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/specs/test-util.el b/test/specs/test-util.el
index 588b8628ff..72f3c5a252 100644
--- a/test/specs/test-util.el
+++ b/test/specs/test-util.el
@@ -221,28 +221,29 @@
       (expect (flycheck-symbol-list-p '()) :to-be-truthy)))
 
   (describe "flycheck--expand-file-name"
-
     ;; These assert POSIX output, as reported by remote hosts over TRAMP.
     ;; On Windows `expand-file-name' prepends the current drive to drive-less
     ;; absolute paths, so the exact strings differ; skip there.
-    (before-each
-      (assume (not (memq system-type '(cygwin windows-nt ms-dos)))))
 
     (it "expands a relative name against a local directory"
+      (assume (not (memq system-type '(cygwin windows-nt ms-dos))))
       (expect (flycheck--expand-file-name "foo.py" "/home/user/")
               :to-equal "/home/user/foo.py"))
 
     (it "expands a relative name against a remote directory"
+      (assume (not (memq system-type '(cygwin windows-nt ms-dos))))
       (expect (flycheck--expand-file-name "foo.py" "/ssh:host:/home/user/")
               :to-equal "/ssh:host:/home/user/foo.py"))
 
     (it "grafts the remote prefix onto a host-local absolute path"
+      (assume (not (memq system-type '(cygwin windows-nt ms-dos))))
       ;; A checker running on the remote host reports host-local paths;
       ;; the result must name the file on that host, not locally.
       (expect (flycheck--expand-file-name "/tmp/foo.py" 
"/ssh:host:/home/user/")
               :to-equal "/ssh:host:/tmp/foo.py"))
 
     (it "leaves an already-remote filename untouched"
+      (assume (not (memq system-type '(cygwin windows-nt ms-dos))))
       (expect (flycheck--expand-file-name
                "/ssh:host:/tmp/foo.py" "/ssh:host:/home/user/")
               :to-equal "/ssh:host:/tmp/foo.py")))

Reply via email to