patch 9.1.1437: MS-Windows: internal compile error in uc_list()
Problem: MS-Windows: internal compile error in uc_list() with VS 17.14
(ibear)
Solution: refactor code slightly (Mike Williams)
fixes: #17402
closes: #17464
Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_usercommands.vim b/src/testdir/test_usercommands.vim
index deea5df..d950308 100644
--- a/src/testdir/test_usercommands.vim
+++ b/src/testdir/test_usercommands.vim
@@ -965,5 +965,24 @@
call StopVimInTerminal(buf)
endfunc
+" Test for listing user commands.
+func Test_command_list_0()
+ " Check space padding of attribute and name in command list
+ set vbs&
+ command! ShortCommand echo "ShortCommand"
+ command! VeryMuchLongerCommand echo "VeryMuchLongerCommand"
+
+ redi @"> | com | redi END
+ pu
+
+ let bl = matchbufline(bufnr('%'), "^ ShortCommand 0", 1, '$')
+ call assert_false(bl == [])
+ let bl = matchbufline(bufnr('%'), "^ VeryMuchLongerCommand 0", 1, '$')
+ call assert_false(bl == [])
+
+ bwipe!
+ delcommand ShortCommand
+ delcommand VeryMuchLongerCommand
+endfunc
" vim: shiftwidth=2 sts=2 expandtab