branch: elpa/flycheck
commit 8d8182f6646185f54a229b9e2f14552ef54a28ac
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>
Skip the POSIX flycheck--expand-file-name specs on Windows
expand-file-name prepends the current drive to drive-less absolute paths
on Windows, so these specs, which assert the POSIX output that remote
hosts report over TRAMP, fail there. Guard them like the other
POSIX-only specs in the suite.
---
test/specs/test-util.el | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/test/specs/test-util.el b/test/specs/test-util.el
index f20c4bcc88..588b8628ff 100644
--- a/test/specs/test-util.el
+++ b/test/specs/test-util.el
@@ -222,6 +222,12 @@
(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"
(expect (flycheck--expand-file-name "foo.py" "/home/user/")
:to-equal "/home/user/foo.py"))