Bram Moolenaar | 6839272 | 2010-07-30 22:04:17 +0200 | [diff] [blame] | 1 | # |
| 2 | # Makefile to run all tests for Vim, on Dos-like machines |
Bram Moolenaar | 34b6cb1 | 2008-09-20 14:27:03 +0000 | [diff] [blame] | 3 | # with sh.exe or zsh.exe in the path or not. |
| 4 | # |
| 5 | # Author: Bill McCarthy |
| 6 | # |
| 7 | # Note that test54 has been removed until it is fixed. |
| 8 | # |
| 9 | # Requires a set of Unix tools: echo, diff, etc. |
| 10 | |
| 11 | ifneq (sh.exe, $(SHELL)) |
| 12 | DEL = rm -f |
| 13 | MV = mv |
| 14 | CP = cp |
Bram Moolenaar | fda3729 | 2014-11-05 14:27:36 +0100 | [diff] [blame] | 15 | CAT = cat |
Bram Moolenaar | 34b6cb1 | 2008-09-20 14:27:03 +0000 | [diff] [blame] | 16 | DIRSLASH = / |
| 17 | else |
| 18 | DEL = del |
| 19 | MV = rename |
| 20 | CP = copy |
Bram Moolenaar | fda3729 | 2014-11-05 14:27:36 +0100 | [diff] [blame] | 21 | CAT = type |
Bram Moolenaar | 34b6cb1 | 2008-09-20 14:27:03 +0000 | [diff] [blame] | 22 | DIRSLASH = \\ |
| 23 | endif |
| 24 | |
| 25 | VIMPROG = ..$(DIRSLASH)vim |
| 26 | |
Bram Moolenaar | 7b6156f | 2015-12-28 16:01:26 +0100 | [diff] [blame] | 27 | include Make_all.mak |
| 28 | |
Bram Moolenaar | 34b6cb1 | 2008-09-20 14:27:03 +0000 | [diff] [blame] | 29 | # Omitted: |
| 30 | # test2 "\\tmp" doesn't work. |
| 31 | # test10 'errorformat' is different |
| 32 | # test12 can't unlink a swap file |
| 33 | # test25 uses symbolic link |
| 34 | # test27 can't edit file with "*" in file name |
Bram Moolenaar | 7b6156f | 2015-12-28 16:01:26 +0100 | [diff] [blame] | 35 | # test54 doesn't work yet |
| 36 | # test97 \{ and \$ are not escaped characters |
Bram Moolenaar | 34b6cb1 | 2008-09-20 14:27:03 +0000 | [diff] [blame] | 37 | |
Bram Moolenaar | 7b6156f | 2015-12-28 16:01:26 +0100 | [diff] [blame] | 38 | SCRIPTS = $(SCRIPTS_ALL) $(SCRIPTS_MORE1) $(SCRIPTS_MORE4) $(SCRIPTS_WIN32) |
Bram Moolenaar | 34b6cb1 | 2008-09-20 14:27:03 +0000 | [diff] [blame] | 39 | |
Bram Moolenaar | fda3729 | 2014-11-05 14:27:36 +0100 | [diff] [blame] | 40 | SCRIPTS_BENCH = bench_re_freeze.out |
| 41 | |
Bram Moolenaar | a608243 | 2015-12-28 16:26:45 +0100 | [diff] [blame] | 42 | # Must run test1 first to create small.vim. |
| 43 | $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32) $(NEW_TESTS): $(SCRIPTS_FIRST) |
| 44 | |
Bram Moolenaar | 34b6cb1 | 2008-09-20 14:27:03 +0000 | [diff] [blame] | 45 | .SUFFIXES: .in .out |
| 46 | |
Bram Moolenaar | a608243 | 2015-12-28 16:26:45 +0100 | [diff] [blame] | 47 | vimall: fixff $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32) |
Bram Moolenaar | 34b6cb1 | 2008-09-20 14:27:03 +0000 | [diff] [blame] | 48 | echo ALL DONE |
| 49 | |
Bram Moolenaar | a608243 | 2015-12-28 16:26:45 +0100 | [diff] [blame] | 50 | nongui: fixff $(SCRIPTS_FIRST) $(SCRIPTS) |
Bram Moolenaar | 34b6cb1 | 2008-09-20 14:27:03 +0000 | [diff] [blame] | 51 | echo ALL DONE |
| 52 | |
Bram Moolenaar | fda3729 | 2014-11-05 14:27:36 +0100 | [diff] [blame] | 53 | benchmark: $(SCRIPTS_BENCH) |
| 54 | |
Bram Moolenaar | 34b6cb1 | 2008-09-20 14:27:03 +0000 | [diff] [blame] | 55 | small: |
| 56 | echo ALL DONE |
| 57 | |
Bram Moolenaar | a608243 | 2015-12-28 16:26:45 +0100 | [diff] [blame] | 58 | gui: fixff $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) |
Bram Moolenaar | 34b6cb1 | 2008-09-20 14:27:03 +0000 | [diff] [blame] | 59 | echo ALL DONE |
| 60 | |
Bram Moolenaar | a608243 | 2015-12-28 16:26:45 +0100 | [diff] [blame] | 61 | win32: fixff $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_WIN32) |
Bram Moolenaar | 34b6cb1 | 2008-09-20 14:27:03 +0000 | [diff] [blame] | 62 | echo ALL DONE |
| 63 | |
| 64 | fixff: |
| 65 | -$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=dos|upd" +q *.in *.ok |
Bram Moolenaar | 09210ac | 2012-04-13 19:11:20 +0200 | [diff] [blame] | 66 | -$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=unix|upd" +q \ |
Bram Moolenaar | 5311c02 | 2015-12-01 20:19:26 +0100 | [diff] [blame] | 67 | dotest.in test60.ok test71.ok test74.ok test_listchars.ok |
Bram Moolenaar | 34b6cb1 | 2008-09-20 14:27:03 +0000 | [diff] [blame] | 68 | |
| 69 | clean: |
| 70 | -$(DEL) *.out |
| 71 | -$(DEL) test.ok |
| 72 | -$(DEL) small.vim |
| 73 | -$(DEL) tiny.vim |
| 74 | -$(DEL) mbyte.vim |
Bram Moolenaar | 7e506b6 | 2010-01-19 15:55:06 +0100 | [diff] [blame] | 75 | -$(DEL) mzscheme.vim |
Bram Moolenaar | b35c338 | 2012-10-06 19:10:35 +0200 | [diff] [blame] | 76 | -$(DEL) lua.vim |
Bram Moolenaar | 34b6cb1 | 2008-09-20 14:27:03 +0000 | [diff] [blame] | 77 | -$(DEL) X* |
| 78 | -$(DEL) viminfo |
| 79 | |
| 80 | .in.out: |
| 81 | $(CP) $*.ok test.ok |
| 82 | $(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $*.in |
| 83 | diff test.out $*.ok |
| 84 | -$(DEL) $*.out |
| 85 | $(MV) test.out $*.out |
| 86 | -$(DEL) X* |
| 87 | -$(DEL) test.ok |
| 88 | -$(DEL) viminfo |
Bram Moolenaar | fda3729 | 2014-11-05 14:27:36 +0100 | [diff] [blame] | 89 | |
| 90 | bench_re_freeze.out: bench_re_freeze.vim |
| 91 | -$(DEL) benchmark.out |
| 92 | $(VIMPROG) -u dos.vim -U NONE --noplugin $*.in |
| 93 | $(CAT) benchmark.out |