Mercurial > vim
comparison src/testdir/test_options.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 | 1186160ecf57 |
children | dd98794f7d8c |
comparison
equal
deleted
inserted
replaced
25047:0ea3ceb86a0d | 25048:82ae6fcd86c8 |
---|---|
828 call assert_fails('write XBuftype', 'E13:', 'with buftype=' .. val) | 828 call assert_fails('write XBuftype', 'E13:', 'with buftype=' .. val) |
829 endfor | 829 endfor |
830 | 830 |
831 call delete('XBuftype') | 831 call delete('XBuftype') |
832 bwipe! | 832 bwipe! |
833 endfunc | |
834 | |
835 " Test for the 'shell' option | |
836 func Test_shell() | |
837 CheckUnix | |
838 let save_shell = &shell | |
839 set shell= | |
840 let caught_e91 = 0 | |
841 try | |
842 shell | |
843 catch /E91:/ | |
844 let caught_e91 = 1 | |
845 endtry | |
846 call assert_equal(1, caught_e91) | |
847 let &shell = save_shell | |
848 endfunc | |
849 | |
850 " Test for the 'shellquote' option | |
851 func Test_shellquote() | |
852 CheckUnix | |
853 set shellquote=# | |
854 set verbose=20 | |
855 redir => v | |
856 silent! !echo Hello | |
857 redir END | |
858 set verbose& | |
859 set shellquote& | |
860 call assert_match(': "#echo Hello#"', v) | |
861 endfunc | 833 endfunc |
862 | 834 |
863 " Test for the 'rightleftcmd' option | 835 " Test for the 'rightleftcmd' option |
864 func Test_rightleftcmd() | 836 func Test_rightleftcmd() |
865 CheckFeature rightleft | 837 CheckFeature rightleft |