blob: 93159ba20d7adc3edb3e45a8668d840d1b377a07 [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
7Scripts = test1.out test2.out test3.out test4.out test5.out test6.out
Bram Moolenaar7eba3d22016-03-19 22:54:09 +01008 test7.out test8.out test9.out test11.out
Bram Moolenaar071d4272004-06-13 20:20:40 +00009 test12.out test13.out test14.out test15.out test17.out
10 test18.out test19.out test20.out test21.out test22.out
Bram Moolenaar292eff02017-07-11 21:46:28 +020011 test25.out test27.out
Bram Moolenaar071d4272004-06-13 20:20:40 +000012 test28.out test29.out test30.out test31.out test32.out
Bram Moolenaar52df1172016-06-26 19:38:19 +020013 test33.out test34.out test36.out test37.out
Bram Moolenaar071d4272004-06-13 20:20:40 +000014 test38.out test39.out test40.out test41.out test42.out
15 test43.out test44.out test45.out test46.out test47.out
Bram Moolenaar680eeca2010-10-20 17:44:42 +020016 test48.out test49.out test74.out
Bram Moolenaar071d4272004-06-13 20:20:40 +000017
18ScriptsGUI = test16.out
19
20# Build "nongui" when no target was specified.
21nongui: newlog $Scripts
22 :print
23 :cat test.log
24 :print ALL DONE
25
26# Build "ngui" when specified.
27gui: newlog $Scripts $ScriptsGUI
28 :print
29 :cat test.log
30 :print ALL DONE
31
32$Scripts $ScriptsGUI: $VimProg
33
34clean:
Bram Moolenaar7e506b62010-01-19 15:55:06 +010035 :del {r}{force} *.out test.log tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X*
Bram Moolenaar071d4272004-06-13 20:20:40 +000036
37# test1 is special, it checks for features
38test1.out: test1.in
Bram Moolenaar7e506b62010-01-19 15:55:06 +010039 :del {force} test1.failed tiny.vim small.vim mbyte.vim mzscheme.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +000040 :sys {i} $VimProg -u unix.vim -U NONE --noplugin -s dotest.in test1.in
41 @if os.system("diff test.out test1.ok") != 0:
42 :error test1 FAILED - Something basic is wrong
43 :move {force} test.out test1.out
44 :del {r}{force} X*
45
46:rule %.out : %.in
47 :del {force} $(match).failed test.ok
48 :copy $(match).ok test.ok
49 :sys {i} $VimProg -u unix.vim -U NONE --noplugin -s dotest.in $(match).in
50 @if os.system("diff test.out " + match + ".ok") != 0:
51 :print $match FAILED >>test.log
52 :move {force} test.out $(match).failed
53 @else:
54 :move {force} test.out $(match).out
55 :del {r}{force} X* test.ok
56
57newlog:
58 :print Test results: >! test.log