blob: 393c60d9e33969352b77eba8d3ea8bc9898129a8 [file] [log] [blame]
Bram Moolenaar68392722010-07-30 22:04:17 +02001#
2# Makefile to run all tests for Vim, on Dos-like machines
Bram Moolenaar34b6cb12008-09-20 14:27:03 +00003# 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
11ifneq (sh.exe, $(SHELL))
12DEL = rm -f
13MV = mv
14CP = cp
Bram Moolenaarfda37292014-11-05 14:27:36 +010015CAT = cat
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000016DIRSLASH = /
17else
18DEL = del
19MV = rename
20CP = copy
Bram Moolenaarfda37292014-11-05 14:27:36 +010021CAT = type
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000022DIRSLASH = \\
23endif
24
25VIMPROG = ..$(DIRSLASH)vim
26
Bram Moolenaar7b6156f2015-12-28 16:01:26 +010027include Make_all.mak
28
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000029# 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 Moolenaar7b6156f2015-12-28 16:01:26 +010035# test54 doesn't work yet
36# test97 \{ and \$ are not escaped characters
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000037
Bram Moolenaar7b6156f2015-12-28 16:01:26 +010038SCRIPTS = $(SCRIPTS_ALL) $(SCRIPTS_MORE1) $(SCRIPTS_MORE4) $(SCRIPTS_WIN32)
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000039
Bram Moolenaarfda37292014-11-05 14:27:36 +010040SCRIPTS_BENCH = bench_re_freeze.out
41
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000042.SUFFIXES: .in .out
43
Bram Moolenaar7b6156f2015-12-28 16:01:26 +010044vimall: fixff $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32)
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000045 echo ALL DONE
46
Bram Moolenaar7b6156f2015-12-28 16:01:26 +010047nongui: fixff $(SCRIPTS)
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000048 echo ALL DONE
49
Bram Moolenaarfda37292014-11-05 14:27:36 +010050benchmark: $(SCRIPTS_BENCH)
51
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000052small:
53 echo ALL DONE
54
Bram Moolenaar7b6156f2015-12-28 16:01:26 +010055gui: fixff $(SCRIPTS) $(SCRIPTS_GUI)
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000056 echo ALL DONE
57
Bram Moolenaar7b6156f2015-12-28 16:01:26 +010058win32: fixff $(SCRIPTS) $(SCRIPTS_WIN32)
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000059 echo ALL DONE
60
61fixff:
62 -$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=dos|upd" +q *.in *.ok
Bram Moolenaar09210ac2012-04-13 19:11:20 +020063 -$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=unix|upd" +q \
Bram Moolenaar5311c022015-12-01 20:19:26 +010064 dotest.in test60.ok test71.ok test74.ok test_listchars.ok
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000065
66clean:
67 -$(DEL) *.out
68 -$(DEL) test.ok
69 -$(DEL) small.vim
70 -$(DEL) tiny.vim
71 -$(DEL) mbyte.vim
Bram Moolenaar7e506b62010-01-19 15:55:06 +010072 -$(DEL) mzscheme.vim
Bram Moolenaarb35c3382012-10-06 19:10:35 +020073 -$(DEL) lua.vim
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000074 -$(DEL) X*
75 -$(DEL) viminfo
76
77.in.out:
78 $(CP) $*.ok test.ok
79 $(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $*.in
80 diff test.out $*.ok
81 -$(DEL) $*.out
82 $(MV) test.out $*.out
83 -$(DEL) X*
84 -$(DEL) test.ok
85 -$(DEL) viminfo
Bram Moolenaarfda37292014-11-05 14:27:36 +010086
87bench_re_freeze.out: bench_re_freeze.vim
88 -$(DEL) benchmark.out
89 $(VIMPROG) -u dos.vim -U NONE --noplugin $*.in
90 $(CAT) benchmark.out