test: Remove references to tiny.vim/small.vim/mbyte.vim

Vim creates these scripts in test1 depending on what build features
are enabled so that tests that use these features are skiped if
necessary. Because Neovim only has one type of build (and the features
+eval, +windows, and +multi-byte are enabled in this build) they are
not necessary.
This commit is contained in:
Michael Ennen
2016-04-19 16:24:03 -07:00
committed by Justin M. Keyes
parent 39c015bd11
commit e70cae426c
29 changed files with 5 additions and 70 deletions

3
.gitignore vendored
View File

@@ -23,9 +23,6 @@ tags
# Files generated by the tests # Files generated by the tests
/src/nvim/testdir/del /src/nvim/testdir/del
/src/nvim/testdir/mbyte.vim
/src/nvim/testdir/small.vim
/src/nvim/testdir/tiny.vim
/src/nvim/testdir/test*.out /src/nvim/testdir/test*.out
/src/nvim/testdir/test.log /src/nvim/testdir/test.log
/src/nvim/testdir/messages /src/nvim/testdir/messages

View File

@@ -97,7 +97,7 @@ test1.out: $(VIMPROG)
$(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) test1.out $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) test1.out
RM_ON_RUN := test.out X* viminfo RM_ON_RUN := test.out X* viminfo
RM_ON_START := tiny.vim small.vim mbyte.vim test.ok RM_ON_START := test.ok
RUN_VIM := VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(TOOL) $(VIMPROG) -u unix.vim -U NONE -i viminfo --noplugin -s dotest.in RUN_VIM := VIMRUNTIME=$(SCRIPTSOURCE); export VIMRUNTIME; $(TOOL) $(VIMPROG) -u unix.vim -U NONE -i viminfo --noplugin -s dotest.in
clean: clean:

View File

@@ -20,9 +20,6 @@
" If cleanup after each Test_ function is needed, define a TearDown function. " If cleanup after each Test_ function is needed, define a TearDown function.
" It will be called after each Test_ function. " It will be called after each Test_ function.
" Without the +eval feature we can't run these tests, bail out.
so small.vim
" Check that the screen size is at least 24 x 80 characters. " Check that the screen size is at least 24 x 80 characters.
if &lines < 24 || &columns < 80 if &lines < 24 || &columns < 80
let error = 'Screen size too small! Tests require at least 24 lines with 80 characters' let error = 'Screen size too small! Tests require at least 24 lines with 80 characters'

View File

@@ -1,20 +1,5 @@
First a simple test to check if the test script works. First a simple test to check if the test script works.
If Vim was not compiled with the +eval feature, the small.vim script will be
set to copy the test.ok file to test.out, so that it looks like the test
succeeded. Otherwise an empty small.vim is written. small.vim is sourced by
tests that require the +eval feature or other features that are missing in the
small version.
If Vim was not compiled with the +windows feature, the tiny.vim script will be
set like small.vim above. tiny.vim is sourced by tests that require the
+windows feature or other features that are missing in the tiny version.
If Vim was not compiled with the +multi_byte feature, the mbyte.vim script will
be set like small.vim above. mbyte.vim is sourced by tests that require the
+multi_byte feature.
STARTTEST STARTTEST
:" If columns or lines are too small, create wrongtermsize. :" If columns or lines are too small, create wrongtermsize.
:" (Some tests will fail. When columns and/or lines are small) :" (Some tests will fail. When columns and/or lines are small)
@@ -23,25 +8,6 @@ STARTTEST
:" Write a single line to test.out to check if testing works at all. :" Write a single line to test.out to check if testing works at all.
:%d :%d
athis is a test:w! test.out athis is a test:w! test.out
:" Create small.vim and tiny.vim empty, create mbyte.vim to skip the test.
0D:w! small.vim
:w! tiny.vim
ae! test.ok
w! test.out
qa!
:w! mbyte.vim
:"
:" If +multi_byte feature supported, make mbyte.vim empty.
:if has("multi_byte") | sp another | w! mbyte.vim | q | endif
:"
:" If +eval feature supported quit here, leaving tiny.vim and small.vim empty.
:" Otherwise write small.vim to skip the test.
:if 1 | q! | endif
:w! small.vim
:" If +windows feature not supported :sp will fail and tiny.vim will be
:" written to skip the test.
:sp another
:wq! tiny.vim
:qa! :qa!
ENDTEST ENDTEST

View File

@@ -1,9 +1,6 @@
Test for 'errorformat'. This will fail if the quickfix feature was disabled. Test for 'errorformat'. This will fail if the quickfix feature was disabled.
STARTTEST STARTTEST
:so small.vim
:" Also test a BOM is ignored.
:so mbyte.vim
:7/start of errorfile/,/end of errorfile/w! Xerrorfile1 :7/start of errorfile/,/end of errorfile/w! Xerrorfile1
:7/start of errorfile/,/end of errorfile/-1w! Xerrorfile2 :7/start of errorfile/,/end of errorfile/-1w! Xerrorfile2
:/start of testfile/,/end of testfile/w! Xtestfile :/start of testfile/,/end of testfile/w! Xtestfile

View File

@@ -1,7 +1,6 @@
Test for 'errorformat'. Test for 'errorformat'.
STARTTEST STARTTEST
:so small.vim
:/start of errorfile/,/end of errorfile/w! Xerrorfile :/start of errorfile/,/end of errorfile/w! Xerrorfile
:/start of testfile/,/end of testfile/w! Xtestfile :/start of testfile/,/end of testfile/w! Xtestfile
:cf Xerrorfile :cf Xerrorfile

View File

@@ -4,7 +4,6 @@ Tests for 'directory' option.
- "dir", in directory relative to current dir - "dir", in directory relative to current dir
STARTTEST STARTTEST
:so small.vim
:set dir=.,~ :set dir=.,~
:/start of testfile/,/end of testfile/w! Xtest1 :/start of testfile/,/end of testfile/w! Xtest1
:" do an ls of the current dir to find the swap file (should not be there) :" do an ls of the current dir to find the swap file (should not be there)

View File

@@ -11,7 +11,6 @@ Also test changing buffers in a BufDel autocommand. If this goes wrong there
are ml_line errors and/or a Crash. are ml_line errors and/or a Crash.
STARTTEST STARTTEST
:so small.vim
:/^start of testfile/,/^end of testfile/w! Xtestje1 :/^start of testfile/,/^end of testfile/w! Xtestje1
:/^start of testfile/,/^end of testfile/w! Xtestje2 :/^start of testfile/,/^end of testfile/w! Xtestje2
:/^start of testfile/,/^end of testfile/w! Xtestje3 :/^start of testfile/,/^end of testfile/w! Xtestje3

View File

@@ -5,7 +5,6 @@ Also test "[m", "]m", "[M" and "]M"
Also test search() Also test search()
STARTTEST STARTTEST
:so small.vim
/Start cursor here /Start cursor here
vaBiBD:?Bug?,/Piece/-2w! test.out vaBiBD:?Bug?,/Piece/-2w! test.out
/^- Bug /^- Bug

View File

@@ -3,7 +3,6 @@ Tests for:
- ":checkpath!" with various 'include' settings. - ":checkpath!" with various 'include' settings.
STARTTEST STARTTEST
:so small.vim
:set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,} :set isfname=@,48-57,/,.,-,_,+,,,$,:,~,{,}
:function! DeleteDirectory(dir) :function! DeleteDirectory(dir)
: if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32") : if has("win16") || has("win32") || has("win64") || has("dos16") || has("dos32")

View File

@@ -3,7 +3,6 @@ Test for a lot of variations of the 'fileformats' option
Note: This test will fail if "cat" is not available. Note: This test will fail if "cat" is not available.
STARTTEST STARTTEST
:so small.vim
:" first write three test files, one in each format :" first write three test files, one in each format
:set fileformat=unix :set fileformat=unix
:set fileformats= :set fileformats=

View File

@@ -21,7 +21,6 @@ Test for insert expansion
* t-expansion * t-expansion
STARTTEST STARTTEST
:so small.vim
:se backspace="" :se backspace=""
:se cpt=.,w ff=unix | $-2,$w!Xtestfile | set ff& :se cpt=.,w ff=unix | $-2,$w!Xtestfile | set ff&
:se cot= :se cot=

View File

@@ -4,7 +4,6 @@ Also test that a builtin function cannot be replaced.
Also test for regression when calling arbitrary expression. Also test for regression when calling arbitrary expression.
STARTTEST STARTTEST
:so small.vim
:function Table(title, ...) :function Table(title, ...)
: let ret = a:title : let ret = a:title
: let idx = 1 : let idx = 1

View File

@@ -1,6 +1,6 @@
Test for 'scrollbind'. <eralston@computer.org> Do not add a line below! Test for 'scrollbind'. <eralston@computer.org> Do not add a line below!
STARTTEST STARTTEST
:so small.vim :
:set noscrollbind :set noscrollbind
:set scrollopt=ver,jump :set scrollopt=ver,jump
:set scrolloff=2 :set scrolloff=2

View File

@@ -1,7 +1,6 @@
Test for "*Cmd" autocommands Test for "*Cmd" autocommands
STARTTEST STARTTEST
:so small.vim
:set wildchar=^E :set wildchar=^E
:/^start/,$w! Xxx " write lines below to Xxx :/^start/,$w! Xxx " write lines below to Xxx
:au BufReadCmd XtestA 0r Xxx|$del :au BufReadCmd XtestA 0r Xxx|$del

Binary file not shown.

View File

@@ -3,7 +3,6 @@ Tests for vertical splits and filler lines in diff mode
Also tests restoration of saved options by :diffoff. Also tests restoration of saved options by :diffoff.
STARTTEST STARTTEST
:so small.vim
:" Disable the title to avoid xterm keeping the wrong one. :" Disable the title to avoid xterm keeping the wrong one.
:set notitle noicon :set notitle noicon
/^1 /^1

View File

@@ -1,7 +1,6 @@
This is a test of 'virtualedit'. This is a test of 'virtualedit'.
STARTTEST STARTTEST
:so small.vim
:set noswf :set noswf
:set ve=all :set ve=all
j-dgg j-dgg

View File

@@ -4,7 +4,6 @@ If after adding a new test, the test output doesn't appear properly in
test49.failed, try to add one or more "G"s at the line ending in "test.out" test49.failed, try to add one or more "G"s at the line ending in "test.out"
STARTTEST STARTTEST
:so small.vim
:se nomore :se nomore
:lang mess C :lang mess C
:so test49.vim :so test49.vim

View File

@@ -2,7 +2,6 @@ Test for shortpathname ':8' extension.
Only for use on Win32 systems! Only for use on Win32 systems!
STARTTEST STARTTEST
:so small.vim
:fun! TestIt(file, bits, expected) :fun! TestIt(file, bits, expected)
let res=fnamemodify(a:file,a:bits) let res=fnamemodify(a:file,a:bits)
if a:expected == '' if a:expected == ''

View File

@@ -1,7 +1,6 @@
Tests for reading and writing files with conversion for Win32. Tests for reading and writing files with conversion for Win32.
STARTTEST STARTTEST
:so mbyte.vim
:" make this a dummy test for non-Win32 systems :" make this a dummy test for non-Win32 systems
:if !has("win32") | e! test.ok | wq! test.out | endif :if !has("win32") | e! test.ok | wq! test.out | endif
:" :"

View File

@@ -7,7 +7,6 @@ Also test match() and matchstr()
Also test the gn command and repeating it. Also test the gn command and repeating it.
STARTTEST STARTTEST
:so small.vim
/^start:/ /^start:/
da" da"
0va'a'rx 0va'a'rx

View File

@@ -1,7 +1,6 @@
Tests for List and Dictionary types. vim: set ft=vim : Tests for List and Dictionary types. vim: set ft=vim :
STARTTEST STARTTEST
:so small.vim
:fun Test(...) :fun Test(...)
:lang C :lang C
:" Creating List directly with different types :" Creating List directly with different types

View File

@@ -5,7 +5,6 @@ A pattern that gives the expected result produces OK, so that we know it was
actually tried. actually tried.
STARTTEST STARTTEST
:so small.vim
:" tl is a List of Lists with: :" tl is a List of Lists with:
:" regexp engine :" regexp engine
:" regexp pattern :" regexp pattern

View File

@@ -4,7 +4,7 @@ And test "ra" on multi-byte characters.
Also test byteidx() and byteidxcomp() Also test byteidx() and byteidxcomp()
STARTTEST STARTTEST
:so mbyte.vim :
ENDTEST ENDTEST
Results of test69: Results of test69:

View File

@@ -1,7 +1,6 @@
Tests for find completion. Tests for find completion.
STARTTEST STARTTEST
:so small.vim
:set wildmode=full :set wildmode=full
:" Do all test in a separate window to avoid E211 when we recursively :" Do all test in a separate window to avoid E211 when we recursively
:" delete the Xfind directory during cleanup :" delete the Xfind directory during cleanup

View File

@@ -2,7 +2,6 @@ Test for BufWritePre autocommand that deletes or unloads the buffer.
Test for BufUnload autocommand that unloads all other buffers. Test for BufUnload autocommand that unloads all other buffers.
STARTTEST STARTTEST
:so small.vim
:au BufWritePre Xxx1 bunload :au BufWritePre Xxx1 bunload
:au BufWritePre Xxx2 bwipe :au BufWritePre Xxx2 bwipe
/^start of /^start of
@@ -35,8 +34,6 @@ endfunc
:set shada='100 :set shada='100
:au BufUnload * call CloseAll() :au BufUnload * call CloseAll()
:au VimLeave * call WriteToOut() :au VimLeave * call WriteToOut()
:e small.vim
:sp mbyte.vim
:q :q
:qa! :qa!
ENDTEST ENDTEST

View File

@@ -1,7 +1,6 @@
Test for linebreak and list option (non-utf8) Test for linebreak and list option (non-utf8)
STARTTEST STARTTEST
:so small.vim
:if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif
:set wildchar=^E :set wildchar=^E
:10new|:vsp|:vert resize 20 :10new|:vsp|:vert resize 20

View File

@@ -25,8 +25,8 @@ local measure_script = [[
endfunc]] endfunc]]
describe('regexp search', function() describe('regexp search', function()
-- The test cases rely on a small Vim script, which we source here, and also -- The test cases rely on a temporary result file, which we prepare and write
-- on a temporary result file, which we prepare and write to disk. -- to disk.
setup(function() setup(function()
clear() clear()
source(measure_script) source(measure_script)