Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | |
| 2 | First a simple test to check if the test script works. |
| 3 | |
| 4 | If Vim was not compiled with the +eval feature, the small.vim script will be |
| 5 | set to copy the test.ok file to test.out, so that it looks like the test |
| 6 | succeeded. Otherwise an empty small.vim is written. small.vim is sourced by |
| 7 | tests that require the +eval feature or other features that are missing in the |
| 8 | small version. |
| 9 | |
| 10 | If Vim was not compiled with the +windows feature, the tiny.vim script will be |
| 11 | set 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 Moolenaar | 280a29f | 2010-08-04 16:10:19 +0200 | [diff] [blame^] | 14 | If Vim was not compiled with the +multi_byte feature, the mbyte.vim script will |
| 15 | be set like small.vim above. mbyte.vim is sourced by tests that require the |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 16 | +multi_byte feature. |
Bram Moolenaar | 7e506b6 | 2010-01-19 15:55:06 +0100 | [diff] [blame] | 17 | Similar logic is applied to the +mzscheme feature, using mzscheme.vim. |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 18 | |
| 19 | STARTTEST |
| 20 | :" Write a single line to test.out to check if testing works at all. |
| 21 | :%d |
| 22 | athis is a test:w! test.out |
| 23 | :" Create small.vim and tiny.vim empty, create mbyte.vim to skip the test. |
| 24 | 0D:w! small.vim |
| 25 | :w! tiny.vim |
| 26 | ae! test.ok |
| 27 | w! test.out |
| 28 | qa! |
| 29 | :w! mbyte.vim |
Bram Moolenaar | 7e506b6 | 2010-01-19 15:55:06 +0100 | [diff] [blame] | 30 | :w! mzscheme.vim |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 31 | :" If +multi_byte feature supported, make mbyte.vim empty. |
| 32 | :if has("multi_byte") | sp another | w! mbyte.vim | q | endif |
Bram Moolenaar | 7e506b6 | 2010-01-19 15:55:06 +0100 | [diff] [blame] | 33 | :" If +mzscheme feature supported, make mzscheme.vim empty. |
| 34 | :if has("mzscheme") | sp another | w! mzscheme.vim | q | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 35 | :" If +eval feature supported quit here, leaving tiny.vim and small.vim empty. |
| 36 | :" Otherwise write small.vim to skip the test. |
| 37 | :if 1 | q! | endif |
| 38 | :w! small.vim |
| 39 | :" If +windows feature not supported :sp will fail and tiny.vim will be |
| 40 | :" written to skip the test. |
| 41 | :sp another |
| 42 | :wq! tiny.vim |
| 43 | :qa! |
| 44 | ENDTEST |
| 45 | |