blob: 8c0219ea600af3831d569e7f241ad2b507217009 [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
Bram Moolenaar280a29f2010-08-04 16:10:19 +020014If Vim was not compiled with the +multi_byte feature, the mbyte.vim script will
15be set like small.vim above. mbyte.vim is sourced by tests that require the
Bram Moolenaar071d4272004-06-13 20:20:40 +000016+multi_byte feature.
Bram Moolenaar7e506b62010-01-19 15:55:06 +010017Similar logic is applied to the +mzscheme feature, using mzscheme.vim.
Bram Moolenaar071d4272004-06-13 20:20:40 +000018
19STARTTEST
Bram Moolenaar6848c8b2013-09-22 15:03:38 +020020:" If columns or lines are too small, create wrongtermsize.
21:" (Some tests will fail. When columns and/or lines are small)
22:if &lines < 24 || &columns < 80 | sp another | w! wrongtermsize | qa! | endif
23:"
Bram Moolenaar071d4272004-06-13 20:20:40 +000024:" Write a single line to test.out to check if testing works at all.
25:%d
26athis is a test:w! test.out
27:" Create small.vim and tiny.vim empty, create mbyte.vim to skip the test.
280D:w! small.vim
29:w! tiny.vim
30ae! test.ok
31w! test.out
32qa!
33:w! mbyte.vim
Bram Moolenaar7e506b62010-01-19 15:55:06 +010034:w! mzscheme.vim
Bram Moolenaar98411e52012-04-05 16:56:52 +020035:"
Bram Moolenaar071d4272004-06-13 20:20:40 +000036:" If +multi_byte feature supported, make mbyte.vim empty.
37:if has("multi_byte") | sp another | w! mbyte.vim | q | endif
Bram Moolenaar98411e52012-04-05 16:56:52 +020038:"
Bram Moolenaar7e506b62010-01-19 15:55:06 +010039:" If +mzscheme feature supported, make mzscheme.vim empty.
40:if has("mzscheme") | sp another | w! mzscheme.vim | q | endif
Bram Moolenaar98411e52012-04-05 16:56:52 +020041:"
Bram Moolenaar071d4272004-06-13 20:20:40 +000042:" If +eval feature supported quit here, leaving tiny.vim and small.vim empty.
43:" Otherwise write small.vim to skip the test.
44:if 1 | q! | endif
45:w! small.vim
46:" If +windows feature not supported :sp will fail and tiny.vim will be
47:" written to skip the test.
48:sp another
49:wq! tiny.vim
50:qa!
51ENDTEST
52