Mercurial > vim
changeset 22738:3aaaa65dcf6e v8.2.1917
patch 8.2.1917: no test for improved Man command
Commit: https://github.com/vim/vim/commit/159563b439d1b2a61d1003430b6c9f2a8509b5c5
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Oct 28 17:21:26 2020 +0100
patch 8.2.1917: no test for improved Man command
Problem: No test for improved Man command.
Solution: Test that shell arguments are properly escaped.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 28 Oct 2020 17:30:03 +0100 |
parents | 10bfaa3589f0 |
children | 1684af3ab2b1 |
files | src/testdir/test_man.vim src/version.c |
diffstat | 2 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_man.vim +++ b/src/testdir/test_man.vim @@ -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