Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | # |
| 2 | # Makefile to run al tests for Vim |
| 3 | # |
| 4 | |
| 5 | VIMPROG = ../vim |
| 6 | |
| 7 | SCRIPTS = 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 Moolenaar | b5bf5b8 | 2004-12-24 14:35:23 +0000 | [diff] [blame] | 16 | test48.out test49.out test51.out test52.out test53.out \ |
Bram Moolenaar | 53180ce | 2005-07-05 21:48:14 +0000 | [diff] [blame^] | 17 | test54.out test55.out test56.out test57.out test58.out \ |
| 18 | test59.out |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 19 | |
| 20 | SCRIPTS_GUI = test16.out |
| 21 | |
| 22 | .SUFFIXES: .in .out |
| 23 | |
| 24 | nongui: nolog $(SCRIPTS) |
| 25 | @echo |
| 26 | @cat test.log |
| 27 | @echo ALL DONE |
| 28 | |
| 29 | gui: nolog $(SCRIPTS) $(SCRIPTS_GUI) |
| 30 | @echo |
| 31 | @cat test.log |
| 32 | @echo ALL DONE |
| 33 | |
| 34 | $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) |
| 35 | |
| 36 | clean: |
Bram Moolenaar | 89cb5e0 | 2004-07-19 20:55:54 +0000 | [diff] [blame] | 37 | -rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim test.ok X* viminfo |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 38 | |
| 39 | test1.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 Moolenaar | 0dc065e | 2005-07-04 22:49:24 +0000 | [diff] [blame] | 50 | -rm -rf $*.failed test.ok X* viminfo |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 51 | cp $*.ok test.ok |
Bram Moolenaar | 47136d7 | 2004-10-12 20:02:24 +0000 | [diff] [blame] | 52 | # Sleep a moment to avoid that the xterm title is messed up |
| 53 | @-sleep .2 |
Bram Moolenaar | 5313dcb | 2005-02-22 08:56:13 +0000 | [diff] [blame] | 54 | -$(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 Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 61 | fi" |
Bram Moolenaar | 0dc065e | 2005-07-04 22:49:24 +0000 | [diff] [blame] | 62 | # Keep the files to make debugging easier. |
| 63 | # -rm -rf X* test.ok viminfo |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 64 | |
| 65 | nolog: |
| 66 | -echo Test results: >test.log |