aboutsummaryrefslogtreecommitdiff
path: root/test/old
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-04-05 18:04:45 +0800
committerGitHub <noreply@github.com>2024-04-05 18:04:45 +0800
commita500c5f808ccf0b678c935f00e0af4503a5bd724 (patch)
treefaec5c534b49cccfabb239748499d530ea5bc054 /test/old
parent4add77ddbfbbff0795ee9bcca42b8096a6265049 (diff)
downloadrneovim-a500c5f808ccf0b678c935f00e0af4503a5bd724.tar.gz
rneovim-a500c5f808ccf0b678c935f00e0af4503a5bd724.tar.bz2
rneovim-a500c5f808ccf0b678c935f00e0af4503a5bd724.zip
vim-patch:8.1.0815: dialog for file changed outside of Vim not tested (#28184)
Problem: Dialog for file changed outside of Vim not tested. Solution: Add a test. Move FileChangedShell test. Add 'L' flag to feedkeys(). https://github.com/vim/vim/commit/5e66b42aae7c67a3ef67617d4bd43052ac2b73ce Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/old')
-rw-r--r--test/old/testdir/test_buffer.vim4
-rw-r--r--test/old/testdir/test_filechanged.vim6
-rw-r--r--test/old/testdir/test_functions.vim2
3 files changed, 2 insertions, 10 deletions
diff --git a/test/old/testdir/test_buffer.vim b/test/old/testdir/test_buffer.vim
index bb8394997d..f2a5a228b8 100644
--- a/test/old/testdir/test_buffer.vim
+++ b/test/old/testdir/test_buffer.vim
@@ -232,8 +232,6 @@ endfunc
" Test for deleting a modified buffer with :confirm
func Test_bdel_with_confirm()
- " requires a UI to be active
- throw 'Skipped: use test/functional/legacy/buffer_spec.lua'
CheckUnix
CheckNotGui
CheckFeature dialog_con
@@ -251,8 +249,6 @@ endfunc
" Test for editing another buffer from a modified buffer with :confirm
func Test_goto_buf_with_confirm()
- " requires a UI to be active
- throw 'Skipped: use test/functional/legacy/buffer_spec.lua'
CheckUnix
CheckNotGui
CheckFeature dialog_con
diff --git a/test/old/testdir/test_filechanged.vim b/test/old/testdir/test_filechanged.vim
index fef0eb732f..b9f8d4c37a 100644
--- a/test/old/testdir/test_filechanged.vim
+++ b/test/old/testdir/test_filechanged.vim
@@ -140,8 +140,6 @@ func Test_FileChangedShell_edit()
endfunc
func Test_FileChangedShell_edit_dialog()
- " requires a UI to be active
- throw 'Skipped: use test/functional/legacy/filechanged_spec.lua'
CheckNotGui
CheckUnix " Using low level feedkeys() does not work on MS-Windows.
@@ -156,6 +154,7 @@ func Test_FileChangedShell_edit_dialog()
au FileChangedShell Xchanged_r let g:reason = v:fcs_reason | let v:fcs_choice = 'ask'
augroup END
call assert_equal(&fileformat, 'unix')
+ sleep 10m " make the test less flaky in Nvim
call writefile(["line1\r", "line2\r"], 'Xchanged_r')
let g:reason = ''
call feedkeys('L', 'L') " load file content only
@@ -173,6 +172,7 @@ func Test_FileChangedShell_edit_dialog()
au FileChangedShell Xchanged_r let g:reason = v:fcs_reason | let v:fcs_choice = 'ask'
augroup END
call assert_equal(&fileformat, 'unix')
+ sleep 10m " make the test less flaky in Nvim
call writefile(["line1\r", "line2\r"], 'Xchanged_r')
let g:reason = ''
call feedkeys('a', 'L') " load file content and options
@@ -191,8 +191,6 @@ func Test_FileChangedShell_edit_dialog()
endfunc
func Test_file_changed_dialog()
- " requires a UI to be active
- throw 'Skipped: use test/functional/legacy/filechanged_spec.lua'
CheckUnix
CheckNotGui
au! FileChangedShell
diff --git a/test/old/testdir/test_functions.vim b/test/old/testdir/test_functions.vim
index fdcd93a264..ea0e3790cc 100644
--- a/test/old/testdir/test_functions.vim
+++ b/test/old/testdir/test_functions.vim
@@ -2590,8 +2590,6 @@ endfunc
" Test confirm({msg} [, {choices} [, {default} [, {type}]]])
func Test_confirm()
- " requires a UI to be active
- throw 'Skipped: use test/functional/vimscript/input_spec.lua'
CheckUnix
CheckNotGui