Skip to content

Commit

Permalink
Skip test_resolve_swap if the root directory is not writable
Browse files Browse the repository at this point in the history
  • Loading branch information
k-takata committed Dec 31, 2015
1 parent 0dc4c21 commit 59be977
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/testdir/Make_all.mak
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ SCRIPTS_MORE2 = \
test25.out \
test27.out \
test49.out \
test97.out
test97.out \
test_resolve_swap.out


# Tests that run on most systems, but not MingW and Cygwin.
Expand Down
7 changes: 4 additions & 3 deletions src/testdir/test_resolve_swap.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Tests for swap file detection.
This test failed, if root '/' directory not writable.
This test is skipped, if root '/' directory not writable.

STARTTEST
:so small.vim
Expand All @@ -13,8 +13,9 @@ STARTTEST
: let link = 'Xlink1'
: let linkswap = '.'.link.'.swp'
: if !filewritable(dir) || glob(file)
: " failed
: return
: " The root directory is not writable. Skip this.
: e! test.ok
: wq! test.out
: endif
: call writefile([], file)
: exe '!ln -sfL' file link
Expand Down

0 comments on commit 59be977

Please sign in to comment.