From 3aa83dca4143e7e7095f325e8b35297f21ad545b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 9 May 2026 07:51:05 +0800 Subject: [PATCH] vim-patch:9.2.0454: tests: no test that "abbr" in customlist completion is shown Problem: No test that "abbr" in customlist completion is shown in pum. Solution: Add some "abbr" fields to the existing test (zeertzjq). closes: vim/vim#20165 https://github.com/vim/vim/commit/b207b5a2a38dd8f45417e69c2e659c4c05ad3c1e --- test/functional/ui/popupmenu_spec.lua | 84 +++++++++++++-------------- test/old/testdir/test_cmdline.vim | 4 +- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua index 5df51d502e..5b091af274 100644 --- a/test/functional/ui/popupmenu_spec.lua +++ b/test/functional/ui/popupmenu_spec.lua @@ -5277,8 +5277,8 @@ describe('builtin popupmenu', function() exec([[ func DictComp(A, L, P) return [ - \ {'word': 'apple', 'kind': 'f', 'menu': 'fruit', 'info': 'A red fruit'}, - \ {'word': 'banana', 'kind': 'f', 'menu': 'fruit', 'info': 'A yellow fruit'}, + \ {'word': 'apple', 'kind': 'f', 'menu': 'fruit', 'info': 'A red fruit', 'abbr': '🍎'}, + \ {'word': 'banana', 'kind': 'f', 'menu': 'fruit', 'info': 'A yellow fruit', 'abbr': '🍌'}, \ {'word': 'carrot', 'kind': 'v', 'menu': 'vegetable', 'info': 'An orange vegetable'}, \ 'plain', \ ] @@ -5302,8 +5302,8 @@ describe('builtin popupmenu', function() ## grid 4 {n:A red fruit}| ## grid 5 - {12: apple f fruit }| - {n: banana f fruit }| + {12: 🍎 f fruit }| + {n: 🍌 f fruit }| {n: carrot v vegetable }| {n: plain }| ]], @@ -5316,8 +5316,8 @@ describe('builtin popupmenu', function() screen:expect([[ | {1:~ }|*6 - {1:~ }{12: apple f fruit }{n:A red fruit}{1: }| - {1:~ }{n: banana f fruit }{1: }| + {1:~ }{12: 🍎 f fruit }{n:A red fruit}{1: }| + {1:~ }{n: 🍌 f fruit }{1: }| {1:~ }{n: carrot v vegetable }{1: }| {1:~ }{n: plain }{1: }| :DictCmd apple^ | @@ -5339,8 +5339,8 @@ describe('builtin popupmenu', function() ## grid 4 {n:A yellow fruit}| ## grid 5 - {n: apple f fruit }| - {12: banana f fruit }| + {n: 🍎 f fruit }| + {12: 🍌 f fruit }| {n: carrot v vegetable }| {n: plain }| ]], @@ -5353,8 +5353,8 @@ describe('builtin popupmenu', function() screen:expect([[ | {1:~ }|*6 - {1:~ }{n: apple f fruit A yellow fruit}{1: }| - {1:~ }{12: banana f fruit }{1: }| + {1:~ }{n: 🍎 f fruit A yellow fruit}{1: }| + {1:~ }{12: 🍌 f fruit }{1: }| {1:~ }{n: carrot v vegetable }{1: }| {1:~ }{n: plain }{1: }| :DictCmd banana^ | @@ -5376,8 +5376,8 @@ describe('builtin popupmenu', function() ## grid 4 {n:An orange vegetable}| ## grid 5 - {n: apple f fruit }| - {n: banana f fruit }| + {n: 🍎 f fruit }| + {n: 🍌 f fruit }| {12: carrot v vegetable }| {n: plain }| ]], @@ -5390,8 +5390,8 @@ describe('builtin popupmenu', function() screen:expect([[ | {1:~ }|*6 - {1:~ }{n: apple f fruit An orange vegetable}{1: }| - {1:~ }{n: banana f fruit }{1: }| + {1:~ }{n: 🍎 f fruit An orange vegetable}{1: }| + {1:~ }{n: 🍌 f fruit }{1: }| {1:~ }{12: carrot v vegetable }{1: }| {1:~ }{n: plain }{1: }| :DictCmd carrot^ | @@ -5413,8 +5413,8 @@ describe('builtin popupmenu', function() ## grid 4 (hidden) {n:An orange vegetable}| ## grid 5 - {n: apple f fruit }| - {n: banana f fruit }| + {n: 🍎 f fruit }| + {n: 🍌 f fruit }| {n: carrot v vegetable }| {12: plain }| ]], @@ -5426,8 +5426,8 @@ describe('builtin popupmenu', function() screen:expect([[ | {1:~ }|*6 - {1:~ }{n: apple f fruit }{1: }| - {1:~ }{n: banana f fruit }{1: }| + {1:~ }{n: 🍎 f fruit }{1: }| + {1:~ }{n: 🍌 f fruit }{1: }| {1:~ }{n: carrot v vegetable }{1: }| {1:~ }{12: plain }{1: }| :DictCmd plain^ | @@ -5449,8 +5449,8 @@ describe('builtin popupmenu', function() ## grid 4 (hidden) {n:An orange vegetable}| ## grid 5 - {n: apple f fruit }| - {n: banana f fruit }| + {n: 🍎 f fruit }| + {n: 🍌 f fruit }| {n: carrot v vegetable }| {n: plain }| ]], @@ -5462,8 +5462,8 @@ describe('builtin popupmenu', function() screen:expect([[ | {1:~ }|*6 - {1:~ }{n: apple f fruit }{1: }| - {1:~ }{n: banana f fruit }{1: }| + {1:~ }{n: 🍎 f fruit }{1: }| + {1:~ }{n: 🍌 f fruit }{1: }| {1:~ }{n: carrot v vegetable }{1: }| {1:~ }{n: plain }{1: }| :DictCmd ^ | @@ -5486,8 +5486,8 @@ describe('builtin popupmenu', function() ## grid 3 {5:-- Command-line completion (^V^N^P) }{6:match 1 of 4} | ## grid 5 - {12: apple f fruit }| - {n: banana f fruit }| + {12: 🍎 f fruit }| + {n: 🍌 f fruit }| {n: carrot v vegetable }| {n: plain }| ## grid 6 @@ -5501,8 +5501,8 @@ describe('builtin popupmenu', function() else screen:expect([[ DictCmd apple^ | - {1:~ }{12: apple f fruit }{n:A red fruit}{1: }| - {1:~ }{n: banana f fruit }{1: }| + {1:~ }{12: 🍎 f fruit }{n:A red fruit}{1: }| + {1:~ }{n: 🍌 f fruit }{1: }| {1:~ }{n: carrot v vegetable }{1: }| {1:~ }{n: plain }{1: }| {1:~ }|*6 @@ -5523,8 +5523,8 @@ describe('builtin popupmenu', function() ## grid 3 {5:-- Command-line completion (^V^N^P) }{6:match 2 of 4} | ## grid 5 - {n: apple f fruit }| - {12: banana f fruit }| + {n: 🍎 f fruit }| + {12: 🍌 f fruit }| {n: carrot v vegetable }| {n: plain }| ## grid 6 @@ -5538,8 +5538,8 @@ describe('builtin popupmenu', function() else screen:expect([[ DictCmd banana^ | - {1:~ }{n: apple f fruit A yellow fruit}{1: }| - {1:~ }{12: banana f fruit }{1: }| + {1:~ }{n: 🍎 f fruit A yellow fruit}{1: }| + {1:~ }{12: 🍌 f fruit }{1: }| {1:~ }{n: carrot v vegetable }{1: }| {1:~ }{n: plain }{1: }| {1:~ }|*6 @@ -5560,8 +5560,8 @@ describe('builtin popupmenu', function() ## grid 3 {5:-- Command-line completion (^V^N^P) }{6:match 3 of 4} | ## grid 5 - {n: apple f fruit }| - {n: banana f fruit }| + {n: 🍎 f fruit }| + {n: 🍌 f fruit }| {12: carrot v vegetable }| {n: plain }| ## grid 6 @@ -5575,8 +5575,8 @@ describe('builtin popupmenu', function() else screen:expect([[ DictCmd carrot^ | - {1:~ }{n: apple f fruit An orange vegetable}{1: }| - {1:~ }{n: banana f fruit }{1: }| + {1:~ }{n: 🍎 f fruit An orange vegetable}{1: }| + {1:~ }{n: 🍌 f fruit }{1: }| {1:~ }{12: carrot v vegetable }{1: }| {1:~ }{n: plain }{1: }| {1:~ }|*6 @@ -5597,8 +5597,8 @@ describe('builtin popupmenu', function() ## grid 3 {5:-- Command-line completion (^V^N^P) }{6:match 4 of 4} | ## grid 5 - {n: apple f fruit }| - {n: banana f fruit }| + {n: 🍎 f fruit }| + {n: 🍌 f fruit }| {n: carrot v vegetable }| {12: plain }| ## grid 6 (hidden) @@ -5611,8 +5611,8 @@ describe('builtin popupmenu', function() else screen:expect([[ DictCmd plain^ | - {1:~ }{n: apple f fruit }{1: }| - {1:~ }{n: banana f fruit }{1: }| + {1:~ }{n: 🍎 f fruit }{1: }| + {1:~ }{n: 🍌 f fruit }{1: }| {1:~ }{n: carrot v vegetable }{1: }| {1:~ }{12: plain }{1: }| {1:~ }|*6 @@ -5633,8 +5633,8 @@ describe('builtin popupmenu', function() ## grid 3 {5:-- Command-line completion (^V^N^P) }{19:Back at original} | ## grid 5 - {n: apple f fruit }| - {n: banana f fruit }| + {n: 🍎 f fruit }| + {n: 🍌 f fruit }| {n: carrot v vegetable }| {n: plain }| ## grid 6 (hidden) @@ -5647,8 +5647,8 @@ describe('builtin popupmenu', function() else screen:expect([[ DictCmd ^ | - {1:~ }{n: apple f fruit }{1: }| - {1:~ }{n: banana f fruit }{1: }| + {1:~ }{n: 🍎 f fruit }{1: }| + {1:~ }{n: 🍌 f fruit }{1: }| {1:~ }{n: carrot v vegetable }{1: }| {1:~ }{n: plain }{1: }| {1:~ }|*6 diff --git a/test/old/testdir/test_cmdline.vim b/test/old/testdir/test_cmdline.vim index 52743a8283..6f10b2469e 100644 --- a/test/old/testdir/test_cmdline.vim +++ b/test/old/testdir/test_cmdline.vim @@ -4630,8 +4630,8 @@ func Test_customlist_dict_completion_info_popup() let lines =<< trim END func DictComp(A, L, P) return [ - \ {'word': 'apple', 'kind': 'f', 'menu': 'fruit', 'info': 'A red fruit'}, - \ {'word': 'banana', 'kind': 'f', 'menu': 'fruit', 'info': 'A yellow fruit'}, + \ {'word': 'apple', 'kind': 'f', 'menu': 'fruit', 'info': 'A red fruit', 'abbr': '🍎'}, + \ {'word': 'banana', 'kind': 'f', 'menu': 'fruit', 'info': 'A yellow fruit', 'abbr': '🍌'}, \ {'word': 'carrot', 'kind': 'v', 'menu': 'vegetable', 'info': 'An orange vegetable'}, \ 'plain', \ ]