0
0
mirror of https://github.com/vim/vim.git synced 2025-10-28 09:27:14 -04:00

updated for version 7.0175

This commit is contained in:
Bram Moolenaar
2005-12-22 22:47:02 +00:00
parent bb1004ee56
commit f4cd3e8074
24 changed files with 149 additions and 28 deletions

View File

@@ -24,7 +24,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test38.out test39.out test40.out test41.out test42.out \
test43.out test44.out test45.out test46.out test47.out \
test48.out test51.out test53.out test54.out test55.out \
test56.out test57.out test58.out test59.out
test56.out test57.out test58.out test59.out test60.out
.SUFFIXES: .in .out

View File

@@ -25,7 +25,7 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test15.out test17.out test18.out test21.out test26.out \
test30.out test31.out test32.out test33.out test34.out \
test37.out test38.out test39.out test40.out test41.out \
test42.out test52.out
test42.out test52.out test60.out
SCRIPTS32 = test50.out

View File

@@ -24,7 +24,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test38.out test39.out test40.out test41.out test42.out \
test43.out test44.out test45.out test46.out test47.out \
test48.out test51.out test53.out test54.out test55.out \
test56.out test57.out test58.out test59.out
test56.out test57.out test58.out test59.out test60.out
.SUFFIXES: .in .out

View File

@@ -58,7 +58,7 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
test38.out test39.out test40.out test41.out test42.out \
test43.out test44.out test45.out test46.out \
test48.out test51.out test53.out test54.out test55.out \
test56.out test57.out test58.out test59.out
test56.out test57.out test58.out test59.out test60.out
.IFDEF WANT_GUI
SCRIPT_GUI = test16.out

View File

@@ -15,7 +15,7 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
test43.out test44.out test45.out test46.out test47.out \
test48.out test49.out test51.out test52.out test53.out \
test54.out test55.out test56.out test57.out test58.out \
test59.out
test59.out test60.out
SCRIPTS_GUI = test16.out

71
src/testdir/test60.in Normal file
View File

@@ -0,0 +1,71 @@
Tests for the exists() function. vim: set ft=vim :
STARTTEST
:so small.vim
:function! RunTest(str, result)
if exists(a:str) == a:result
echo "OK"
else
echo "FAILED: Checking for " . a:str
endif
endfunction
:function! TestExists()
augroup myagroup
autocmd! BufEnter *.my echo 'myfile edited'
augroup END
redir! > test.out
" valid autocmd group
call RunTest('#myagroup', 1)
" Valid autocmd group and event
call RunTest('#myagroup#BufEnter', 1)
" Valid autocmd group, event and pattern
call RunTest('#myagroup#BufEnter#*.my', 1)
" Valid autocmd event
call RunTest('#BufEnter', 1)
" Valid autocmd event and pattern
call RunTest('#BufEnter#*.my', 1)
" Non-existing autocmd group or event
call RunTest('#xyzagroup', 0)
" Non-existing autocmd group and valid autocmd event
call RunTest('#xyzagroup#BufEnter', 0)
" Valid autocmd group and autocmd event with no matching pattern
call RunTest('#myagroup#CmdwinEnter', 0)
" Valid autocmd group and non-existing autocmd event
call RunTest('#myagroup#xyzacmd', 0)
" Valid autocmd group and event and non-matching pattern
call RunTest('#myagroup#BufEnter#xyzpat', 0)
" Valid autocmd event and non-matching pattern
call RunTest('#BufEnter#xyzpat', 0)
" Empty autocmd group, event and pattern
call RunTest('###', 0)
" Empty autocmd group and event or event and pattern
call RunTest('##', 0)
" Testing support for event name that exists.
call RunTest('##SwapExists', 1)
" Testing support for event name that doesn't exist.
call RunTest('##SwapNotExists', 0)
redir END
endfunction
:call TestExists()
:edit! test.out
:set ff=unix
:w
:qa!
ENDTEST

16
src/testdir/test60.ok Normal file
View File

@@ -0,0 +1,16 @@
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK