Update runtime/indent/testdir to latest Vim runtime

Several runtime updates ignored the non-existing files.
This commit is contained in:
Daniel Hahler 2019-09-18 22:51:50 +02:00
parent 48b2d21d5e
commit 0e75a9eead
2 changed files with 16 additions and 10 deletions

View File

@ -22,8 +22,12 @@ First of all, create a FILETYPE.in file. It should contain:
endfunc endfunc
" END_INDENT " END_INDENT
- Optionally, a line with INDENT_EXE, followed by a Vim command. This will be If you just want to test normal indenting with default options, you can make
executed before indenting the lines. Example: this a large number of lines. Just add all kinds of language constructs,
nested statements, etc. with valid syntax.
- Optionally, add lines with INDENT_EXE after START_INDENT, followed by a Vim
command. This will be executed before indenting the lines. Example:
" START_INDENT " START_INDENT
" INDENT_EXE let g:vim_indent_cont = 6 " INDENT_EXE let g:vim_indent_cont = 6
@ -36,8 +40,8 @@ First of all, create a FILETYPE.in file. It should contain:
the next block of lines. the next block of lines.
- Alternatively to indenting all the lines between START_INDENT and - Alternatively to indenting all the lines between START_INDENT and
END_INDENT, use a INDENT_AT line, which specifies a pattern to find the line END_INDENT, use an INDENT_AT line, which specifies a pattern to find the
to indent. Example: line to indent. Example:
" START_INDENT " START_INDENT
" INDENT_AT this-line " INDENT_AT this-line
@ -47,7 +51,8 @@ First of all, create a FILETYPE.in file. It should contain:
" END_INDENT " END_INDENT
Alternatively you can use INDENT_NEXT to indent the line below the matching Alternatively you can use INDENT_NEXT to indent the line below the matching
pattern: pattern. Keep in mind that quite often it will indent relative to the
matching line:
" START_INDENT " START_INDENT
" INDENT_NEXT next-line " INDENT_NEXT next-line
@ -77,14 +82,14 @@ RUNNING THE TEST
Before running the test, create a FILETYPE.ok file. You can leave it empty at Before running the test, create a FILETYPE.ok file. You can leave it empty at
first. first.
Now run "make test". After Vim has done the indenting you will see a Now run "make test" from the parent directory. After Vim has done the
FILETYPE.fail file. This contains the actual result of indenting, and it's indenting you will see a FILETYPE.fail file. This contains the actual result
different from the FILETYPE.ok file. of indenting, and it's different from the FILETYPE.ok file.
Check the contents of the FILETYPE.fail file. If it is perfectly OK, then Check the contents of the FILETYPE.fail file. If it is perfectly OK, then
rename it to overwrite the FILETYPE.ok file. If you now run "make test" again, rename it to overwrite the FILETYPE.ok file. If you now run "make test" again,
the test will pass and create a FILETYPE.out file, which is identical to the the test will pass and create a FILETYPE.out file, which is identical to the
FILETYPE.ok file. FILETYPE.ok file. The FILETYPE.fail file will be deleted.
If you try to run "make test" again you will notice that nothing happens, If you try to run "make test" again you will notice that nothing happens,
because the FILETYPE.out file already exists. Delete it, or do "make clean", because the FILETYPE.out file already exists. Delete it, or do "make clean",

View File

@ -7,7 +7,9 @@ if 1
set nocp set nocp
filetype indent on filetype indent on
syn on
set nowrapscan set nowrapscan
set report=9999
au! SwapExists * call HandleSwapExists() au! SwapExists * call HandleSwapExists()
func HandleSwapExists() func HandleSwapExists()
@ -110,7 +112,6 @@ for fname in glob('testdir/*.in', 1, 1)
if failed if failed
exe 'write ' . root . '.fail' exe 'write ' . root . '.fail'
echoerr 'Test ' . fname . ' FAILED!' echoerr 'Test ' . fname . ' FAILED!'
sleep 2
else else
exe 'write ' . root . '.out' exe 'write ' . root . '.out'
endif endif