diff src/testdir/test_options.vim @ 14185:20468fb49f9b v8.1.0110

patch 8.1.0110: file name not displayed with ":file" commit https://github.com/vim/vim/commit/fc0896093c3b3e753859a5f929921933e7a2e6cd Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 24 16:53:35 2018 +0200 patch 8.1.0110: file name not displayed with ":file" Problem: File name not displayed with ":file" when 'F' is in 'shortmess'. Solution: Always display the file name when there is no argument (Christian Brabandt, closes #3070)
author Christian Brabandt <cb@256bit.org>
date Sun, 24 Jun 2018 17:00:06 +0200
parents fc03fabbedc5
children a28fb81c9ecf
line wrap: on
line diff
--- a/src/testdir/test_options.vim
+++ b/src/testdir/test_options.vim
@@ -400,3 +400,17 @@ func Test_copy_winopt()
     call assert_equal(4,&numberwidth)
     bw!
 endfunc
+
+func Test_shortmess_F()
+  new
+  call assert_match('\[No Name\]', execute('file'))
+  set shortmess+=F
+  call assert_match('\[No Name\]', execute('file'))
+  call assert_match('^\s*$', execute('file foo'))
+  call assert_match('foo', execute('file'))
+  set shortmess-=F
+  call assert_match('bar', execute('file bar'))
+  call assert_match('bar', execute('file'))
+  set shortmess&
+  bwipe
+endfunc