]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1174: tests: Test_complete_cmdline() may fail v9.1.1174
authorJim Zhou <jimzhouzzy@gmail.com>
Wed, 5 Mar 2025 19:25:11 +0000 (20:25 +0100)
committerChristian Brabandt <cb@256bit.org>
Wed, 5 Mar 2025 19:25:11 +0000 (20:25 +0100)
Problem:  tests: when the file 'TestCommand?Test' exists,
          'Test_complete_cmdline()' will fail when writing the file. And
          there's no related cleaning operation for this kind of file
          before the test run.
Solution: modify `write` to `write!` to override (Jim Zhou).

closes: #16799

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/test_ins_complete.vim
src/version.c

index a6859d569329f0f23d1d6c0d04313e7c7cc5a031..1bef953d4cb6a1bfac06dad24939c8a9c360ad1a 100644 (file)
@@ -1179,8 +1179,8 @@ func Test_complete_cmdline()
   call assert_equal('abcxyz(', getline(3))
   com! -buffer TestCommand1 echo 'TestCommand1'
   com! -buffer TestCommand2 echo 'TestCommand2'
-  write TestCommand1Test
-  write TestCommand2Test
+  write! TestCommand1Test
+  write! TestCommand2Test
   " Test repeating <CTRL-X> <CTRL-V> and switching to another CTRL-X mode
   exe "normal oT\<C-X>\<C-V>\<C-X>\<C-V>\<C-X>\<C-F>\<Esc>"
   call assert_equal('TestCommand2Test', getline(4))
index 8b42a790988d3c4c43cb18eab0181ec7f2737d86..a8c22669db1ad7fbc757b0e890b4d6ecfd9ed7e8 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1174,
 /**/
     1173,
 /**/