blob: 747b187fa377a41a1222618b131b86c1ad66399d [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001#
2# Makefile to run al tests for Vim
3#
4
5VIMPROG = ../vim
6
7SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
8 test7.out test8.out test9.out test10.out test11.out \
9 test12.out test13.out test14.out test15.out test17.out \
10 test18.out test19.out test20.out test21.out test22.out \
11 test23.out test24.out test25.out test26.out test27.out \
12 test28.out test29.out test30.out test31.out test32.out \
13 test33.out test34.out test35.out test36.out test37.out \
14 test38.out test39.out test40.out test41.out test42.out \
15 test43.out test44.out test45.out test46.out test47.out \
Bram Moolenaarb5bf5b82004-12-24 14:35:23 +000016 test48.out test49.out test51.out test52.out test53.out \
Bram Moolenaar53180ce2005-07-05 21:48:14 +000017 test54.out test55.out test56.out test57.out test58.out \
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000018 test59.out test60.out test61.out test62.out
Bram Moolenaar071d4272004-06-13 20:20:40 +000019
20SCRIPTS_GUI = test16.out
21
22.SUFFIXES: .in .out
23
24nongui: nolog $(SCRIPTS)
25 @echo
26 @cat test.log
27 @echo ALL DONE
28
29gui: nolog $(SCRIPTS) $(SCRIPTS_GUI)
30 @echo
31 @cat test.log
32 @echo ALL DONE
33
34$(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG)
35
36clean:
Bram Moolenaar89cb5e02004-07-19 20:55:54 +000037 -rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim test.ok X* viminfo
Bram Moolenaar071d4272004-06-13 20:20:40 +000038
39test1.out: test1.in
40 -rm -f $*.failed tiny.vim small.vim mbyte.vim test.ok X* viminfo
41 $(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in $*.in
42 @/bin/sh -c "if diff test.out $*.ok; \
43 then mv -f test.out $*.out; \
44 else echo; \
45 echo test1 FAILED - Something basic is wrong; \
46 echo; exit 1; fi"
47 -rm -rf X* viminfo
48
49.in.out:
Bram Moolenaara5792f52005-11-23 21:25:05 +000050 -rm -rf $*.failed test.ok test.out X* viminfo
Bram Moolenaar071d4272004-06-13 20:20:40 +000051 cp $*.ok test.ok
Bram Moolenaar47136d72004-10-12 20:02:24 +000052 # Sleep a moment to avoid that the xterm title is messed up
53 @-sleep .2
Bram Moolenaar5313dcb2005-02-22 08:56:13 +000054 -$(VIMPROG) -u unix.vim -U NONE --noplugin -s dotest.in $*.in
55 @/bin/sh -c "if test -f test.out; then\
56 if diff test.out $*.ok; \
57 then mv -f test.out $*.out; \
58 else echo $* FAILED >>test.log; mv -f test.out $*.failed; \
59 fi \
60 else echo $* NO OUTPUT >>test.log; \
Bram Moolenaar071d4272004-06-13 20:20:40 +000061 fi"
Bram Moolenaar42332f52005-07-06 22:38:49 +000062 -rm -rf X* test.ok viminfo
Bram Moolenaar071d4272004-06-13 20:20:40 +000063
64nolog:
65 -echo Test results: >test.log