annotate src/testdir/test_recover.vim @ 11432:0cafb01af1b6 v8.0.0600

patch 8.0.0600: test_recover fails on some systems commit https://github.com/vim/vim/commit/2a0b06def49198aef45ef173f524a638a700f9c9 Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 18 16:23:43 2017 +0200 patch 8.0.0600: test_recover fails on some systems Problem: test_recover fails on some systems. Solution: Explicitly check if "/" is writable. (Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Thu, 18 May 2017 16:30:03 +0200
parents cc3f6ad092c2
children 4767939d10cc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10896
d513b653f5d0 patch 8.0.0337: invalid memory access in :recover command
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Test :recover
d513b653f5d0 patch 8.0.0337: invalid memory access in :recover command
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
d513b653f5d0 patch 8.0.0337: invalid memory access in :recover command
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 func Test_recover_root_dir()
d513b653f5d0 patch 8.0.0337: invalid memory access in :recover command
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 " This used to access invalid memory.
d513b653f5d0 patch 8.0.0337: invalid memory access in :recover command
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 split Xtest
d513b653f5d0 patch 8.0.0337: invalid memory access in :recover command
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 set dir=/
d513b653f5d0 patch 8.0.0337: invalid memory access in :recover command
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 call assert_fails('recover', 'E305:')
d513b653f5d0 patch 8.0.0337: invalid memory access in :recover command
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 close!
d513b653f5d0 patch 8.0.0337: invalid memory access in :recover command
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9
11432
0cafb01af1b6 patch 8.0.0600: test_recover fails on some systems
Christian Brabandt <cb@256bit.org>
parents: 10898
diff changeset
10 if has('win32') || filewritable('/') == 2
10898
cc3f6ad092c2 patch 8.0.0338: :recover test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 10896
diff changeset
11 " can write in / directory on MS-Windows
cc3f6ad092c2 patch 8.0.0338: :recover test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 10896
diff changeset
12 set dir=/notexist/
cc3f6ad092c2 patch 8.0.0338: :recover test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 10896
diff changeset
13 endif
10896
d513b653f5d0 patch 8.0.0337: invalid memory access in :recover command
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 call assert_fails('split Xtest', 'E303:')
d513b653f5d0 patch 8.0.0337: invalid memory access in :recover command
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 set dir&
d513b653f5d0 patch 8.0.0337: invalid memory access in :recover command
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 endfunc
d513b653f5d0 patch 8.0.0337: invalid memory access in :recover command
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17
d513b653f5d0 patch 8.0.0337: invalid memory access in :recover command
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 " TODO: move recover tests from test78.in to here.