Mercurial > vim
diff src/testdir/test_functions.vim @ 25048:82ae6fcd86c8 v8.2.3061
patch 8.2.3061: testing the shell option is incomplete and spread out
Commit: https://github.com/vim/vim/commit/054794c20f6322bbd9482c4124041dc0a140c78e
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Sun Jun 27 12:07:49 2021 +0200
patch 8.2.3061: testing the shell option is incomplete and spread out
Problem: Testing the shell option is incomplete and spread out.
Solution: Move shell tests to one file and increase coverage. (Yegappan
Lakshmanan, closes #8464)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 27 Jun 2021 12:15:03 +0200 |
parents | 0c415a0f54f9 |
children | cd5e8df05a64 |
line wrap: on
line diff
--- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -1579,31 +1579,6 @@ func Test_redo_in_nested_functions() delfunc Apply endfunc -func Test_shellescape() - let save_shell = &shell - set shell=bash - call assert_equal("'text'", shellescape('text')) - call assert_equal("'te\"xt'", 'te"xt'->shellescape()) - call assert_equal("'te'\\''xt'", shellescape("te'xt")) - - call assert_equal("'te%xt'", shellescape("te%xt")) - call assert_equal("'te\\%xt'", shellescape("te%xt", 1)) - call assert_equal("'te#xt'", shellescape("te#xt")) - call assert_equal("'te\\#xt'", shellescape("te#xt", 1)) - call assert_equal("'te!xt'", shellescape("te!xt")) - call assert_equal("'te\\!xt'", shellescape("te!xt", 1)) - - call assert_equal("'te\nxt'", shellescape("te\nxt")) - call assert_equal("'te\\\nxt'", shellescape("te\nxt", 1)) - set shell=tcsh - call assert_equal("'te\\!xt'", shellescape("te!xt")) - call assert_equal("'te\\\\!xt'", shellescape("te!xt", 1)) - call assert_equal("'te\\\nxt'", shellescape("te\nxt")) - call assert_equal("'te\\\\\nxt'", shellescape("te\nxt", 1)) - - let &shell = save_shell -endfunc - func Test_trim() call assert_equal("Testing", trim(" \t\r\r\x0BTesting \t\n\r\n\t\x0B\x0B")) call assert_equal("Testing", " \t \r\r\n\n\x0BTesting \t\n\r\n\t\x0B\x0B"->trim())