annotate src/testdir/test_delete.vim @ 34495:d43c2e4b645c v9.1.0154

patch 9.1.0154: shm=F not respected when reloading buffer with 'autoread' Commit: https://github.com/vim/vim/commit/9db39b0ec90600bb41faec3a12b934b17c298b1f Author: Shougo Matsushita <Shougo.Matsu@gmail.com> Date: Wed Mar 6 20:58:41 2024 +0100 patch 9.1.0154: shm=F not respected when reloading buffer with 'autoread' Problem: shm=F not respected when reloading buffer with 'autoread' Solution: Check SHM_FILEINFO in buf_check_timestamp() (Shougo Matsushita) closes: #14144 Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 06 Mar 2024 21:15:03 +0100
parents 58c9f11eae5b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7615
228ff048db20 commit https://github.com/vim/vim/commit/da440d21a6b94d7f525fa7be9b1417c78dd9aa4c
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Test for delete().
228ff048db20 commit https://github.com/vim/vim/commit/da440d21a6b94d7f525fa7be9b1417c78dd9aa4c
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
23027
f74978697fb6 patch 8.2.2060: check for features implemented with "if"
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
3 source check.vim
33844
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
4 source term_util.vim
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
5 source screendump.vim
23027
f74978697fb6 patch 8.2.2060: check for features implemented with "if"
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
6
7615
228ff048db20 commit https://github.com/vim/vim/commit/da440d21a6b94d7f525fa7be9b1417c78dd9aa4c
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 func Test_file_delete()
29997
98f5a0618a77 patch 9.0.0336: tests are flaky because of using a common file name
Bram Moolenaar <Bram@vim.org>
parents: 29970
diff changeset
8 split Xfdelfile
7615
228ff048db20 commit https://github.com/vim/vim/commit/da440d21a6b94d7f525fa7be9b1417c78dd9aa4c
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 call setline(1, ['a', 'b'])
228ff048db20 commit https://github.com/vim/vim/commit/da440d21a6b94d7f525fa7be9b1417c78dd9aa4c
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 wq
29997
98f5a0618a77 patch 9.0.0336: tests are flaky because of using a common file name
Bram Moolenaar <Bram@vim.org>
parents: 29970
diff changeset
11 call assert_equal(['a', 'b'], readfile('Xfdelfile'))
98f5a0618a77 patch 9.0.0336: tests are flaky because of using a common file name
Bram Moolenaar <Bram@vim.org>
parents: 29970
diff changeset
12 call assert_equal(0, delete('Xfdelfile'))
98f5a0618a77 patch 9.0.0336: tests are flaky because of using a common file name
Bram Moolenaar <Bram@vim.org>
parents: 29970
diff changeset
13 call assert_fails('call readfile("Xfdelfile")', 'E484:')
98f5a0618a77 patch 9.0.0336: tests are flaky because of using a common file name
Bram Moolenaar <Bram@vim.org>
parents: 29970
diff changeset
14 call assert_equal(-1, delete('Xfdelfile'))
98f5a0618a77 patch 9.0.0336: tests are flaky because of using a common file name
Bram Moolenaar <Bram@vim.org>
parents: 29970
diff changeset
15 bwipe Xfdelfile
7615
228ff048db20 commit https://github.com/vim/vim/commit/da440d21a6b94d7f525fa7be9b1417c78dd9aa4c
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 endfunc
228ff048db20 commit https://github.com/vim/vim/commit/da440d21a6b94d7f525fa7be9b1417c78dd9aa4c
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17
228ff048db20 commit https://github.com/vim/vim/commit/da440d21a6b94d7f525fa7be9b1417c78dd9aa4c
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 func Test_dir_delete()
29970
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
19 call mkdir('Xdirdel')
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
20 call assert_true(isdirectory('Xdirdel'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
21 call assert_equal(0, delete('Xdirdel', 'd'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
22 call assert_false(isdirectory('Xdirdel'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
23 call assert_equal(-1, delete('Xdirdel', 'd'))
7615
228ff048db20 commit https://github.com/vim/vim/commit/da440d21a6b94d7f525fa7be9b1417c78dd9aa4c
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 endfunc
228ff048db20 commit https://github.com/vim/vim/commit/da440d21a6b94d7f525fa7be9b1417c78dd9aa4c
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25
228ff048db20 commit https://github.com/vim/vim/commit/da440d21a6b94d7f525fa7be9b1417c78dd9aa4c
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 func Test_recursive_delete()
29970
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
27 call mkdir('Xrecdel')
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
28 call mkdir('Xrecdel/subdir')
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
29 call mkdir('Xrecdel/empty')
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
30 split Xrecdel/Xfile
7615
228ff048db20 commit https://github.com/vim/vim/commit/da440d21a6b94d7f525fa7be9b1417c78dd9aa4c
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 call setline(1, ['a', 'b'])
228ff048db20 commit https://github.com/vim/vim/commit/da440d21a6b94d7f525fa7be9b1417c78dd9aa4c
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 w
29970
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
33 w Xrecdel/subdir/Xfile
7615
228ff048db20 commit https://github.com/vim/vim/commit/da440d21a6b94d7f525fa7be9b1417c78dd9aa4c
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 close
29970
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
35 call assert_true(isdirectory('Xrecdel'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
36 call assert_equal(['a', 'b'], readfile('Xrecdel/Xfile'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
37 call assert_true(isdirectory('Xrecdel/subdir'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
38 call assert_equal(['a', 'b'], readfile('Xrecdel/subdir/Xfile'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
39 call assert_true('Xrecdel/empty'->isdirectory())
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
40 call assert_equal(0, delete('Xrecdel', 'rf'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
41 call assert_false(isdirectory('Xrecdel'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
42 call assert_equal(-1, delete('Xrecdel', 'd'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
43 bwipe Xrecdel/Xfile
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
44 bwipe Xrecdel/subdir/Xfile
7615
228ff048db20 commit https://github.com/vim/vim/commit/da440d21a6b94d7f525fa7be9b1417c78dd9aa4c
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45 endfunc
7629
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
46
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
47 func Test_symlink_delete()
23027
f74978697fb6 patch 8.2.2060: check for features implemented with "if"
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
48 CheckUnix
29997
98f5a0618a77 patch 9.0.0336: tests are flaky because of using a common file name
Bram Moolenaar <Bram@vim.org>
parents: 29970
diff changeset
49 split Xslfile
7629
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
50 call setline(1, ['a', 'b'])
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
51 wq
29997
98f5a0618a77 patch 9.0.0336: tests are flaky because of using a common file name
Bram Moolenaar <Bram@vim.org>
parents: 29970
diff changeset
52 silent !ln -s Xslfile Xdellink
7629
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
53 " Delete the link, not the file
29970
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
54 call assert_equal(0, delete('Xdellink'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
55 call assert_equal(-1, delete('Xdellink'))
29997
98f5a0618a77 patch 9.0.0336: tests are flaky because of using a common file name
Bram Moolenaar <Bram@vim.org>
parents: 29970
diff changeset
56 call assert_equal(0, delete('Xslfile'))
98f5a0618a77 patch 9.0.0336: tests are flaky because of using a common file name
Bram Moolenaar <Bram@vim.org>
parents: 29970
diff changeset
57 bwipe Xslfile
7629
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
58 endfunc
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
59
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
60 func Test_symlink_dir_delete()
23027
f74978697fb6 patch 8.2.2060: check for features implemented with "if"
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
61 CheckUnix
29970
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
62 call mkdir('Xsymdir')
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
63 silent !ln -s Xsymdir Xdirlink
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
64 call assert_true(isdirectory('Xsymdir'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
65 call assert_true(isdirectory('Xdirlink'))
7629
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
66 " Delete the link, not the directory
29970
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
67 call assert_equal(0, delete('Xdirlink'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
68 call assert_equal(-1, delete('Xdirlink'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
69 call assert_equal(0, delete('Xsymdir', 'd'))
7629
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
70 endfunc
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
71
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
72 func Test_symlink_recursive_delete()
23027
f74978697fb6 patch 8.2.2060: check for features implemented with "if"
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
73 CheckUnix
29970
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
74 call mkdir('Xrecdir3')
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
75 call mkdir('Xrecdir3/subdir')
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
76 call mkdir('Xrecdir4')
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
77 split Xrecdir3/Xfile
7629
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
78 call setline(1, ['a', 'b'])
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
79 w
29970
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
80 w Xrecdir3/subdir/Xfile
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
81 w Xrecdir4/Xfile
7629
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
82 close
29970
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
83 silent !ln -s ../Xrecdir4 Xrecdir3/Xreclink
7629
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
84
29970
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
85 call assert_true(isdirectory('Xrecdir3'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
86 call assert_equal(['a', 'b'], readfile('Xrecdir3/Xfile'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
87 call assert_true(isdirectory('Xrecdir3/subdir'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
88 call assert_equal(['a', 'b'], readfile('Xrecdir3/subdir/Xfile'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
89 call assert_true(isdirectory('Xrecdir4'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
90 call assert_true(isdirectory('Xrecdir3/Xreclink'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
91 call assert_equal(['a', 'b'], readfile('Xrecdir4/Xfile'))
7629
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
92
29970
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
93 call assert_equal(0, delete('Xrecdir3', 'rf'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
94 call assert_false(isdirectory('Xrecdir3'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
95 call assert_equal(-1, delete('Xrecdir3', 'd'))
7629
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
96 " symlink is deleted, not the directory it points to
29970
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
97 call assert_true(isdirectory('Xrecdir4'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
98 call assert_equal(['a', 'b'], readfile('Xrecdir4/Xfile'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
99 call assert_equal(0, delete('Xrecdir4/Xfile'))
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
100 call assert_equal(0, delete('Xrecdir4', 'd'))
11197
7f355d8cd634 patch 8.0.0485: not all windows commands are tested
Christian Brabandt <cb@256bit.org>
parents: 7641
diff changeset
101
29970
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
102 bwipe Xrecdir3/Xfile
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
103 bwipe Xrecdir3/subdir/Xfile
d891115c0aea patch 9.0.0323: using common name in tests leads to flaky tests
Bram Moolenaar <Bram@vim.org>
parents: 23027
diff changeset
104 bwipe Xrecdir4/Xfile
7629
befbed72da87 commit https://github.com/vim/vim/commit/43a34f9f74fdce462fa250baab620264c28b6165
Christian Brabandt <cb@256bit.org>
parents: 7615
diff changeset
105 endfunc
16668
81be817c9d9a patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 11197
diff changeset
106
81be817c9d9a patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 11197
diff changeset
107 func Test_delete_errors()
81be817c9d9a patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 11197
diff changeset
108 call assert_fails('call delete('''')', 'E474:')
81be817c9d9a patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 11197
diff changeset
109 call assert_fails('call delete(''foo'', 0)', 'E15:')
81be817c9d9a patch 8.1.1336: some eval functionality is not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 11197
diff changeset
110 endfunc
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
111
33844
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
112 " This should no longer trigger ml_get errors
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
113 func Test_delete_ml_get_errors()
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
114 CheckRunVimInTerminal
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
115 let lines =<< trim END
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
116 set noshowcmd noruler scrolloff=0
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
117 source samples/matchparen.vim
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
118 END
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
119 call writefile(lines, 'XDelete_ml_get_error', 'D')
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
120 let buf = RunVimInTerminal('-S XDelete_ml_get_error samples/box.txt', #{rows: 10, wait_for_ruler: 0})
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
121 call TermWait(buf)
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
122 call term_sendkeys(buf, "249GV\<C-End>d")
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
123 call TermWait(buf)
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
124 " The following used to trigger ml_get errors
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
125 call term_sendkeys(buf, "\<PageUp>")
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
126 call TermWait(buf)
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
127 call term_sendkeys(buf, ":mess\<cr>")
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
128 call VerifyScreenDump(buf, 'Test_delete_ml_get_errors_1', {})
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
129 call term_sendkeys(buf, ":q!\<cr>")
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
130 call StopVimInTerminal(buf)
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
131 endfunc
58c9f11eae5b patch 9.0.2134: ml_get error when scrolling
Christian Brabandt <cb@256bit.org>
parents: 29997
diff changeset
132
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 17914
diff changeset
133 " vim: shiftwidth=2 sts=2 expandtab