aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_arglist.vim18
-rw-r--r--src/nvim/testdir/test_command_count.vim2
-rw-r--r--src/nvim/testdir/test_eval_stuff.vim9
-rw-r--r--src/nvim/testdir/test_excmd.vim57
-rw-r--r--src/nvim/testdir/test_exec_while_if.vim8
-rw-r--r--src/nvim/testdir/test_execute_func.vim53
-rw-r--r--src/nvim/testdir/test_filetype.vim198
-rw-r--r--src/nvim/testdir/test_functions.vim19
-rw-r--r--src/nvim/testdir/test_increment.vim46
-rw-r--r--src/nvim/testdir/test_mapping.vim9
-rw-r--r--src/nvim/testdir/test_mksession.vim33
-rw-r--r--src/nvim/testdir/test_prompt_buffer.vim195
-rw-r--r--src/nvim/testdir/test_quickfix.vim10
-rw-r--r--src/nvim/testdir/test_registers.vim3
-rw-r--r--src/nvim/testdir/test_substitute.vim9
-rw-r--r--src/nvim/testdir/test_winbuf_close.vim14
16 files changed, 573 insertions, 110 deletions
diff --git a/src/nvim/testdir/test_arglist.vim b/src/nvim/testdir/test_arglist.vim
index a1ef8325ec..08e578a226 100644
--- a/src/nvim/testdir/test_arglist.vim
+++ b/src/nvim/testdir/test_arglist.vim
@@ -26,6 +26,8 @@ func Test_argidx()
endfunc
func Test_argadd()
+ call Reset_arglist()
+
%argdelete
argadd a b c
call assert_equal(0, argidx())
@@ -103,6 +105,11 @@ func Init_abc()
next
endfunc
+func Reset_arglist()
+ cd
+ args a | %argd
+endfunc
+
func Assert_argc(l)
call assert_equal(len(a:l), argc())
let i = 0
@@ -115,8 +122,7 @@ endfunc
" Test for [count]argument and [count]argdelete commands
" Ported from the test_argument_count.in test script
func Test_argument()
- " Clean the argument list
- arga a | %argd
+ call Reset_arglist()
let save_hidden = &hidden
set hidden
@@ -244,8 +250,7 @@ endfunc
" Test for 0argadd and 0argedit
" Ported from the test_argument_0count.in test script
func Test_zero_argadd()
- " Clean the argument list
- arga a | %argd
+ call Reset_arglist()
arga a b c d
2argu
@@ -272,10 +277,6 @@ func Test_zero_argadd()
call assert_equal('file with spaces', expand('%'))
endfunc
-func Reset_arglist()
- args a | %argd
-endfunc
-
" Test for argc()
func Test_argc()
call Reset_arglist()
@@ -408,6 +409,7 @@ endfunc
" Test for the :argdelete command
func Test_argdelete()
call Reset_arglist()
+
args aa a aaa b bb
argdelete a*
call assert_equal(['b', 'bb'], argv())
diff --git a/src/nvim/testdir/test_command_count.vim b/src/nvim/testdir/test_command_count.vim
index 55b230373f..36ff4cd1bb 100644
--- a/src/nvim/testdir/test_command_count.vim
+++ b/src/nvim/testdir/test_command_count.vim
@@ -103,6 +103,8 @@ endfunc
func Test_command_count_2()
silent! %argd
+ cd
+
arga a b c d
call assert_fails('5argu', 'E16:')
diff --git a/src/nvim/testdir/test_eval_stuff.vim b/src/nvim/testdir/test_eval_stuff.vim
index 73b57f302e..4870b9a60a 100644
--- a/src/nvim/testdir/test_eval_stuff.vim
+++ b/src/nvim/testdir/test_eval_stuff.vim
@@ -120,6 +120,15 @@ func Test_skip_after_throw()
endtry
endfunc
+func Test_number_max_min_size()
+ " This will fail on systems without 64 bit number support or when not
+ " configured correctly.
+ call assert_equal(64, v:numbersize)
+
+ call assert_true(v:numbermin < -9999999)
+ call assert_true(v:numbermax > 9999999)
+endfunc
+
func Test_curly_assignment()
let s:svar = 'svar'
let g:gvar = 'gvar'
diff --git a/src/nvim/testdir/test_excmd.vim b/src/nvim/testdir/test_excmd.vim
index d0d37e32f2..ed2bb2c06b 100644
--- a/src/nvim/testdir/test_excmd.vim
+++ b/src/nvim/testdir/test_excmd.vim
@@ -47,7 +47,7 @@ func Test_buffers_lastused()
endfor
call assert_equal(['bufb', 'bufa', 'bufc'], names)
- call assert_match('[0-2] seconds ago', bufs[1][1])
+ call assert_match('[0-2] seconds\= ago', bufs[1][1])
bwipeout bufa
bwipeout bufb
@@ -258,6 +258,61 @@ func Test_confirm_cmd_cancel()
call StopVimInTerminal(buf)
endfunc
+func Test_confirm_write_ro()
+ CheckNotGui
+ CheckRunVimInTerminal
+
+ call writefile(['foo'], 'Xconfirm_write_ro')
+ let lines =<< trim END
+ set nobackup ff=unix cmdheight=2
+ edit Xconfirm_write_ro
+ norm Abar
+ END
+ call writefile(lines, 'Xscript')
+ let buf = RunVimInTerminal('-S Xscript', {'rows': 20})
+
+ " Try to write with 'ro' option.
+ call term_sendkeys(buf, ":set ro | confirm w\n")
+ call WaitForAssert({-> assert_match("^'readonly' option is set for \"Xconfirm_write_ro\"\. *$",
+ \ term_getline(buf, 18))}, 1000)
+ call WaitForAssert({-> assert_match('^Do you wish to write anyway? *$',
+ \ term_getline(buf, 19))}, 1000)
+ call WaitForAssert({-> assert_match('^(Y)es, \[N\]o: *$', term_getline(buf, 20))}, 1000)
+ call term_sendkeys(buf, 'N')
+ call WaitForAssert({-> assert_match('^ *$', term_getline(buf, 19))}, 1000)
+ call WaitForAssert({-> assert_match('.* All$', term_getline(buf, 20))}, 1000)
+ call assert_equal(['foo'], readfile('Xconfirm_write_ro'))
+
+ call term_sendkeys(buf, ":confirm w\n")
+ call WaitForAssert({-> assert_match("^'readonly' option is set for \"Xconfirm_write_ro\"\. *$",
+ \ term_getline(buf, 18))}, 1000)
+ call WaitForAssert({-> assert_match('^Do you wish to write anyway? *$',
+ \ term_getline(buf, 19))}, 1000)
+ call WaitForAssert({-> assert_match('^(Y)es, \[N\]o: *$', term_getline(buf, 20))}, 1000)
+ call term_sendkeys(buf, 'Y')
+ call WaitForAssert({-> assert_match('^"Xconfirm_write_ro" 1L, 7B written$',
+ \ term_getline(buf, 19))}, 1000)
+ call assert_equal(['foobar'], readfile('Xconfirm_write_ro'))
+
+ " Try to write with read-only file permissions.
+ call setfperm('Xconfirm_write_ro', 'r--r--r--')
+ call term_sendkeys(buf, ":set noro | undo | confirm w\n")
+ call WaitForAssert({-> assert_match("^File permissions of \"Xconfirm_write_ro\" are read-only\. *$",
+ \ term_getline(buf, 17))}, 1000)
+ call WaitForAssert({-> assert_match('^It may still be possible to write it\. *$',
+ \ term_getline(buf, 18))}, 1000)
+ call WaitForAssert({-> assert_match('^Do you wish to try? *$', term_getline(buf, 19))}, 1000)
+ call WaitForAssert({-> assert_match('^(Y)es, \[N\]o: *$', term_getline(buf, 20))}, 1000)
+ call term_sendkeys(buf, 'Y')
+ call WaitForAssert({-> assert_match('^"Xconfirm_write_ro" 1L, 4B written$',
+ \ term_getline(buf, 19))}, 1000)
+ call assert_equal(['foo'], readfile('Xconfirm_write_ro'))
+
+ call StopVimInTerminal(buf)
+ call delete('Xscript')
+ call delete('Xconfirm_write_ro')
+endfunc
+
" Test for the :winsize command
func Test_winsize_cmd()
call assert_fails('winsize 1', 'E465:')
diff --git a/src/nvim/testdir/test_exec_while_if.vim b/src/nvim/testdir/test_exec_while_if.vim
index d6afabff45..3da2784d77 100644
--- a/src/nvim/testdir/test_exec_while_if.vim
+++ b/src/nvim/testdir/test_exec_while_if.vim
@@ -1,6 +1,6 @@
-" Test for :execute, :while and :if
+" Test for :execute, :while, :for and :if
-function Test_exec_while_if()
+func Test_exec_while_if()
new
let i = 0
@@ -50,4 +50,6 @@ function Test_exec_while_if()
\ "7x999999999888888887777777666666555554444333221",
\ "8",
\ "9x"], getline(1, 10))
-endfunction
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/nvim/testdir/test_execute_func.vim b/src/nvim/testdir/test_execute_func.vim
index eb84a6739d..15ba894dbe 100644
--- a/src/nvim/testdir/test_execute_func.vim
+++ b/src/nvim/testdir/test_execute_func.vim
@@ -1,5 +1,7 @@
" test execute()
+source view_util.vim
+
func NestedEval()
let nested = execute('echo "nested\nlines"')
echo 'got: "' . nested . '"'
@@ -82,3 +84,54 @@ func Test_execute_not_silent()
endfor
call assert_equal('xyz ', text2)
endfunc
+
+func Test_win_execute()
+ let thiswin = win_getid()
+ new
+ let otherwin = win_getid()
+ call setline(1, 'the new window')
+ call win_gotoid(thiswin)
+ let line = win_execute(otherwin, 'echo getline(1)')
+ call assert_match('the new window', line)
+ let line = win_execute(134343, 'echo getline(1)')
+ call assert_equal('', line)
+
+ if has('textprop')
+ let popupwin = popup_create('the popup win', {'line': 2, 'col': 3})
+ redraw
+ let line = win_execute(popupwin, 'echo getline(1)')
+ call assert_match('the popup win', line)
+
+ call popup_close(popupwin)
+ endif
+
+ call win_gotoid(otherwin)
+ bwipe!
+endfunc
+
+func Test_win_execute_update_ruler()
+ enew
+ call setline(1, range(500))
+ 20
+ split
+ let winid = win_getid()
+ set ruler
+ wincmd w
+ let height = winheight(winid)
+ redraw
+ call assert_match('20,1', Screenline(height + 1))
+ let line = win_execute(winid, 'call cursor(100, 1)')
+ redraw
+ call assert_match('100,1', Screenline(height + 1))
+
+ bwipe!
+endfunc
+
+func Test_win_execute_other_tab()
+ let thiswin = win_getid()
+ tabnew
+ call win_execute(thiswin, 'let xyz = 1')
+ call assert_equal(1, xyz)
+ tabclose
+ unlet xyz
+endfunc
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim
index 3cfc964f0a..056b953d0b 100644
--- a/src/nvim/testdir/test_filetype.vim
+++ b/src/nvim/testdir/test_filetype.vim
@@ -45,7 +45,7 @@ endfunc
" Filetypes detected just from matching the file name.
let s:filename_checks = {
\ '8th': ['file.8th'],
- \ 'a2ps': ['/etc/a2ps.cfg', '/etc/a2ps/file.cfg', 'a2psrc', '.a2psrc'],
+ \ 'a2ps': ['/etc/a2ps.cfg', '/etc/a2ps/file.cfg', 'a2psrc', '.a2psrc', 'any/etc/a2ps.cfg', 'any/etc/a2ps/file.cfg'],
\ 'a65': ['file.a65'],
\ 'aap': ['file.aap'],
\ 'abap': ['file.abap'],
@@ -55,23 +55,24 @@ let s:filename_checks = {
\ 'ada': ['file.adb', 'file.ads', 'file.ada', 'file.gpr'],
\ 'ahdl': ['file.tdf'],
\ 'aidl': ['file.aidl'],
- \ 'alsaconf': ['.asoundrc', '/usr/share/alsa/alsa.conf', '/etc/asound.conf'],
+ \ 'alsaconf': ['.asoundrc', '/usr/share/alsa/alsa.conf', '/etc/asound.conf', 'any/etc/asound.conf', 'any/usr/share/alsa/alsa.conf'],
\ 'aml': ['file.aml'],
\ 'ampl': ['file.run'],
\ 'ant': ['build.xml'],
- \ 'apache': ['.htaccess', '/etc/httpd/file.conf', '/etc/apache2/sites-2/file.com', '/etc/apache2/some.config', '/etc/apache2/conf.file/conf', '/etc/apache2/mods-some/file', '/etc/apache2/sites-some/file', '/etc/httpd/conf.d/file.config'],
- \ 'apachestyle': ['/etc/proftpd/file.config,/etc/proftpd/conf.file/file'],
+ \ 'apache': ['.htaccess', '/etc/httpd/file.conf', '/etc/apache2/sites-2/file.com', '/etc/apache2/some.config', '/etc/apache2/conf.file/conf', '/etc/apache2/mods-some/file', '/etc/apache2/sites-some/file', '/etc/httpd/conf.d/file.config', '/etc/apache2/conf.file/file', '/etc/apache2/file.conf', '/etc/apache2/file.conf-file', '/etc/apache2/mods-file/file', '/etc/apache2/sites-file/file', '/etc/apache2/sites-file/file.com', '/etc/httpd/conf.d/file.conf', '/etc/httpd/conf.d/file.conf-file', 'access.conf', 'access.conf-file', 'any/etc/apache2/conf.file/file', 'any/etc/apache2/file.conf', 'any/etc/apache2/file.conf-file', 'any/etc/apache2/mods-file/file', 'any/etc/apache2/sites-file/file', 'any/etc/apache2/sites-file/file.com', 'any/etc/httpd/conf.d/file.conf', 'any/etc/httpd/conf.d/file.conf-file', 'any/etc/httpd/file.conf', 'apache.conf', 'apache.conf-file', 'apache2.conf', 'apache2.conf-file', 'httpd.conf', 'httpd.conf-file', 'srm.conf', 'srm.conf-file'],
+ \ 'apachestyle': ['/etc/proftpd/file.config,/etc/proftpd/conf.file/file', '/etc/proftpd/conf.file/file', '/etc/proftpd/file.conf', '/etc/proftpd/file.conf-file', 'any/etc/proftpd/conf.file/file', 'any/etc/proftpd/file.conf', 'any/etc/proftpd/file.conf-file', 'proftpd.conf', 'proftpd.conf-file'],
\ 'applescript': ['file.scpt'],
- \ 'aptconf': ['apt.conf', '/.aptitude/config'],
- \ 'arch': ['.arch-inventory'],
+ \ 'aptconf': ['apt.conf', '/.aptitude/config', 'any/.aptitude/config'],
+ \ 'arch': ['.arch-inventory', '=tagging-method'],
\ 'arduino': ['file.ino', 'file.pde'],
\ 'art': ['file.art'],
\ 'asciidoc': ['file.asciidoc', 'file.adoc'],
\ 'asn': ['file.asn', 'file.asn1'],
+ \ 'asterisk': ['asterisk/file.conf', 'asterisk/file.conf-file', 'some-asterisk/file.conf', 'some-asterisk/file.conf-file'],
\ 'atlas': ['file.atl', 'file.as'],
\ 'autohotkey': ['file.ahk'],
\ 'autoit': ['file.au3'],
- \ 'automake': ['GNUmakefile.am'],
+ \ 'automake': ['GNUmakefile.am', 'makefile.am', 'Makefile.am'],
\ 'ave': ['file.ave'],
\ 'awk': ['file.awk', 'file.gawk'],
\ 'b': ['file.mch', 'file.ref', 'file.imp'],
@@ -80,23 +81,23 @@ let s:filename_checks = {
\ 'bdf': ['file.bdf'],
\ 'bib': ['file.bib'],
\ 'beancount': ['file.beancount'],
- \ 'bindzone': ['named.root'],
+ \ 'bindzone': ['named.root', '/bind/db.file', '/named/db.file', 'any/bind/db.file', 'any/named/db.file'],
\ 'blank': ['file.bl'],
- \ 'bsdl': ['file.bsd', 'file.bsdl'],
+ \ 'bsdl': ['file.bsd', 'file.bsdl', 'bsd', 'some-bsd'],
\ 'bst': ['file.bst'],
- \ 'bzr': ['bzr_log.any'],
- \ 'c': ['enlightenment/file.cfg', 'file.qc', 'file.c'],
+ \ 'bzr': ['bzr_log.any', 'bzr_log.file'],
+ \ 'c': ['enlightenment/file.cfg', 'file.qc', 'file.c', 'some-enlightenment/file.cfg'],
\ 'cabal': ['file.cabal'],
\ 'cabalconfig': ['cabal.config'],
\ 'cabalproject': ['cabal.project', 'cabal.project.local'],
- \ 'calendar': ['calendar'],
- \ 'catalog': ['catalog', 'sgml.catalogfile'],
+ \ 'calendar': ['calendar', '/.calendar/file', '/share/calendar/any/calendar.file', '/share/calendar/calendar.file', 'any/share/calendar/any/calendar.file', 'any/share/calendar/calendar.file'],
+ \ 'catalog': ['catalog', 'sgml.catalogfile', 'sgml.catalog', 'sgml.catalog-file'],
\ 'cdl': ['file.cdl'],
- \ 'cdrdaoconf': ['/etc/cdrdao.conf', '/etc/defaults/cdrdao', '/etc/default/cdrdao', '.cdrdao'],
+ \ 'cdrdaoconf': ['/etc/cdrdao.conf', '/etc/defaults/cdrdao', '/etc/default/cdrdao', '.cdrdao', 'any/etc/cdrdao.conf', 'any/etc/default/cdrdao', 'any/etc/defaults/cdrdao'],
\ 'cdrtoc': ['file.toc'],
\ 'cf': ['file.cfm', 'file.cfi', 'file.cfc'],
\ 'cfengine': ['cfengine.conf'],
- \ 'cfg': ['file.cfg', 'file.hgrc', 'filehgrc'],
+ \ 'cfg': ['file.cfg', 'file.hgrc', 'filehgrc', 'hgrc', 'some-hgrc'],
\ 'ch': ['file.chf'],
\ 'chaiscript': ['file.chai'],
\ 'chaskell': ['file.chs'],
@@ -106,15 +107,16 @@ let s:filename_checks = {
\ 'clean': ['file.dcl', 'file.icl'],
\ 'clojure': ['file.clj', 'file.cljs', 'file.cljx', 'file.cljc'],
\ 'cmake': ['CMakeLists.txt', 'file.cmake', 'file.cmake.in'],
- \ 'cmusrc': ['any/.cmus/autosave', 'any/.cmus/rc', 'any/.cmus/command-history', 'any/.cmus/file.theme', 'any/cmus/rc', 'any/cmus/file.theme'],
+ \ 'cmusrc': ['any/.cmus/autosave', 'any/.cmus/rc', 'any/.cmus/command-history', 'any/.cmus/file.theme', 'any/cmus/rc', 'any/cmus/file.theme', '/.cmus/autosave', '/.cmus/command-history', '/.cmus/file.theme', '/.cmus/rc', '/cmus/file.theme', '/cmus/rc'],
\ 'cobol': ['file.cbl', 'file.cob', 'file.lib'],
\ 'coco': ['file.atg'],
\ 'conaryrecipe': ['file.recipe'],
\ 'conf': ['auto.master'],
- \ 'config': ['configure.in', 'configure.ac', 'Pipfile'],
+ \ 'config': ['configure.in', 'configure.ac', 'Pipfile', '/etc/hostname.file'],
\ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi', 'file.mkxl', 'file.mklx'],
\ 'cpp': ['file.cxx', 'file.c++', 'file.hh', 'file.hxx', 'file.hpp', 'file.ipp', 'file.moc', 'file.tcc', 'file.inl', 'file.tlh'],
\ 'crm': ['file.crm'],
+ \ 'crontab': ['crontab', 'crontab.file', '/etc/cron.d/file', 'any/etc/cron.d/file'],
\ 'cs': ['file.cs'],
\ 'csc': ['file.csc'],
\ 'csdl': ['file.csdl'],
@@ -122,7 +124,7 @@ let s:filename_checks = {
\ 'css': ['file.css'],
\ 'cterm': ['file.con'],
\ 'cucumber': ['file.feature'],
- \ 'cuda': ['file.cu'],
+ \ 'cuda': ['file.cu', 'file.cuh'],
\ 'cupl': ['file.pld'],
\ 'cuplsim': ['file.si'],
\ 'cvs': ['cvs123'],
@@ -132,8 +134,9 @@ let s:filename_checks = {
\ 'datascript': ['file.ds'],
\ 'dcd': ['file.dcd'],
\ 'debchangelog': ['changelog.Debian', 'changelog.dch', 'NEWS.Debian', 'NEWS.dch', '/debian/changelog'],
- \ 'debcontrol': ['/debian/control'],
- \ 'debsources': ['/etc/apt/sources.list', '/etc/apt/sources.list.d/file.list'],
+ \ 'debcontrol': ['/debian/control', 'any/debian/control'],
+ \ 'debcopyright': ['/debian/copyright', 'any/debian/copyright'],
+ \ 'debsources': ['/etc/apt/sources.list', '/etc/apt/sources.list.d/file.list', 'any/etc/apt/sources.list', 'any/etc/apt/sources.list.d/file.list'],
\ 'def': ['file.def'],
\ 'denyhosts': ['denyhosts.conf'],
\ 'desc': ['file.desc'],
@@ -141,13 +144,13 @@ let s:filename_checks = {
\ 'dictconf': ['dict.conf', '.dictrc'],
\ 'dictdconf': ['dictd.conf'],
\ 'diff': ['file.diff', 'file.rej'],
- \ 'dircolors': ['.dir_colors', '.dircolors', '/etc/DIR_COLORS'],
- \ 'dnsmasq': ['/etc/dnsmasq.conf'],
- \ 'dockerfile': ['Dockerfile', 'file.Dockerfile'],
+ \ 'dircolors': ['.dir_colors', '.dircolors', '/etc/DIR_COLORS', 'any/etc/DIR_COLORS'],
+ \ 'dnsmasq': ['/etc/dnsmasq.conf', '/etc/dnsmasq.d/file', 'any/etc/dnsmasq.conf', 'any/etc/dnsmasq.d/file'],
+ \ 'dockerfile': ['Containerfile', 'Dockerfile', 'file.Dockerfile'],
\ 'dosbatch': ['file.bat', 'file.sys'],
- \ 'dosini': ['.editorconfig', '/etc/pacman.conf', '/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5'],
+ \ 'dosini': ['.editorconfig', '/etc/pacman.conf', '/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/pacman.conf', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap'],
\ 'dot': ['file.dot', 'file.gv'],
- \ 'dracula': ['file.drac', 'file.drc', 'filelvs', 'filelpe'],
+ \ 'dracula': ['file.drac', 'file.drc', 'filelvs', 'filelpe', 'drac.file', 'lpe', 'lvs', 'some-lpe', 'some-lvs'],
\ 'dsl': ['file.dsl'],
\ 'dtd': ['file.dtd'],
\ 'dts': ['file.dts', 'file.dtsi'],
@@ -163,10 +166,10 @@ let s:filename_checks = {
\ 'epuppet': ['file.epp'],
\ 'erlang': ['file.erl', 'file.hrl', 'file.yaws'],
\ 'eruby': ['file.erb', 'file.rhtml'],
- \ 'esmtprc': ['anyesmtprc'],
+ \ 'esmtprc': ['anyesmtprc', 'esmtprc', 'some-esmtprc'],
\ 'esqlc': ['file.ec', 'file.EC'],
\ 'esterel': ['file.strl'],
- \ 'eterm': ['anyEterm/file.cfg'],
+ \ 'eterm': ['anyEterm/file.cfg', 'Eterm/file.cfg', 'some-Eterm/file.cfg'],
\ 'exim': ['exim.conf'],
\ 'expect': ['file.exp'],
\ 'exports': ['exports'],
@@ -179,16 +182,18 @@ let s:filename_checks = {
\ 'focexec': ['file.fex', 'file.focexec'],
\ 'forth': ['file.fs', 'file.ft', 'file.fth'],
\ 'fortran': ['file.f', 'file.for', 'file.fortran', 'file.fpp', 'file.ftn', 'file.f77', 'file.f90', 'file.f95', 'file.f03', 'file.f08'],
+ \ 'fpcmake': ['file.fpc'],
\ 'framescript': ['file.fsl'],
\ 'freebasic': ['file.fb', 'file.bi'],
\ 'fstab': ['fstab', 'mtab'],
+ \ 'fvwm': ['/.fvwm/file', 'any/.fvwm/file'],
\ 'gdb': ['.gdbinit'],
\ 'gdmo': ['file.mo', 'file.gdmo'],
- \ 'gedcom': ['file.ged', 'lltxxxxx.txt'],
+ \ 'gedcom': ['file.ged', 'lltxxxxx.txt', '/tmp/lltmp', '/tmp/lltmp-file', 'any/tmp/lltmp', 'any/tmp/lltmp-file'],
\ 'gift': ['file.gift'],
\ 'gitcommit': ['COMMIT_EDITMSG', 'MERGE_MSG', 'TAG_EDITMSG'],
- \ 'gitconfig': ['file.git/config', '.gitconfig', '.gitmodules', 'file.git/modules//config', '/.config/git/config', '/etc/gitconfig'],
- \ 'gitolite': ['gitolite.conf'],
+ \ 'gitconfig': ['file.git/config', '.gitconfig', '.gitmodules', 'file.git/modules//config', '/.config/git/config', '/etc/gitconfig', '/etc/gitconfig.d/file', '/.gitconfig.d/file', 'any/.config/git/config', 'any/.gitconfig.d/file', 'some.git/config', 'some.git/modules/any/config'],
+ \ 'gitolite': ['gitolite.conf', '/gitolite-admin/conf/file', 'any/gitolite-admin/conf/file'],
\ 'gitrebase': ['git-rebase-todo'],
\ 'gitsendemail': ['.gitsendemail.msg.xxxxxx'],
\ 'gkrellmrc': ['gkrellmrc', 'gkrellmrc_x'],
@@ -196,14 +201,14 @@ let s:filename_checks = {
\ 'gnuplot': ['file.gpi'],
\ 'go': ['file.go'],
\ 'gp': ['file.gp', '.gprc'],
- \ 'gpg': ['/.gnupg/options', '/.gnupg/gpg.conf', '/usr/any/gnupg/options.skel'],
+ \ 'gpg': ['/.gnupg/options', '/.gnupg/gpg.conf', '/usr/any/gnupg/options.skel', 'any/.gnupg/gpg.conf', 'any/.gnupg/options', 'any/usr/any/gnupg/options.skel'],
\ 'grads': ['file.gs'],
\ 'gretl': ['file.gretl'],
\ 'groovy': ['file.gradle', 'file.groovy'],
- \ 'group': ['any/etc/group', 'any/etc/group-', 'any/etc/group.edit', 'any/etc/gshadow', 'any/etc/gshadow-', 'any/etc/gshadow.edit', 'any/var/backups/group.bak', 'any/var/backups/gshadow.bak'],
- \ 'grub': ['/boot/grub/menu.lst', '/boot/grub/grub.conf', '/etc/grub.conf'],
+ \ 'group': ['any/etc/group', 'any/etc/group-', 'any/etc/group.edit', 'any/etc/gshadow', 'any/etc/gshadow-', 'any/etc/gshadow.edit', 'any/var/backups/group.bak', 'any/var/backups/gshadow.bak', '/etc/group', '/etc/group-', '/etc/group.edit', '/etc/gshadow', '/etc/gshadow-', '/etc/gshadow.edit', '/var/backups/group.bak', '/var/backups/gshadow.bak'],
+ \ 'grub': ['/boot/grub/menu.lst', '/boot/grub/grub.conf', '/etc/grub.conf', 'any/boot/grub/grub.conf', 'any/boot/grub/menu.lst', 'any/etc/grub.conf'],
\ 'gsp': ['file.gsp'],
- \ 'gtkrc': ['.gtkrc', 'gtkrc'],
+ \ 'gtkrc': ['.gtkrc', 'gtkrc', '.gtkrc-file', 'gtkrc-file'],
\ 'haml': ['file.haml'],
\ 'hamster': ['file.hsm'],
\ 'haskell': ['file.hs', 'file.hsc', 'file.hs-boot'],
@@ -215,24 +220,35 @@ let s:filename_checks = {
\ 'hgcommit': ['hg-editor-file.txt'],
\ 'hog': ['file.hog', 'snort.conf', 'vision.conf'],
\ 'hollywood': ['file.hws'],
- \ 'hostconf': ['/etc/host.conf'],
- \ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny'],
+ \ 'hostconf': ['/etc/host.conf', 'any/etc/host.conf'],
+ \ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny', 'any/etc/hosts.allow', 'any/etc/hosts.deny'],
+ \ 'logcheck': ['/etc/logcheck/file.d-some/file', '/etc/logcheck/file.d/file', 'any/etc/logcheck/file.d-some/file', 'any/etc/logcheck/file.d/file'],
+ \ 'modula3': ['file.m3', 'file.mg', 'file.i3', 'file.ig'],
+ \ 'natural': ['file.NSA', 'file.NSC', 'file.NSG', 'file.NSL', 'file.NSM', 'file.NSN', 'file.NSP', 'file.NSS'],
+ \ 'neomuttrc': ['Neomuttrc', '.neomuttrc', '.neomuttrc-file', '/.neomutt/neomuttrc', '/.neomutt/neomuttrc-file', 'Neomuttrc', 'Neomuttrc-file', 'any/.neomutt/neomuttrc', 'any/.neomutt/neomuttrc-file', 'neomuttrc', 'neomuttrc-file'],
+ \ 'opl': ['file.OPL', 'file.OPl', 'file.OpL', 'file.Opl', 'file.oPL', 'file.oPl', 'file.opL', 'file.opl'],
+ \ 'pcmk': ['file.pcmk'],
+ \ 'r': ['file.r'],
+ \ 'rhelp': ['file.rd'],
+ \ 'rmd': ['file.rmd', 'file.smd'],
+ \ 'rnoweb': ['file.rnw', 'file.snw'],
+ \ 'rrst': ['file.rrst', 'file.srst'],
\ 'template': ['file.tmpl'],
\ 'htmlm4': ['file.html.m4'],
\ 'httest': ['file.htt', 'file.htb'],
\ 'ibasic': ['file.iba', 'file.ibi'],
- \ 'icemenu': ['/.icewm/menu'],
+ \ 'icemenu': ['/.icewm/menu', 'any/.icewm/menu'],
\ 'icon': ['file.icn'],
\ 'indent': ['.indent.pro', 'indentrc'],
\ 'inform': ['file.inf', 'file.INF'],
- \ 'initng': ['/etc/initng/any/file.i', 'file.ii'],
+ \ 'initng': ['/etc/initng/any/file.i', 'file.ii', 'any/etc/initng/any/file.i'],
\ 'inittab': ['inittab'],
\ 'ipfilter': ['ipf.conf', 'ipf6.conf', 'ipf.rules'],
\ 'iss': ['file.iss'],
\ 'ist': ['file.ist', 'file.mst'],
\ 'j': ['file.ijs'],
\ 'jal': ['file.jal', 'file.JAL'],
- \ 'jam': ['file.jpl', 'file.jpr'],
+ \ 'jam': ['file.jpl', 'file.jpr', 'JAM-file.file', 'JAM.file', 'Prl-file.file', 'Prl.file'],
\ 'java': ['file.java', 'file.jav'],
\ 'javacc': ['file.jj', 'file.jjt'],
\ 'javascript': ['file.js', 'file.javascript', 'file.es', 'file.mjs', 'file.cjs'],
@@ -240,10 +256,10 @@ let s:filename_checks = {
\ 'jess': ['file.clp'],
\ 'jgraph': ['file.jgr'],
\ 'jovial': ['file.jov', 'file.j73', 'file.jovial'],
- \ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx'],
+ \ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file'],
\ 'json': ['file.json', 'file.jsonp', 'file.webmanifest', 'Pipfile.lock'],
\ 'jsp': ['file.jsp'],
- \ 'kconfig': ['Kconfig', 'Kconfig.debug'],
+ \ 'kconfig': ['Kconfig', 'Kconfig.debug', 'Kconfig.file'],
\ 'kivy': ['file.kv'],
\ 'kix': ['file.kix'],
\ 'kotlin': ['file.kt', 'file.ktm', 'file.kts'],
@@ -255,18 +271,18 @@ let s:filename_checks = {
\ 'ldif': ['file.ldif'],
\ 'less': ['file.less'],
\ 'lex': ['file.lex', 'file.l', 'file.lxx', 'file.l++'],
- \ 'lftp': ['lftp.conf', '.lftprc', 'anylftp/rc'],
+ \ 'lftp': ['lftp.conf', '.lftprc', 'anylftp/rc', 'lftp/rc', 'some-lftp/rc'],
\ 'lhaskell': ['file.lhs'],
- \ 'libao': ['/etc/libao.conf', '/.libao'],
+ \ 'libao': ['/etc/libao.conf', '/.libao', 'any/.libao', 'any/etc/libao.conf'],
\ 'lifelines': ['file.ll'],
- \ 'lilo': ['lilo.conf'],
- \ 'limits': ['/etc/limits', '/etc/anylimits.conf', '/etc/anylimits.d/file.conf'],
+ \ 'lilo': ['lilo.conf', 'lilo.conf-file'],
+ \ 'limits': ['/etc/limits', '/etc/anylimits.conf', '/etc/anylimits.d/file.conf', '/etc/limits.conf', '/etc/limits.d/file.conf', '/etc/some-limits.conf', '/etc/some-limits.d/file.conf', 'any/etc/limits', 'any/etc/limits.conf', 'any/etc/limits.d/file.conf', 'any/etc/some-limits.conf', 'any/etc/some-limits.d/file.conf'],
\ 'liquid': ['file.liquid'],
\ 'lisp': ['file.lsp', 'file.lisp', 'file.el', 'file.cl', '.emacs', '.sawfishrc', 'sbclrc', '.sbclrc'],
\ 'lite': ['file.lite', 'file.lt'],
- \ 'litestep': ['/LiteStep/any/file.rc'],
- \ 'loginaccess': ['/etc/login.access'],
- \ 'logindefs': ['/etc/login.defs'],
+ \ 'litestep': ['/LiteStep/any/file.rc', 'any/LiteStep/any/file.rc'],
+ \ 'loginaccess': ['/etc/login.access', 'any/etc/login.access'],
+ \ 'logindefs': ['/etc/login.defs', 'any/etc/login.defs'],
\ 'logtalk': ['file.lgt'],
\ 'lotos': ['file.lot', 'file.lotos'],
\ 'lout': ['file.lou', 'file.lout'],
@@ -278,12 +294,12 @@ let s:filename_checks = {
\ 'm3build': ['m3makefile', 'm3overrides'],
\ 'm3quake': ['file.quake', 'cm3.cfg'],
\ 'm4': ['file.at'],
- \ 'mail': ['snd.123', '.letter', '.letter.123', '.followup', '.article', '.article.123', 'pico.123', 'mutt-xx-xxx', 'muttng-xx-xxx', 'ae123.txt', 'file.eml'],
- \ 'mailaliases': ['/etc/mail/aliases', '/etc/aliases'],
+ \ 'mail': ['snd.123', '.letter', '.letter.123', '.followup', '.article', '.article.123', 'pico.123', 'mutt-xx-xxx', 'muttng-xx-xxx', 'ae123.txt', 'file.eml', 'reportbug-file'],
+ \ 'mailaliases': ['/etc/mail/aliases', '/etc/aliases', 'any/etc/aliases', 'any/etc/mail/aliases'],
\ 'mailcap': ['.mailcap', 'mailcap'],
- \ 'make': ['file.mk', 'file.mak', 'file.dsp'],
+ \ 'make': ['file.mk', 'file.mak', 'file.dsp', 'makefile', 'Makefile', 'makefile-file', 'Makefile-file', 'some-makefile', 'some-Makefile'],
\ 'mallard': ['file.page'],
- \ 'manconf': ['/etc/man.conf', 'man.config'],
+ \ 'manconf': ['/etc/man.conf', 'man.config', 'any/etc/man.conf'],
\ 'map': ['file.map'],
\ 'maple': ['file.mv', 'file.mpl', 'file.mws'],
\ 'markdown': ['file.markdown', 'file.mdown', 'file.mkd', 'file.mkdn', 'file.mdwn', 'file.md'],
@@ -305,27 +321,27 @@ let s:filename_checks = {
\ 'mix': ['file.mix', 'file.mixal'],
\ 'mma': ['file.nb'],
\ 'mmp': ['file.mmp'],
- \ 'modconf': ['/etc/modules.conf', '/etc/modules', '/etc/conf.modules'],
+ \ 'modconf': ['/etc/modules.conf', '/etc/modules', '/etc/conf.modules', '/etc/modprobe.file', 'any/etc/conf.modules', 'any/etc/modprobe.file', 'any/etc/modules', 'any/etc/modules.conf'],
\ 'modula2': ['file.m2', 'file.mi'],
\ 'monk': ['file.isc', 'file.monk', 'file.ssc', 'file.tsc'],
\ 'moo': ['file.moo'],
\ 'mp': ['file.mp'],
- \ 'mplayerconf': ['mplayer.conf', '/.mplayer/config'],
+ \ 'mplayerconf': ['mplayer.conf', '/.mplayer/config', 'any/.mplayer/config'],
\ 'mrxvtrc': ['mrxvtrc', '.mrxvtrc'],
\ 'msidl': ['file.odl', 'file.mof'],
\ 'msql': ['file.msql'],
\ 'mupad': ['file.mu'],
\ 'mush': ['file.mush'],
- \ 'muttrc': ['Muttngrc', 'Muttrc'],
+ \ 'muttrc': ['Muttngrc', 'Muttrc', '.muttngrc', '.muttngrc-file', '.muttrc', '.muttrc-file', '/.mutt/muttngrc', '/.mutt/muttngrc-file', '/.mutt/muttrc', '/.mutt/muttrc-file', '/.muttng/muttngrc', '/.muttng/muttngrc-file', '/.muttng/muttrc', '/.muttng/muttrc-file', '/etc/Muttrc.d/file', 'Muttngrc-file', 'Muttrc-file', 'any/.mutt/muttngrc', 'any/.mutt/muttngrc-file', 'any/.mutt/muttrc', 'any/.mutt/muttrc-file', 'any/.muttng/muttngrc', 'any/.muttng/muttngrc-file', 'any/.muttng/muttrc', 'any/.muttng/muttrc-file', 'any/etc/Muttrc.d/file', 'muttngrc', 'muttngrc-file', 'muttrc', 'muttrc-file'],
\ 'mysql': ['file.mysql'],
\ 'n1ql': ['file.n1ql', 'file.nql'],
- \ 'named': ['namedfile.conf', 'rndcfile.conf'],
- \ 'nanorc': ['/etc/nanorc', 'file.nanorc'],
+ \ 'named': ['namedfile.conf', 'rndcfile.conf', 'named-file.conf', 'named.conf', 'rndc-file.conf', 'rndc-file.key', 'rndc.conf', 'rndc.key'],
+ \ 'nanorc': ['/etc/nanorc', 'file.nanorc', 'any/etc/nanorc'],
\ 'ncf': ['file.ncf'],
\ 'netrc': ['.netrc'],
\ 'ninja': ['file.ninja'],
\ 'nqc': ['file.nqc'],
- \ 'nroff': ['file.tr', 'file.nr', 'file.roff', 'file.tmac', 'file.mom'],
+ \ 'nroff': ['file.tr', 'file.nr', 'file.roff', 'file.tmac', 'file.mom', 'tmac.file'],
\ 'nsis': ['file.nsi', 'file.nsh'],
\ 'obj': ['file.obj'],
\ 'ocaml': ['file.ml', 'file.mli', 'file.mll', 'file.mly', '.ocamlinit', 'file.mlt', 'file.mlp', 'file.mlip', 'file.mli.cppo', 'file.ml.cppo'],
@@ -334,16 +350,15 @@ let s:filename_checks = {
\ 'opam': ['opam', 'file.opam', 'file.opam.template'],
\ 'openroad': ['file.or'],
\ 'ora': ['file.ora'],
- \ 'pamconf': ['/etc/pam.conf'],
- \ 'pamenv': ['/etc/security/pam_env.conf', '/home/user/.pam_environment'],
+ \ 'pamconf': ['/etc/pam.conf', '/etc/pam.d/file', 'any/etc/pam.conf', 'any/etc/pam.d/file'],
+ \ 'pamenv': ['/etc/security/pam_env.conf', '/home/user/.pam_environment', '.pam_environment', 'pam_env.conf'],
\ 'papp': ['file.papp', 'file.pxml', 'file.pxsl'],
\ 'pascal': ['file.pas', 'file.dpr', 'file.lpr'],
- \ 'passwd': ['any/etc/passwd', 'any/etc/passwd-', 'any/etc/passwd.edit', 'any/etc/shadow', 'any/etc/shadow-', 'any/etc/shadow.edit', 'any/var/backups/passwd.bak', 'any/var/backups/shadow.bak'],
+ \ 'passwd': ['any/etc/passwd', 'any/etc/passwd-', 'any/etc/passwd.edit', 'any/etc/shadow', 'any/etc/shadow-', 'any/etc/shadow.edit', 'any/var/backups/passwd.bak', 'any/var/backups/shadow.bak', '/etc/passwd', '/etc/passwd-', '/etc/passwd.edit', '/etc/shadow', '/etc/shadow-', '/etc/shadow.edit', '/var/backups/passwd.bak', '/var/backups/shadow.bak'],
\ 'pbtxt': ['file.pbtxt'],
\ 'pccts': ['file.g'],
\ 'pdf': ['file.pdf'],
\ 'perl': ['file.plx', 'file.al', 'file.psgi', 'gitolite.rc', '.gitolite.rc', 'example.gitolite.rc'],
- \ 'perl6': ['file.p6', 'file.pm6', 'file.pl6', 'file.raku', 'file.rakumod'],
\ 'pf': ['pf.conf'],
\ 'pfmain': ['main.cf'],
\ 'php': ['file.php', 'file.php9', 'file.phtml', 'file.ctp'],
@@ -352,14 +367,13 @@ let s:filename_checks = {
\ 'cmod': ['file.cmod'],
\ 'pilrc': ['file.rcp'],
\ 'pine': ['.pinerc', 'pinerc', '.pinercex', 'pinercex'],
- \ 'pinfo': ['/etc/pinforc', '/.pinforc'],
+ \ 'pinfo': ['/etc/pinforc', '/.pinforc', 'any/.pinforc', 'any/etc/pinforc'],
\ 'pli': ['file.pli', 'file.pl1'],
\ 'plm': ['file.plm', 'file.p36', 'file.pac'],
\ 'plp': ['file.plp'],
\ 'plsql': ['file.pls', 'file.plsql'],
\ 'po': ['file.po', 'file.pot'],
\ 'pod': ['file.pod'],
- \ 'pod6': ['file.pod6'],
\ 'poke': ['file.pk'],
\ 'postscr': ['file.ps', 'file.pfa', 'file.afm', 'file.eps', 'file.epsf', 'file.epsi', 'file.ai'],
\ 'pov': ['file.pov'],
@@ -372,7 +386,7 @@ let s:filename_checks = {
\ 'prolog': ['file.pdb'],
\ 'promela': ['file.pml'],
\ 'proto': ['file.proto'],
- \ 'protocols': ['/etc/protocols'],
+ \ 'protocols': ['/etc/protocols', 'any/etc/protocols'],
\ 'ps1': ['file.ps1', 'file.psd1', 'file.psm1', 'file.pssc'],
\ 'ps1xml': ['file.ps1xml'],
\ 'psf': ['file.psf'],
@@ -380,14 +394,15 @@ let s:filename_checks = {
\ 'puppet': ['file.pp'],
\ 'pyrex': ['file.pyx', 'file.pxd'],
\ 'python': ['file.py', 'file.pyw', '.pythonstartup', '.pythonrc', 'file.ptl', 'file.pyi', 'SConstruct'],
- \ 'quake': ['anybaseq2/file.cfg', 'anyid1/file.cfg', 'quake3/file.cfg'],
+ \ 'quake': ['anybaseq2/file.cfg', 'anyid1/file.cfg', 'quake3/file.cfg', 'baseq2/file.cfg', 'id1/file.cfg', 'quake1/file.cfg', 'some-baseq2/file.cfg', 'some-id1/file.cfg', 'some-quake1/file.cfg'],
\ 'radiance': ['file.rad', 'file.mat'],
+ \ 'raku': ['file.pm6', 'file.p6', 'file.t6', 'file.pod6', 'file.raku', 'file.rakumod', 'file.rakudoc', 'file.rakutest'],
\ 'ratpoison': ['.ratpoisonrc', 'ratpoisonrc'],
\ 'rbs': ['file.rbs'],
\ 'rc': ['file.rc', 'file.rch'],
\ 'rcs': ['file,v'],
\ 'readline': ['.inputrc', 'inputrc'],
- \ 'remind': ['.reminders', 'file.remind', 'file.rem'],
+ \ 'remind': ['.reminders', 'file.remind', 'file.rem', '.reminders-file'],
\ 'rego': ['file.rego'],
\ 'resolv': ['resolv.conf'],
\ 'reva': ['file.frt'],
@@ -417,9 +432,9 @@ let s:filename_checks = {
\ 'sdc': ['file.sdc'],
\ 'sdl': ['file.sdl', 'file.pr'],
\ 'sed': ['file.sed'],
- \ 'sensors': ['/etc/sensors.conf', '/etc/sensors3.conf'],
- \ 'services': ['/etc/services'],
- \ 'setserial': ['/etc/serial.conf'],
+ \ 'sensors': ['/etc/sensors.conf', '/etc/sensors3.conf', 'any/etc/sensors.conf', 'any/etc/sensors3.conf'],
+ \ 'services': ['/etc/services', 'any/etc/services'],
+ \ 'setserial': ['/etc/serial.conf', 'any/etc/serial.conf'],
\ 'sh': ['.bashrc', 'file.bash', '/usr/share/doc/bash-completion/filter.sh','/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf'],
\ 'sieve': ['file.siv', 'file.sieve'],
\ 'simula': ['file.sim'],
@@ -428,9 +443,9 @@ let s:filename_checks = {
\ 'skill': ['file.il', 'file.ils', 'file.cdf'],
\ 'slang': ['file.sl'],
\ 'slice': ['file.ice'],
- \ 'slpconf': ['/etc/slp.conf'],
- \ 'slpreg': ['/etc/slp.reg'],
- \ 'slpspi': ['/etc/slp.spi'],
+ \ 'slpconf': ['/etc/slp.conf', 'any/etc/slp.conf'],
+ \ 'slpreg': ['/etc/slp.reg', 'any/etc/slp.reg'],
+ \ 'slpspi': ['/etc/slp.spi', 'any/etc/slp.spi'],
\ 'slrnrc': ['.slrnrc'],
\ 'slrnsc': ['file.score'],
\ 'sm': ['sendmail.cf'],
@@ -450,19 +465,19 @@ let s:filename_checks = {
\ 'sqr': ['file.sqr', 'file.sqi'],
\ 'squid': ['squid.conf'],
\ 'srec': ['file.s19', 'file.s28', 'file.s37', 'file.mot', 'file.srec'],
- \ 'sshconfig': ['ssh_config', '/.ssh/config', '/etc/ssh/ssh_config.d/file.conf', 'any/etc/ssh/ssh_config.d/file.conf'],
+ \ 'sshconfig': ['ssh_config', '/.ssh/config', '/etc/ssh/ssh_config.d/file.conf', 'any/etc/ssh/ssh_config.d/file.conf', 'any/.ssh/config'],
\ 'sshdconfig': ['sshd_config', '/etc/ssh/sshd_config.d/file.conf', 'any/etc/ssh/sshd_config.d/file.conf'],
\ 'st': ['file.st'],
\ 'stata': ['file.ado', 'file.do', 'file.imata', 'file.mata'],
\ 'stp': ['file.stp'],
- \ 'sudoers': ['any/etc/sudoers', 'sudoers.tmp'],
+ \ 'sudoers': ['any/etc/sudoers', 'sudoers.tmp', '/etc/sudoers'],
\ 'svg': ['file.svg'],
- \ 'svn': ['svn-commitfile.tmp'],
+ \ 'svn': ['svn-commitfile.tmp', 'svn-commit-file.tmp', 'svn-commit.tmp'],
\ 'swift': ['file.swift'],
\ 'swiftgyb': ['file.swift.gyb'],
\ 'sil': ['file.sil'],
- \ 'sysctl': ['/etc/sysctl.conf', '/etc/sysctl.d/file.conf'],
- \ 'systemd': ['any/systemd/file.automount', 'any/systemd/file.dnssd', 'any/systemd/file.link', 'any/systemd/file.mount', 'any/systemd/file.netdev', 'any/systemd/file.network', 'any/systemd/file.nspawn', 'any/systemd/file.path', 'any/systemd/file.service', 'any/systemd/file.slice', 'any/systemd/file.socket', 'any/systemd/file.swap', 'any/systemd/file.target', 'any/systemd/file.timer', '/etc/systemd/some.conf.d/file.conf', '/etc/systemd/system/some.d/file.conf', '/etc/systemd/system/some.d/.#file', '/etc/systemd/system/.#otherfile', '/home/user/.config/systemd/user/some.d/mine.conf', '/home/user/.config/systemd/user/some.d/.#file', '/home/user/.config/systemd/user/.#otherfile'],
+ \ 'sysctl': ['/etc/sysctl.conf', '/etc/sysctl.d/file.conf', 'any/etc/sysctl.conf', 'any/etc/sysctl.d/file.conf'],
+ \ 'systemd': ['any/systemd/file.automount', 'any/systemd/file.dnssd', 'any/systemd/file.link', 'any/systemd/file.mount', 'any/systemd/file.netdev', 'any/systemd/file.network', 'any/systemd/file.nspawn', 'any/systemd/file.path', 'any/systemd/file.service', 'any/systemd/file.slice', 'any/systemd/file.socket', 'any/systemd/file.swap', 'any/systemd/file.target', 'any/systemd/file.timer', '/etc/systemd/some.conf.d/file.conf', '/etc/systemd/system/some.d/file.conf', '/etc/systemd/system/some.d/.#file', '/etc/systemd/system/.#otherfile', '/home/user/.config/systemd/user/some.d/mine.conf', '/home/user/.config/systemd/user/some.d/.#file', '/home/user/.config/systemd/user/.#otherfile', '/.config/systemd/user/.#', '/.config/systemd/user/.#-file', '/.config/systemd/user/file.d/.#', '/.config/systemd/user/file.d/.#-file', '/.config/systemd/user/file.d/file.conf', '/etc/systemd/file.conf.d/file.conf', '/etc/systemd/system/.#', '/etc/systemd/system/.#-file', '/etc/systemd/system/file.d/.#', '/etc/systemd/system/file.d/.#-file', '/etc/systemd/system/file.d/file.conf', '/systemd/file.automount', '/systemd/file.dnssd', '/systemd/file.link', '/systemd/file.mount', '/systemd/file.netdev', '/systemd/file.network', '/systemd/file.nspawn', '/systemd/file.path', '/systemd/file.service', '/systemd/file.slice', '/systemd/file.socket', '/systemd/file.swap', '/systemd/file.target', '/systemd/file.timer', 'any/.config/systemd/user/.#', 'any/.config/systemd/user/.#-file', 'any/.config/systemd/user/file.d/.#', 'any/.config/systemd/user/file.d/.#-file', 'any/.config/systemd/user/file.d/file.conf', 'any/etc/systemd/file.conf.d/file.conf', 'any/etc/systemd/system/.#', 'any/etc/systemd/system/.#-file', 'any/etc/systemd/system/file.d/.#', 'any/etc/systemd/system/file.d/.#-file', 'any/etc/systemd/system/file.d/file.conf'],
\ 'systemverilog': ['file.sv', 'file.svh'],
\ 'tags': ['tags'],
\ 'tak': ['file.tak'],
@@ -479,7 +494,7 @@ let s:filename_checks = {
\ 'tidy': ['.tidyrc', 'tidyrc', 'tidy.conf'],
\ 'tilde': ['file.t.html'],
\ 'tli': ['file.tli'],
- \ 'tmux': ['tmuxfile.conf', '.tmuxfile.conf'],
+ \ 'tmux': ['tmuxfile.conf', '.tmuxfile.conf', '.tmux-file.conf', '.tmux.conf', 'tmux-file.conf', 'tmux.conf'],
\ 'toml': ['file.toml'],
\ 'tpp': ['file.tpp'],
\ 'treetop': ['file.treetop'],
@@ -491,12 +506,12 @@ let s:filename_checks = {
\ 'twig': ['file.twig'],
\ 'typescriptreact': ['file.tsx'],
\ 'uc': ['file.uc'],
- \ 'udevconf': ['/etc/udev/udev.conf'],
- \ 'udevperm': ['/etc/udev/permissions.d/file.permissions'],
+ \ 'udevconf': ['/etc/udev/udev.conf', 'any/etc/udev/udev.conf'],
+ \ 'udevperm': ['/etc/udev/permissions.d/file.permissions', 'any/etc/udev/permissions.d/file.permissions'],
\ 'udevrules': ['/etc/udev/rules.d/file.rules', '/usr/lib/udev/rules.d/file.rules', '/lib/udev/rules.d/file.rules'],
\ 'uil': ['file.uit', 'file.uil'],
- \ 'updatedb': ['/etc/updatedb.conf'],
- \ 'upstart': ['/usr/share/upstart/file.conf', '/usr/share/upstart/file.override', '/etc/init/file.conf', '/etc/init/file.override', '/.init/file.conf', '/.init/file.override', '/.config/upstart/file.conf', '/.config/upstart/file.override'],
+ \ 'updatedb': ['/etc/updatedb.conf', 'any/etc/updatedb.conf'],
+ \ 'upstart': ['/usr/share/upstart/file.conf', '/usr/share/upstart/file.override', '/etc/init/file.conf', '/etc/init/file.override', '/.init/file.conf', '/.init/file.override', '/.config/upstart/file.conf', '/.config/upstart/file.override', 'any/.config/upstart/file.conf', 'any/.config/upstart/file.override', 'any/.init/file.conf', 'any/.init/file.override', 'any/etc/init/file.conf', 'any/etc/init/file.override', 'any/usr/share/upstart/file.conf', 'any/usr/share/upstart/file.override'],
\ 'upstreamdat': ['upstream.dat', 'UPSTREAM.DAT', 'upstream.file.dat', 'UPSTREAM.FILE.DAT', 'file.upstream.dat', 'FILE.UPSTREAM.DAT'],
\ 'upstreaminstalllog': ['upstreaminstall.log', 'UPSTREAMINSTALL.LOG', 'upstreaminstall.file.log', 'UPSTREAMINSTALL.FILE.LOG', 'file.upstreaminstall.log', 'FILE.UPSTREAMINSTALL.LOG'],
\ 'upstreamlog': ['fdrupstream.log', 'upstream.log', 'UPSTREAM.LOG', 'upstream.file.log', 'UPSTREAM.FILE.LOG', 'file.upstream.log', 'FILE.UPSTREAM.LOG', 'UPSTREAM-file.log', 'UPSTREAM-FILE.LOG'],
@@ -507,8 +522,8 @@ let s:filename_checks = {
\ 'verilog': ['file.v'],
\ 'verilogams': ['file.va', 'file.vams'],
\ 'vgrindefs': ['vgrindefs'],
- \ 'vhdl': ['file.hdl', 'file.vhd', 'file.vhdl', 'file.vbe', 'file.vst', 'file.vhdl_123', 'file.vho'],
- \ 'vim': ['file.vim', 'file.vba', '.exrc', '_exrc'],
+ \ 'vhdl': ['file.hdl', 'file.vhd', 'file.vhdl', 'file.vbe', 'file.vst', 'file.vhdl_123', 'file.vho', 'some.vhdl_1', 'some.vhdl_1-file'],
+ \ 'vim': ['file.vim', 'file.vba', '.exrc', '_exrc', 'some-vimrc', 'some-vimrc-file', 'vimrc', 'vimrc-file'],
\ 'viminfo': ['.viminfo', '_viminfo'],
\ 'vmasm': ['file.mar'],
\ 'voscm': ['file.cm'],
@@ -520,14 +535,15 @@ let s:filename_checks = {
\ 'wget': ['.wgetrc', 'wgetrc'],
\ 'winbatch': ['file.wbt'],
\ 'wml': ['file.wml'],
+ \ 'wsh': ['file.wsf', 'file.wsc'],
\ 'wsml': ['file.wsml'],
\ 'wvdial': ['wvdial.conf', '.wvdialrc'],
- \ 'xdefaults': ['.Xdefaults', '.Xpdefaults', '.Xresources', 'xdm-config', 'file.ad'],
+ \ 'xdefaults': ['.Xdefaults', '.Xpdefaults', '.Xresources', 'xdm-config', 'file.ad', '/Xresources/file', '/app-defaults/file', 'Xresources', 'Xresources-file', 'any/Xresources/file', 'any/app-defaults/file'],
\ 'xhtml': ['file.xhtml', 'file.xht'],
- \ 'xinetd': ['/etc/xinetd.conf'],
+ \ 'xinetd': ['/etc/xinetd.conf', '/etc/xinetd.d/file', 'any/etc/xinetd.conf', 'any/etc/xinetd.d/file'],
\ 'xmath': ['file.msc', 'file.msf'],
- \ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl', 'file.wpl', 'any/etc/blkid.tab', 'any/etc/blkid.tab.old', 'any/etc/xdg/menus/file.menu', 'file.atom', 'file.rss', 'file.cdxml', 'file.psc1'],
- \ 'xmodmap': ['anyXmodmap'],
+ \ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl', 'file.wpl', 'any/etc/blkid.tab', 'any/etc/blkid.tab.old', 'any/etc/xdg/menus/file.menu'],
+ \ 'xmodmap': ['anyXmodmap', 'Xmodmap', 'some-Xmodmap', 'some-xmodmap', 'some-xmodmap-file', 'xmodmap', 'xmodmap-file'],
\ 'xf86conf': ['xorg.conf', 'xorg.conf-4'],
\ 'xpm2': ['file.xpm2'],
\ 'xquery': ['file.xq', 'file.xql', 'file.xqm', 'file.xquery', 'file.xqy'],
@@ -540,7 +556,7 @@ let s:filename_checks = {
\ 'z8a': ['file.z8a'],
\ 'zimbu': ['file.zu'],
\ 'zimbutempl': ['file.zut'],
- \ 'zsh': ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh'],
+ \ 'zsh': ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh', '.zcompdump', '.zlogin', '.zlogout', '.zshenv', '.zshrc', '.zcompdump-file', '.zlog', '.zlog-file', '.zsh', '.zsh-file', 'any/etc/zprofile', 'zlog', 'zlog-file', 'zsh', 'zsh-file'],
\
\ 'help': [$VIMRUNTIME . '/doc/help.txt'],
\ 'xpm': ['file.xpm'],
@@ -607,7 +623,7 @@ let s:script_checks = {
\ ['#!/path/pike0'],
\ ['#!/path/pike9']],
\ 'lua': [['#!/path/lua']],
- \ 'perl6': [['#!/path/perl6']],
+ \ 'raku': [['#!/path/raku']],
\ 'perl': [['#!/path/perl']],
\ 'php': [['#!/path/php']],
\ 'python': [['#!/path/python'],
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index 93f567b3a0..c280aedffb 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -1402,6 +1402,10 @@ func Test_bufadd_bufload()
endfunc
func Test_readdir()
+ if isdirectory('Xdir')
+ call delete('Xdir', 'rf')
+ endif
+
call mkdir('Xdir')
call writefile([], 'Xdir/foo.txt')
call writefile([], 'Xdir/bar.txt')
@@ -1456,4 +1460,19 @@ func Test_default_arg_value()
call assert_equal('msg', HasDefault())
endfunc
+func Test_delete_rf()
+ call mkdir('Xdir')
+ call writefile([], 'Xdir/foo.txt')
+ call writefile([], 'Xdir/bar.txt')
+ call mkdir('Xdir/[a-1]') " issue #696
+ call writefile([], 'Xdir/[a-1]/foo.txt')
+ call writefile([], 'Xdir/[a-1]/bar.txt')
+ call assert_true(filereadable('Xdir/foo.txt'))
+ call assert_true(filereadable('Xdir/[a-1]/foo.txt'))
+
+ call assert_equal(0, delete('Xdir', 'rf'))
+ call assert_false(filereadable('Xdir/foo.txt'))
+ call assert_false(filereadable('Xdir/[a-1]/foo.txt'))
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/nvim/testdir/test_increment.vim b/src/nvim/testdir/test_increment.vim
index f81f8edbde..6d08cd40a8 100644
--- a/src/nvim/testdir/test_increment.vim
+++ b/src/nvim/testdir/test_increment.vim
@@ -1,4 +1,4 @@
-" Tests for using Ctrl-A/Ctrl-X on visual selections
+" Tests for using Ctrl-A/Ctrl-X
func SetUp()
new dummy
@@ -779,6 +779,50 @@ func Test_increment_empty_line()
bwipe!
endfunc
+" Try incrementing/decrementing a number when nrformats contains unsigned
+func Test_increment_unsigned()
+ set nrformats+=unsigned
+
+ call setline(1, '0')
+ exec "norm! gg0\<C-X>"
+ call assert_equal('0', getline(1))
+
+ call setline(1, '3')
+ exec "norm! gg010\<C-X>"
+ call assert_equal('0', getline(1))
+
+ call setline(1, '-0')
+ exec "norm! gg0\<C-X>"
+ call assert_equal("-0", getline(1))
+
+ call setline(1, '-11')
+ exec "norm! gg08\<C-X>"
+ call assert_equal('-3', getline(1))
+
+ " NOTE: 18446744073709551615 == 2^64 - 1
+ call setline(1, '18446744073709551615')
+ exec "norm! gg0\<C-A>"
+ call assert_equal('18446744073709551615', getline(1))
+
+ call setline(1, '-18446744073709551615')
+ exec "norm! gg0\<C-A>"
+ call assert_equal('-18446744073709551615', getline(1))
+
+ call setline(1, '-18446744073709551614')
+ exec "norm! gg08\<C-A>"
+ call assert_equal('-18446744073709551615', getline(1))
+
+ call setline(1, '-1')
+ exec "norm! gg0\<C-A>"
+ call assert_equal('-2', getline(1))
+
+ call setline(1, '-3')
+ exec "norm! gg08\<C-A>"
+ call assert_equal('-11', getline(1))
+
+ set nrformats-=unsigned
+endfunc
+
func Test_normal_increment_with_virtualedit()
set virtualedit=all
diff --git a/src/nvim/testdir/test_mapping.vim b/src/nvim/testdir/test_mapping.vim
index 0191dbf33e..f88e8cf843 100644
--- a/src/nvim/testdir/test_mapping.vim
+++ b/src/nvim/testdir/test_mapping.vim
@@ -559,4 +559,13 @@ func Test_map_cmdkey_redo()
ounmap i-
endfunc
+func Test_abbreviate_multi_byte()
+ new
+ iabbrev foo bar
+ call feedkeys("ifoo…\<Esc>", 'xt')
+ call assert_equal("bar…", getline(1))
+ iunabbrev foo
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/nvim/testdir/test_mksession.vim b/src/nvim/testdir/test_mksession.vim
index 8486f3ff68..4e46dbac16 100644
--- a/src/nvim/testdir/test_mksession.vim
+++ b/src/nvim/testdir/test_mksession.vim
@@ -149,6 +149,21 @@ func Test_mksession_large_winheight()
call delete('Xtest_mks_winheight.out')
endfunc
+func Test_mksession_zero_winheight()
+ set winminheight=0
+ edit SomeFile
+ split
+ wincmd _
+ mksession! Xtest_mks_zero
+ set winminheight&
+ " let text = readfile('Xtest_mks_zero')->join()
+ let text = join(readfile('Xtest_mks_zero'))
+ call delete('Xtest_mks_zero')
+ close
+ " check there is no divide by zero
+ call assert_notmatch('/ 0[^0-9]', text)
+endfunc
+
func Test_mksession_rtp()
if has('win32')
" TODO: fix problem with backslashes
@@ -680,6 +695,24 @@ func Test_mksession_winpos()
set sessionoptions&
endfunc
+" Test for mksession without options restores winminheight
+func Test_mksession_winminheight()
+ set sessionoptions-=options
+ split
+ mksession! Xtest_mks.out
+ let found_restore = 0
+ let lines = readfile('Xtest_mks.out')
+ for line in lines
+ if line =~ '= s:save_winmin\(width\|height\)'
+ let found_restore += 1
+ endif
+ endfor
+ call assert_equal(2, found_restore)
+ call delete('Xtest_mks.out')
+ close
+ set sessionoptions&
+endfunc
+
" Test for mksession with 'compatible' option
func Test_mksession_compatible()
throw 'skipped: Nvim does not support "compatible" option'
diff --git a/src/nvim/testdir/test_prompt_buffer.vim b/src/nvim/testdir/test_prompt_buffer.vim
new file mode 100644
index 0000000000..6fc5850be3
--- /dev/null
+++ b/src/nvim/testdir/test_prompt_buffer.vim
@@ -0,0 +1,195 @@
+" Tests for setting 'buftype' to "prompt"
+
+source check.vim
+" Nvim's channel implementation differs from Vim's
+" CheckFeature channel
+
+source shared.vim
+source screendump.vim
+
+func CanTestPromptBuffer()
+ " We need to use a terminal window to be able to feed keys without leaving
+ " Insert mode.
+ " Nvim's terminal implementation differs from Vim's
+ " CheckFeature terminal
+
+ " TODO: make the tests work on MS-Windows
+ CheckNotMSWindows
+endfunc
+
+func WriteScript(name)
+ call writefile([
+ \ 'func TextEntered(text)',
+ \ ' if a:text == "exit"',
+ \ ' " Reset &modified to allow the buffer to be closed.',
+ \ ' set nomodified',
+ \ ' stopinsert',
+ \ ' close',
+ \ ' else',
+ \ ' " Add the output above the current prompt.',
+ \ ' call append(line("$") - 1, "Command: \"" . a:text . "\"")',
+ \ ' " Reset &modified to allow the buffer to be closed.',
+ \ ' set nomodified',
+ \ ' call timer_start(20, {id -> TimerFunc(a:text)})',
+ \ ' endif',
+ \ 'endfunc',
+ \ '',
+ \ 'func TimerFunc(text)',
+ \ ' " Add the output above the current prompt.',
+ \ ' call append(line("$") - 1, "Result: \"" . a:text . "\"")',
+ \ ' " Reset &modified to allow the buffer to be closed.',
+ \ ' set nomodified',
+ \ 'endfunc',
+ \ '',
+ \ 'call setline(1, "other buffer")',
+ \ 'set nomodified',
+ \ 'new',
+ \ 'set buftype=prompt',
+ \ 'call prompt_setcallback(bufnr(""), function("TextEntered"))',
+ \ 'eval bufnr("")->prompt_setprompt("cmd: ")',
+ \ 'startinsert',
+ \ ], a:name)
+endfunc
+
+func Test_prompt_basic()
+ throw 'skipped: TODO'
+ call CanTestPromptBuffer()
+ let scriptName = 'XpromptscriptBasic'
+ call WriteScript(scriptName)
+
+ let buf = RunVimInTerminal('-S ' . scriptName, {})
+ call WaitForAssert({-> assert_equal('cmd:', term_getline(buf, 1))})
+
+ call term_sendkeys(buf, "hello\<CR>")
+ call WaitForAssert({-> assert_equal('cmd: hello', term_getline(buf, 1))})
+ call WaitForAssert({-> assert_equal('Command: "hello"', term_getline(buf, 2))})
+ call WaitForAssert({-> assert_equal('Result: "hello"', term_getline(buf, 3))})
+
+ call term_sendkeys(buf, "exit\<CR>")
+ call WaitForAssert({-> assert_equal('other buffer', term_getline(buf, 1))})
+
+ call StopVimInTerminal(buf)
+ call delete(scriptName)
+endfunc
+
+func Test_prompt_editing()
+ throw 'skipped: TODO'
+ call CanTestPromptBuffer()
+ let scriptName = 'XpromptscriptEditing'
+ call WriteScript(scriptName)
+
+ let buf = RunVimInTerminal('-S ' . scriptName, {})
+ call WaitForAssert({-> assert_equal('cmd:', term_getline(buf, 1))})
+
+ let bs = "\<BS>"
+ call term_sendkeys(buf, "hello" . bs . bs)
+ call WaitForAssert({-> assert_equal('cmd: hel', term_getline(buf, 1))})
+
+ let left = "\<Left>"
+ call term_sendkeys(buf, left . left . left . bs . '-')
+ call WaitForAssert({-> assert_equal('cmd: -hel', term_getline(buf, 1))})
+
+ let end = "\<End>"
+ call term_sendkeys(buf, end . "x")
+ call WaitForAssert({-> assert_equal('cmd: -helx', term_getline(buf, 1))})
+
+ call term_sendkeys(buf, "\<C-U>exit\<CR>")
+ call WaitForAssert({-> assert_equal('other buffer', term_getline(buf, 1))})
+
+ call StopVimInTerminal(buf)
+ call delete(scriptName)
+endfunc
+
+func Test_prompt_garbage_collect()
+ func MyPromptCallback(x, text)
+ " NOP
+ endfunc
+ func MyPromptInterrupt(x)
+ " NOP
+ endfunc
+
+ new
+ set buftype=prompt
+ " Nvim doesn't support method call syntax yet.
+ " eval bufnr('')->prompt_setcallback(function('MyPromptCallback', [{}]))
+ " eval bufnr('')->prompt_setinterrupt(function('MyPromptInterrupt', [{}]))
+ eval prompt_setcallback(bufnr(''), function('MyPromptCallback', [{}]))
+ eval prompt_setinterrupt(bufnr(''), function('MyPromptInterrupt', [{}]))
+ call test_garbagecollect_now()
+ " Must not crash
+ call feedkeys("\<CR>\<C-C>", 'xt')
+ call assert_true(v:true)
+
+ call assert_fails("call prompt_setcallback(bufnr(), [])", 'E921:')
+ call assert_equal(0, prompt_setcallback({}, ''))
+ call assert_fails("call prompt_setinterrupt(bufnr(), [])", 'E921:')
+ call assert_equal(0, prompt_setinterrupt({}, ''))
+
+ delfunc MyPromptCallback
+ bwipe!
+endfunc
+
+" Test for editing the prompt buffer
+func Test_prompt_buffer_edit()
+ new
+ set buftype=prompt
+ normal! i
+ call assert_beeps('normal! dd')
+ call assert_beeps('normal! ~')
+ call assert_beeps('normal! o')
+ call assert_beeps('normal! O')
+ call assert_beeps('normal! p')
+ call assert_beeps('normal! P')
+ call assert_beeps('normal! u')
+ call assert_beeps('normal! ra')
+ call assert_beeps('normal! s')
+ call assert_beeps('normal! S')
+ call assert_beeps("normal! \<C-A>")
+ call assert_beeps("normal! \<C-X>")
+ " pressing CTRL-W in the prompt buffer should trigger the window commands
+ call assert_equal(1, winnr())
+ " In Nvim, CTRL-W commands aren't usable from insert mode in a prompt buffer
+ " exe "normal A\<C-W>\<C-W>"
+ " call assert_equal(2, winnr())
+ " wincmd w
+ close!
+ call assert_equal(0, prompt_setprompt([], ''))
+endfunc
+
+func Test_prompt_buffer_getbufinfo()
+ new
+ call assert_equal('', prompt_getprompt('%'))
+ call assert_equal('', prompt_getprompt(bufnr('%')))
+ let another_buffer = bufnr('%')
+
+ set buftype=prompt
+ call assert_equal('% ', prompt_getprompt('%'))
+ call prompt_setprompt( bufnr( '%' ), 'This is a test: ' )
+ call assert_equal('This is a test: ', prompt_getprompt('%'))
+
+ call prompt_setprompt( bufnr( '%' ), '' )
+ " Nvim doesn't support method call syntax yet.
+ " call assert_equal('', '%'->prompt_getprompt())
+ call assert_equal('', prompt_getprompt('%'))
+
+ call prompt_setprompt( bufnr( '%' ), 'Another: ' )
+ call assert_equal('Another: ', prompt_getprompt('%'))
+ let another = bufnr('%')
+
+ new
+
+ call assert_equal('', prompt_getprompt('%'))
+ call assert_equal('Another: ', prompt_getprompt(another))
+
+ " Doesn't exist
+ let buffers_before = len( getbufinfo() )
+ call assert_equal('', prompt_getprompt( bufnr('$') + 1))
+ call assert_equal(buffers_before, len( getbufinfo()))
+
+ " invalid type
+ call assert_fails('call prompt_getprompt({})', 'E728:')
+
+ %bwipe!
+endfunc
+
+" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index da949f5940..16b6a5f464 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -1011,10 +1011,9 @@ endfunc
" Tests for %D and %X errorformat options
func Test_efm_dirstack()
" Create the directory stack and files
- call mkdir('dir1')
- call mkdir('dir1/a')
- call mkdir('dir1/a/b')
- call mkdir('dir1/c')
+ call mkdir('dir1/a', 'p')
+ call mkdir('dir1/a/b', 'p')
+ call mkdir('dir1/c', 'p')
call mkdir('dir2')
let lines =<< trim [DATA]
@@ -3485,6 +3484,9 @@ func Xqftick_tests(cchar)
\ {'filename' : 'F7', 'lnum' : 11, 'text' : 'L11'}], 'r')
call assert_equal(2, g:Xgetlist({'changedtick' : 0}).changedtick)
+ if isdirectory("Xone")
+ call delete("Xone", 'rf')
+ endif
call writefile(["F8:80:L80", "F8:81:L81"], "Xone")
Xfile Xone
call assert_equal(1, g:Xgetlist({'changedtick' : 0}).changedtick)
diff --git a/src/nvim/testdir/test_registers.vim b/src/nvim/testdir/test_registers.vim
index 53069b3d31..bcadb84ced 100644
--- a/src/nvim/testdir/test_registers.vim
+++ b/src/nvim/testdir/test_registers.vim
@@ -43,6 +43,9 @@ func Test_yank_shows_register()
endfunc
func Test_display_registers()
+ " Disable clipboard
+ let g:clipboard = {}
+
e file1
e file2
call setline(1, ['foo', 'bar'])
diff --git a/src/nvim/testdir/test_substitute.vim b/src/nvim/testdir/test_substitute.vim
index e6eb956116..e7f9bb76f2 100644
--- a/src/nvim/testdir/test_substitute.vim
+++ b/src/nvim/testdir/test_substitute.vim
@@ -756,4 +756,13 @@ func Test_submatch_list_concatenate()
call assert_equal(substitute('A1', pat, Rep, ''), "[['A1'], ['1']]")
endfunc
+func Test_substitute_skipped_range()
+ new
+ if 0
+ /1/5/2/2/\n
+ endif
+ call assert_equal([0, 1, 1, 0, 1], getcurpos())
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
diff --git a/src/nvim/testdir/test_winbuf_close.vim b/src/nvim/testdir/test_winbuf_close.vim
index ee43540fdd..7f5b80e8d3 100644
--- a/src/nvim/testdir/test_winbuf_close.vim
+++ b/src/nvim/testdir/test_winbuf_close.vim
@@ -160,7 +160,7 @@ func Test_winfixwidth_on_close()
endfunction
" Test that 'winfixheight' will be respected even there is non-leaf frame
-fun! Test_winfixheight_non_leaf_frame()
+func Test_winfixheight_non_leaf_frame()
vsplit
botright 11new
let l:wid = win_getid()
@@ -173,7 +173,7 @@ fun! Test_winfixheight_non_leaf_frame()
endf
" Test that 'winfixwidth' will be respected even there is non-leaf frame
-fun! Test_winfixwidth_non_leaf_frame()
+func Test_winfixwidth_non_leaf_frame()
split
topleft 11vnew
let l:wid = win_getid()
@@ -184,3 +184,13 @@ fun! Test_winfixwidth_non_leaf_frame()
call assert_equal(11, winwidth(l:wid))
%bwipe!
endf
+
+func Test_tabwin_close()
+ enew
+ let l:wid = win_getid()
+ tabedit
+ call win_execute(l:wid, 'close')
+ " Should not crash.
+ call assert_true(v:true)
+ %bwipe!
+endfunc