From e13b4a21cac9d173885249034fe20fb209b157df Mon Sep 17 00:00:00 2001 From: KunMing Xie Date: Tue, 8 Aug 2017 09:32:47 +0800 Subject: vim-patch:8.0.0149 (#7127) Problem: ":earlier" and ":later" do not work after startup or reading the undo file. Solution: Use absolute time stamps instead of relative to the Vim start time. (Christian Brabandt, Pavel Juhas, closes vim/vim#1300, closes vim/vim#1254) https://github.com/vim/vim/commit/cbd4de44e8d08fba3c09eb40ad6e36e83faf020a --- src/nvim/testdir/test_undo.vim | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/nvim/testdir/test_undo.vim') diff --git a/src/nvim/testdir/test_undo.vim b/src/nvim/testdir/test_undo.vim index 9ff73fd870..171618f6f7 100644 --- a/src/nvim/testdir/test_undo.vim +++ b/src/nvim/testdir/test_undo.vim @@ -237,3 +237,31 @@ func Test_insert_expr() close! endfunc + +func Test_undofile_earlier() + throw 'skipped: Nvim does not support test_settime()' + + let t0 = localtime() - 43200 + call test_settime(t0) + new Xfile + call feedkeys("ione\", 'xt') + set ul=100 + call test_settime(t0 + 1) + call feedkeys("otwo\", 'xt') + set ul=100 + call test_settime(t0 + 2) + call feedkeys("othree\", 'xt') + set ul=100 + w + wundo Xundofile + bwipe! + " restore normal timestamps. + call test_settime(0) + new Xfile + rundo Xundofile + earlier 1d + call assert_equal('', getline(1)) + bwipe! + call delete('Xfile') + call delete('Xundofile') +endfunc -- cgit From ce09d4134b05cfdf6f71bcc93bb5cb9e48e4d9a0 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 21 Jan 2018 10:26:40 +0100 Subject: vim-patch:8.0.0433: beeps when running tests Problem: Quite a few beeps when running tests. Solution: Set 'belloff' for these tests. (Christian Brabandt) https://github.com/vim/vim/commit/c3c766ea8c35f5b2bd45fb3d74d0ae46b2d8c24f --- src/nvim/testdir/test_undo.vim | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/testdir/test_undo.vim') diff --git a/src/nvim/testdir/test_undo.vim b/src/nvim/testdir/test_undo.vim index 171618f6f7..0f9f6c3310 100644 --- a/src/nvim/testdir/test_undo.vim +++ b/src/nvim/testdir/test_undo.vim @@ -3,6 +3,7 @@ " undo-able pieces. Do that by setting 'undolevels'. " Also tests :earlier and :later. +set belloff=all func Test_undotree() exe "normal Aabc\" set ul=100 -- cgit From 2de447b60c04fcaad3d762851c512b2545ea6bad Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 2 Feb 2018 23:14:30 +0100 Subject: vim-patch:8.0.1221: still too many old style tests Problem: Still too many old style tests. Solution: Convert a few more tests to new style. (Yegappan Lakshmanan, closes vim/vim#2256) https://github.com/vim/vim/commit/15993ce9210e8b8d4bc11e1d640f6447b18d3e6c --- src/nvim/testdir/test_undo.vim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/nvim/testdir/test_undo.vim') diff --git a/src/nvim/testdir/test_undo.vim b/src/nvim/testdir/test_undo.vim index 0f9f6c3310..f7d1d64ea3 100644 --- a/src/nvim/testdir/test_undo.vim +++ b/src/nvim/testdir/test_undo.vim @@ -266,3 +266,19 @@ func Test_undofile_earlier() call delete('Xfile') call delete('Xundofile') endfunc + +" Test for undo working properly when executing commands from a register. +" Also test this in an empty buffer. +func Test_cmd_in_reg_undo() + enew! + let @a="Ox\jAy\kdd" + edit +/^$ test_undo.vim + normal @au + call assert_equal(0, &modified) + return + new + normal @au + call assert_equal(0, &modified) + only! + let @a='' +endfunc -- cgit From abed6a0b1a71e54b143e98678f4daa6818b02f8d Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 11 Feb 2018 13:46:35 +0100 Subject: vim-patch:8.0.1475: invalid memory access in read_redo() Problem: Invalid memory access in read_redo(). (gy741) Solution: Convert the replacement character back from a negative number to CR or NL. (hint by Dominique Pelle, closes vim/vim#2616) https://github.com/vim/vim/commit/f12519dec88251305793f1651f558d16506b4be2 --- src/nvim/testdir/test_undo.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/nvim/testdir/test_undo.vim') diff --git a/src/nvim/testdir/test_undo.vim b/src/nvim/testdir/test_undo.vim index f7d1d64ea3..3373258708 100644 --- a/src/nvim/testdir/test_undo.vim +++ b/src/nvim/testdir/test_undo.vim @@ -282,3 +282,10 @@ func Test_cmd_in_reg_undo() only! let @a='' endfunc + +func Test_redo_empty_line() + new + exe "norm\x16r\x160" + exe "norm." + bwipe! +endfunc -- cgit From 163b2b241b174f64e73eeacaaa733fd6ab037262 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 11 Feb 2018 15:44:26 +0100 Subject: vim-patch:8.0.1200: tests switch the bell off twice Problem: Tests switch the bell off twice. Solution: Don't set 'belloff' in individual tests. (Christian Brabandt) https://github.com/vim/vim/commit/67418d97b457d2e27fe342472d3c9fd342ffc47f --- src/nvim/testdir/test_undo.vim | 1 - 1 file changed, 1 deletion(-) (limited to 'src/nvim/testdir/test_undo.vim') diff --git a/src/nvim/testdir/test_undo.vim b/src/nvim/testdir/test_undo.vim index 3373258708..2bc6073d52 100644 --- a/src/nvim/testdir/test_undo.vim +++ b/src/nvim/testdir/test_undo.vim @@ -3,7 +3,6 @@ " undo-able pieces. Do that by setting 'undolevels'. " Also tests :earlier and :later. -set belloff=all func Test_undotree() exe "normal Aabc\" set ul=100 -- cgit