Mercurial > vim
comparison src/testdir/test_functions.vim @ 19306:e4a155edc9cb v8.2.0211
patch 8.2.0211: test for ANSI colors fails without an "ls" command
Commit: https://github.com/vim/vim/commit/94255df057afa0b7dde77612f3274d4440871bd1
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Feb 5 20:10:33 2020 +0100
patch 8.2.0211: test for ANSI colors fails without an "ls" command
Problem: Test for ANSI colors fails without an "ls" command.
Solution: Use "dir". (Ken Takata, closes https://github.com/vim/vim/issues/5582)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 05 Feb 2020 20:15:04 +0100 |
parents | 04e1a025ef00 |
children | bd9069d21c5d |
comparison
equal
deleted
inserted
replaced
19305:c2a908fc485c | 19306:e4a155edc9cb |
---|---|
1963 call setreg('a', range(3)) | 1963 call setreg('a', range(3)) |
1964 call assert_equal("0\n1\n2\n", getreg('a')) | 1964 call assert_equal("0\n1\n2\n", getreg('a')) |
1965 | 1965 |
1966 " settagstack() | 1966 " settagstack() |
1967 call settagstack(1, #{items : range(4)}) | 1967 call settagstack(1, #{items : range(4)}) |
1968 | 1968 |
1969 " sign_define() | 1969 " sign_define() |
1970 call assert_fails("call sign_define(range(5))", "E715:") | 1970 call assert_fails("call sign_define(range(5))", "E715:") |
1971 call assert_fails("call sign_placelist(range(5))", "E715:") | 1971 call assert_fails("call sign_placelist(range(5))", "E715:") |
1972 | 1972 |
1973 " sign_undefine() | 1973 " sign_undefine() |
1995 return range(10) | 1995 return range(10) |
1996 endfunc | 1996 endfunc |
1997 set tagfunc=TagFunc | 1997 set tagfunc=TagFunc |
1998 call assert_fails("call taglist('asdf')", 'E987:') | 1998 call assert_fails("call taglist('asdf')", 'E987:') |
1999 set tagfunc= | 1999 set tagfunc= |
2000 | 2000 |
2001 " term_start() | 2001 " term_start() |
2002 if has('terminal') && has('termguicolors') | 2002 if has('terminal') && has('termguicolors') |
2003 call assert_fails('call term_start(range(3, 4))', 'E474:') | 2003 call assert_fails('call term_start(range(3, 4))', 'E474:') |
2004 let g:terminal_ansi_colors = range(16) | 2004 let g:terminal_ansi_colors = range(16) |
2005 call assert_fails('call term_start("ls", #{term_finish: "close"})', 'E475:') | 2005 if has('win32') |
2006 let cmd = "cmd /c dir" | |
2007 else | |
2008 let cmd = "ls" | |
2009 endif | |
2010 call assert_fails('call term_start("' .. cmd .. '", #{term_finish: "close"})', 'E475:') | |
2006 unlet g:terminal_ansi_colors | 2011 unlet g:terminal_ansi_colors |
2007 endif | 2012 endif |
2008 | 2013 |
2009 " type() | 2014 " type() |
2010 call assert_equal(v:t_list, type(range(5))) | 2015 call assert_equal(v:t_list, type(range(5))) |