diff src/testdir/test_expand_func.vim @ 28635:dfe18756f2ad v8.2.4841

patch 8.2.4841: empty string considered an error for expand() Commit: https://github.com/vim/vim/commit/a96edb736d4274fc4aea460800780e06e1510812 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 28 17:52:24 2022 +0100 patch 8.2.4841: empty string considered an error for expand() Problem: Empty string considered an error for expand() when 'verbose' is set. (Christian Brabandt) Solution: Do not give an error for an empty result. (closes #10307)
author Bram Moolenaar <Bram@vim.org>
date Thu, 28 Apr 2022 19:00:05 +0200
parents 195a617b405a
children 5cf6dee0f305
line wrap: on
line diff
--- a/src/testdir/test_expand_func.vim
+++ b/src/testdir/test_expand_func.vim
@@ -82,10 +82,14 @@ endfunc
 
 func Test_expand()
   new
-  call assert_equal("",  expand('%:S'))
+  call assert_equal("''", expand('%:S'))
   call assert_equal('3', '<slnum>'->expand())
   call assert_equal(['4'], expand('<slnum>', v:false, v:true))
   " Don't add any line above this, otherwise <slnum> will change.
+  call assert_equal("", expand('%'))
+  set verbose=1
+  call assert_equal("", expand('%'))
+  set verbose=0
   quit
 endfunc