blob: fb6278349c9ff80a70711939782cc592ac5b3ec8 [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 Moolenaar40bbcee2015-12-28 22:24:41 +010027default: vimall
28
Bram Moolenaar7b6156f2015-12-28 16:01:26 +010029include Make_all.mak
30
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000031# Omitted:
32# test2 "\\tmp" doesn't work.
33# test10 'errorformat' is different
34# test12 can't unlink a swap file
35# test25 uses symbolic link
36# test27 can't edit file with "*" in file name
Bram Moolenaar7b6156f2015-12-28 16:01:26 +010037# test54 doesn't work yet
38# test97 \{ and \$ are not escaped characters
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000039
Bram Moolenaar7b6156f2015-12-28 16:01:26 +010040SCRIPTS = $(SCRIPTS_ALL) $(SCRIPTS_MORE1) $(SCRIPTS_MORE4) $(SCRIPTS_WIN32)
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000041
Bram Moolenaarfda37292014-11-05 14:27:36 +010042SCRIPTS_BENCH = bench_re_freeze.out
43
Bram Moolenaara6082432015-12-28 16:26:45 +010044# Must run test1 first to create small.vim.
45$(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32) $(NEW_TESTS): $(SCRIPTS_FIRST)
46
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000047.SUFFIXES: .in .out
48
Bram Moolenaara6082432015-12-28 16:26:45 +010049vimall: fixff $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI) $(SCRIPTS_WIN32)
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000050 echo ALL DONE
51
Bram Moolenaara6082432015-12-28 16:26:45 +010052nongui: fixff $(SCRIPTS_FIRST) $(SCRIPTS)
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000053 echo ALL DONE
54
Bram Moolenaarfda37292014-11-05 14:27:36 +010055benchmark: $(SCRIPTS_BENCH)
56
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000057small:
58 echo ALL DONE
59
Bram Moolenaara6082432015-12-28 16:26:45 +010060gui: fixff $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_GUI)
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000061 echo ALL DONE
62
Bram Moolenaara6082432015-12-28 16:26:45 +010063win32: fixff $(SCRIPTS_FIRST) $(SCRIPTS) $(SCRIPTS_WIN32)
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000064 echo ALL DONE
65
66fixff:
67 -$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=dos|upd" +q *.in *.ok
Bram Moolenaar09210ac2012-04-13 19:11:20 +020068 -$(VIMPROG) -u dos.vim --noplugin "+argdo set ff=unix|upd" +q \
Bram Moolenaar5311c022015-12-01 20:19:26 +010069 dotest.in test60.ok test71.ok test74.ok test_listchars.ok
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000070
71clean:
72 -$(DEL) *.out
73 -$(DEL) test.ok
74 -$(DEL) small.vim
75 -$(DEL) tiny.vim
76 -$(DEL) mbyte.vim
Bram Moolenaar7e506b62010-01-19 15:55:06 +010077 -$(DEL) mzscheme.vim
Bram Moolenaarb35c3382012-10-06 19:10:35 +020078 -$(DEL) lua.vim
Bram Moolenaar34b6cb12008-09-20 14:27:03 +000079 -$(DEL) X*
80 -$(DEL) viminfo
81
82.in.out:
83 $(CP) $*.ok test.ok
84 $(VIMPROG) -u dos.vim -U NONE --noplugin -s dotest.in $*.in
85 diff test.out $*.ok
86 -$(DEL) $*.out
87 $(MV) test.out $*.out
88 -$(DEL) X*
89 -$(DEL) test.ok
90 -$(DEL) viminfo
Bram Moolenaarfda37292014-11-05 14:27:36 +010091
92bench_re_freeze.out: bench_re_freeze.vim
93 -$(DEL) benchmark.out
94 $(VIMPROG) -u dos.vim -U NONE --noplugin $*.in
95 $(CAT) benchmark.out