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 | |
| 14 | 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 |
| 15 | +multi_byte feature. |
| 16 | |
| 17 | STARTTEST |
| 18 | :" Write a single line to test.out to check if testing works at all. |
| 19 | :%d |
| 20 | athis is a test:w! test.out |
| 21 | :" Create small.vim and tiny.vim empty, create mbyte.vim to skip the test. |
| 22 | 0D:w! small.vim |
| 23 | :w! tiny.vim |
| 24 | ae! test.ok |
| 25 | w! test.out |
| 26 | qa! |
| 27 | :w! mbyte.vim |
| 28 | :" If +multi_byte feature supported, make mbyte.vim empty. |
| 29 | :if has("multi_byte") | sp another | w! mbyte.vim | q | endif |
| 30 | :" If +eval feature supported quit here, leaving tiny.vim and small.vim empty. |
| 31 | :" Otherwise write small.vim to skip the test. |
| 32 | :if 1 | q! | endif |
| 33 | :w! small.vim |
| 34 | :" If +windows feature not supported :sp will fail and tiny.vim will be |
| 35 | :" written to skip the test. |
| 36 | :sp another |
| 37 | :wq! tiny.vim |
| 38 | :qa! |
| 39 | ENDTEST |
| 40 | |