]> granicus.if.org Git - vim/commitdiff
patch 8.2.1917: no test for improved Man command v8.2.1917
authorBram Moolenaar <Bram@vim.org>
Wed, 28 Oct 2020 16:21:26 +0000 (17:21 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 28 Oct 2020 16:21:26 +0000 (17:21 +0100)
Problem:    No test for improved Man command.
Solution:   Test that shell arguments are properly escaped.

src/testdir/test_man.vim
src/version.c

index d2f48e8b0e1b5f627196c7b4f78c1be6f90263af..f3af477441cbbcb607210e0e112de203c4df1c42 100644 (file)
@@ -132,4 +132,18 @@ func Test_keep_unnamed_register()
   %bw!
 endfunc
 
+" Check that underlying shell command arguments are escaped.
+func Test_Man_uses_shellescape()
+  Man `touch\ Xbar` `touch\ Xfoo`
+
+  redir => msg
+  1messages
+  redir END
+  call assert_match('no manual entry for "`touch Xfoo`"', msg)
+
+  call assert_false(filereadable('Xbar'))
+  call assert_false(filereadable('Xfoo'))
+endfunc
+
+
 " vim: shiftwidth=2 sts=2 expandtab
index f1beb91f224120a1cfa1a800bdda5c3725eb7791..32c42a07de63d323990e3627335a5362f8500c8e 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1917,
 /**/
     1916,
 /**/