Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | # |
Bram Moolenaar | 6839272 | 2010-07-30 22:04:17 +0200 | [diff] [blame] | 2 | # Makefile to run all tests for Vim |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 3 | # |
| 4 | |
| 5 | VimProg ?= ../vim |
| 6 | |
Bram Moolenaar | 4a6fcf8 | 2017-10-12 21:29:22 +0200 | [diff] [blame] | 7 | Scripts = test1.out test2.out test3.out test6.out |
Bram Moolenaar | 53f0c96 | 2017-10-22 14:23:59 +0200 | [diff] [blame] | 8 | test11.out |
Bram Moolenaar | 430dc5d | 2017-11-02 21:04:47 +0100 | [diff] [blame^] | 9 | test13.out test14.out test15.out test17.out |
Bram Moolenaar | 15993ce | 2017-10-26 20:21:44 +0200 | [diff] [blame] | 10 | test18.out test21.out |
| 11 | test27.out test29.out test30.out |
Bram Moolenaar | 53f0c96 | 2017-10-22 14:23:59 +0200 | [diff] [blame] | 12 | test36.out test37.out |
Bram Moolenaar | 430dc5d | 2017-11-02 21:04:47 +0100 | [diff] [blame^] | 13 | test39.out test42.out |
| 14 | test44.out test46.out test47.out |
Bram Moolenaar | 680eeca | 2010-10-20 17:44:42 +0200 | [diff] [blame] | 15 | test48.out test49.out test74.out |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 16 | |
| 17 | ScriptsGUI = test16.out |
| 18 | |
| 19 | # Build "nongui" when no target was specified. |
| 20 | nongui: newlog $Scripts |
| 21 | :print |
| 22 | :cat test.log |
| 23 | :print ALL DONE |
| 24 | |
| 25 | # Build "ngui" when specified. |
| 26 | gui: newlog $Scripts $ScriptsGUI |
| 27 | :print |
| 28 | :cat test.log |
| 29 | :print ALL DONE |
| 30 | |
| 31 | $Scripts $ScriptsGUI: $VimProg |
| 32 | |
| 33 | clean: |
Bram Moolenaar | 7e506b6 | 2010-01-19 15:55:06 +0100 | [diff] [blame] | 34 | :del {r}{force} *.out test.log tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 35 | |
| 36 | # test1 is special, it checks for features |
| 37 | test1.out: test1.in |
Bram Moolenaar | 7e506b6 | 2010-01-19 15:55:06 +0100 | [diff] [blame] | 38 | :del {force} test1.failed tiny.vim small.vim mbyte.vim mzscheme.vim |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 39 | :sys {i} $VimProg -u unix.vim -U NONE --noplugin -s dotest.in test1.in |
| 40 | @if os.system("diff test.out test1.ok") != 0: |
| 41 | :error test1 FAILED - Something basic is wrong |
| 42 | :move {force} test.out test1.out |
| 43 | :del {r}{force} X* |
| 44 | |
| 45 | :rule %.out : %.in |
| 46 | :del {force} $(match).failed test.ok |
| 47 | :copy $(match).ok test.ok |
| 48 | :sys {i} $VimProg -u unix.vim -U NONE --noplugin -s dotest.in $(match).in |
| 49 | @if os.system("diff test.out " + match + ".ok") != 0: |
| 50 | :print $match FAILED >>test.log |
| 51 | :move {force} test.out $(match).failed |
| 52 | @else: |
| 53 | :move {force} test.out $(match).out |
| 54 | :del {r}{force} X* test.ok |
| 55 | |
| 56 | newlog: |
| 57 | :print Test results: >! test.log |