blob: bdcc01d08cc1b49df0914cb094b758d9e964b3da [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001
2First a simple test to check if the test script works.
3
4If Vim was not compiled with the +eval feature, the small.vim script will be
5set to copy the test.ok file to test.out, so that it looks like the test
6succeeded. Otherwise an empty small.vim is written. small.vim is sourced by
7tests that require the +eval feature or other features that are missing in the
8small version.
9
10If Vim was not compiled with the +windows feature, the tiny.vim script will be
11set like small.vim above. tiny.vim is sourced by tests that require the
12+windows feature or other features that are missing in the tiny version.
13
14If 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
15+multi_byte feature.
Bram Moolenaar7e506b62010-01-19 15:55:06 +010016Similar logic is applied to the +mzscheme feature, using mzscheme.vim.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017
18STARTTEST
19:" Write a single line to test.out to check if testing works at all.
20:%d
21athis is a test:w! test.out
22:" Create small.vim and tiny.vim empty, create mbyte.vim to skip the test.
230D:w! small.vim
24:w! tiny.vim
25ae! test.ok
26w! test.out
27qa!
28:w! mbyte.vim
Bram Moolenaar7e506b62010-01-19 15:55:06 +010029:w! mzscheme.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +000030:" If +multi_byte feature supported, make mbyte.vim empty.
31:if has("multi_byte") | sp another | w! mbyte.vim | q | endif
Bram Moolenaar7e506b62010-01-19 15:55:06 +010032:" If +mzscheme feature supported, make mzscheme.vim empty.
33:if has("mzscheme") | sp another | w! mzscheme.vim | q | endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000034:" If +eval feature supported quit here, leaving tiny.vim and small.vim empty.
35:" Otherwise write small.vim to skip the test.
36:if 1 | q! | endif
37:w! small.vim
38:" If +windows feature not supported :sp will fail and tiny.vim will be
39:" written to skip the test.
40:sp another
41:wq! tiny.vim
42:qa!
43ENDTEST
44