blob: 14afaace63b2c788a47d12ec3154131de430fb1f [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001#
Bram Moolenaar68392722010-07-30 22:04:17 +02002# Makefile to run all tests for Vim
Bram Moolenaar071d4272004-06-13 20:20:40 +00003#
4
5VimProg ?= ../vim
6
Bram Moolenaar4a6fcf82017-10-12 21:29:22 +02007Scripts = test1.out test2.out test3.out test6.out
Bram Moolenaar53f0c962017-10-22 14:23:59 +02008 test11.out
Bram Moolenaar071d4272004-06-13 20:20:40 +00009 test12.out test13.out test14.out test15.out test17.out
Bram Moolenaar15993ce2017-10-26 20:21:44 +020010 test18.out test21.out
11 test27.out test29.out test30.out
Bram Moolenaar53f0c962017-10-22 14:23:59 +020012 test36.out test37.out
Bram Moolenaar15993ce2017-10-26 20:21:44 +020013 test39.out test40.out test42.out
Bram Moolenaardb510072017-09-28 21:52:17 +020014 test44.out test45.out test46.out test47.out
Bram Moolenaar680eeca2010-10-20 17:44:42 +020015 test48.out test49.out test74.out
Bram Moolenaar071d4272004-06-13 20:20:40 +000016
17ScriptsGUI = test16.out
18
19# Build "nongui" when no target was specified.
20nongui: newlog $Scripts
21 :print
22 :cat test.log
23 :print ALL DONE
24
25# Build "ngui" when specified.
26gui: newlog $Scripts $ScriptsGUI
27 :print
28 :cat test.log
29 :print ALL DONE
30
31$Scripts $ScriptsGUI: $VimProg
32
33clean:
Bram Moolenaar7e506b62010-01-19 15:55:06 +010034 :del {r}{force} *.out test.log tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X*
Bram Moolenaar071d4272004-06-13 20:20:40 +000035
36# test1 is special, it checks for features
37test1.out: test1.in
Bram Moolenaar7e506b62010-01-19 15:55:06 +010038 :del {force} test1.failed tiny.vim small.vim mbyte.vim mzscheme.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +000039 :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
56newlog:
57 :print Test results: >! test.log