summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-09-08 21:51:49 +0100
committerw0rp <devw0rp@gmail.com>2017-09-08 21:51:49 +0100
commit26195efa0b4fb618a52c60ab538e429c2e65742c (patch)
treed49a7dfff719eccd6830b8ace548746ceeaaf8ab
parent1c5253b928cae4d97351b3b7050e3e0b6242b229 (diff)
downloadale-26195efa0b4fb618a52c60ab538e429c2e65742c.zip
Get some more random tests to work on Windows
-rw-r--r--test/test_temporary_file_management.vader6
-rw-r--r--test/test_tmpdir_init.vader4
2 files changed, 7 insertions, 3 deletions
diff --git a/test/test_temporary_file_management.vader b/test/test_temporary_file_management.vader
index 6d1f0dfd..ae2bf251 100644
--- a/test/test_temporary_file_management.vader
+++ b/test/test_temporary_file_management.vader
@@ -35,7 +35,7 @@ Before:
call ale#linter#Define('foobar', {
\ 'name': 'testlinter',
- \ 'executable': 'echo',
+ \ 'executable': has('win32') ? 'cmd' : 'echo',
\ 'callback': 'TestCallback',
\ 'command_callback': 'TestCommandCallback',
\})
@@ -100,7 +100,9 @@ Execute(ALE should create and delete directories for ale#engine#CreateDirectory(
" We should get the correct file permissions.
" We want to ensure that the directory is not readable by 'other'
- AssertEqual 'rwxr-x---', getfperm(b:dir)
+ if has('unix')
+ AssertEqual 'rwxr-x---', getfperm(b:dir)
+ endif
" The two directories shouldn't be the same.
AssertNotEqual b:dir2, b:dir
diff --git a/test/test_tmpdir_init.vader b/test/test_tmpdir_init.vader
index 68bb2b43..23326dcc 100644
--- a/test/test_tmpdir_init.vader
+++ b/test/test_tmpdir_init.vader
@@ -1,2 +1,4 @@
Execute($TMPDIR should be set to a default value if unset):
- AssertEqual '/tmp', $TMPDIR
+ if has('unix')
+ AssertEqual '/tmp', $TMPDIR
+ endif