]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0765: No test for patches 6.2.418 and 7.3.489 v9.1.0765
authorzeertzjq <zeertzjq@outlook.com>
Mon, 7 Oct 2024 19:05:06 +0000 (21:05 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 7 Oct 2024 19:05:06 +0000 (21:05 +0200)
Problem:  No test for patches 6.2.418 and 7.3.489
Solution: Add a test.  Fix some whitespace problems in test_mapping.vim.
          Document the behavior (zeertzjq).

closes: #15815

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/map.txt
src/testdir/test_cmdline.vim
src/testdir/test_mapping.vim
src/testdir/test_quickfix.vim
src/version.c

index ec944354e505e476438c8712f24834f3e0fcd8ff..2773140c5d49fb24ae375e87d16ffdd0e0310c75 100644 (file)
@@ -1,4 +1,4 @@
-*map.txt*       For Vim version 9.1.  Last change: 2024 Sep 26
+*map.txt*       For Vim version 9.1.  Last change: 2024 Oct 07
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -84,6 +84,8 @@ modes.
                        where the map command applies.  Disallow mapping of
                        {rhs}, to avoid nested and recursive mappings.  Often
                        used to redefine a command.
+                       Note: Keys in {rhs} also won't trigger abbreviation,
+                       with the exception of |i_CTRL-]| and |c_CTRL-]|.
                        Note: When <Plug> appears in the {rhs} this part is
                        always applied even if remapping is disallowed.
 
index 2b392c553297ea4893fa72cd846dce3394aa2f78..790efaadd045e98d8245976ba7be42c6f6313562 100644 (file)
@@ -3920,7 +3920,7 @@ func Test_ex_command_completion()
   set cpo-=*
 endfunc
 
-func Test_cd_bslsh_completion_windows()
+func Test_cd_bslash_completion_windows()
   CheckMSWindows
   let save_shellslash = &shellslash
   set noshellslash
index 064f8ac25b72c3af3c5838927255f51a4cb158c4..122793c4da132c9502738a51ac4d327337a188be 100644 (file)
@@ -7,40 +7,62 @@ source term_util.vim
 import './vim9.vim' as v9
 
 func Test_abbreviation()
+  new
   " abbreviation with 0x80 should work
   inoreab чкпр   vim
   call feedkeys("Goчкпр \<Esc>", "xt")
   call assert_equal('vim ', getline('$'))
   iunab чкпр
-  set nomodified
+  bwipe!
+endfunc
+
+func Test_abbreviation_with_noremap()
+  nnoremap <F2> :echo "cheese"
+  cabbr cheese xxx
+  call feedkeys(":echo \"cheese\"\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"echo "xxx"', @:)
+  call feedkeys("\<F2>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"echo "cheese"', @:)
+  nnoremap <F2> :echo "cheese<C-]>"
+  call feedkeys("\<F2>\<C-B>\"\<CR>", 'tx')
+  call assert_equal('"echo "xxx"', @:)
+  nunmap <F2>
+  cunabbr cheese
+
+  new
+  inoremap <buffer> ( <C-]>()
+  iabbr <buffer> fnu fun
+  call feedkeys("ifnu(", 'tx')
+  call assert_equal('fun()', getline(1))
+  bwipe!
 endfunc
 
 func Test_abclear()
-   abbrev foo foobar
-   iabbrev fooi foobari
-   cabbrev fooc foobarc
-   call assert_equal("\n\n"
-         \        .. "c  fooc          foobarc\n"
-         \        .. "i  fooi          foobari\n"
-         \        .. "!  foo           foobar", execute('abbrev'))
-
-   iabclear
-   call assert_equal("\n\n"
-         \        .. "c  fooc          foobarc\n"
-         \        .. "c  foo           foobar", execute('abbrev'))
-   abbrev foo foobar
-   iabbrev fooi foobari
-
-   cabclear
-   call assert_equal("\n\n"
-         \        .. "i  fooi          foobari\n"
-         \        .. "i  foo           foobar", execute('abbrev'))
-   abbrev foo foobar
-   cabbrev fooc foobarc
-
-   abclear
-   call assert_equal("\n\nNo abbreviation found", execute('abbrev'))
-   call assert_fails('%abclear', 'E481:')
+  abbrev foo foobar
+  iabbrev fooi foobari
+  cabbrev fooc foobarc
+  call assert_equal("\n\n"
+        \        .. "c  fooc          foobarc\n"
+        \        .. "i  fooi          foobari\n"
+        \        .. "!  foo           foobar", execute('abbrev'))
+
+  iabclear
+  call assert_equal("\n\n"
+        \        .. "c  fooc          foobarc\n"
+        \        .. "c  foo           foobar", execute('abbrev'))
+  abbrev foo foobar
+  iabbrev fooi foobari
+
+  cabclear
+  call assert_equal("\n\n"
+        \        .. "i  fooi          foobari\n"
+        \        .. "i  foo           foobar", execute('abbrev'))
+  abbrev foo foobar
+  cabbrev fooc foobarc
+
+  abclear
+  call assert_equal("\n\nNo abbreviation found", execute('abbrev'))
+  call assert_fails('%abclear', 'E481:')
 endfunc
 
 func Test_abclear_buffer()
@@ -161,7 +183,7 @@ func Test_map_langmap()
   imap a c
   call feedkeys("Go\<C-R>a\<Esc>", "xt")
   call assert_equal('bbbb', getline('$'))
+
   " langmap should not apply in Command-line mode
   set langmap=+{ nolangremap
   call feedkeys(":call append(line('$'), '+')\<CR>", "xt")
index 93db9407549dd9663eee3cd90d62954641b02a39..7a00135b82e88f22a576ba228621bcb05090f6f5 100644 (file)
@@ -6581,8 +6581,8 @@ func Test_cbuffer_range()
   call XbufferTests_range('l')
 endfunc
 
-" Test for displaying fname pass from setqflist when the name
-" are hard links to prevent seemly duplicate entries.
+" Test for displaying fname passed from setqflist() when the names include
+" hard links to prevent seemingly duplicate entries.
 func Xtest_hardlink_fname(cchar)
   call s:setup_commands(a:cchar)
   %bwipe
index c8559ef452d43e17146d37d577943541e0a8ed48..36af1c273af972397afe7e021885369d8313e2fd 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    765,
 /**/
     764,
 /**/