VirtualBox

source: kBuild/vendor/sed/current/testsuite/Makefile.tests

Last change on this file was 599, checked in by bird, 18 years ago

GNU sed 4.1.5.

File size: 4.8 KB
Line 
1# Testsuite makefile for GNU sed
2
3SHELL = /bin/sh
4
5# These are only fallback values. They are usually overridden by runtest.
6srcdir = .
7SED = ../sed/sed
8SEDENV = LC_ALL=C $(TIME)
9
10#TIME=time
11CMP=cmp
12RM=rm -f
13
14enable sep inclib 8bit 8to7 newjis xabcx dollar noeol bkslashes \
15numsub head madding mac-mf empty xbxcx xbxcx3 recall recall2 xemacs \
16appquit fasts uniq manis linecnt khadafy allsub flipcase space modulo \
17y-bracket y-newline::
18 $(SEDENV) $(SED) -f $(srcdir)/$@.sed \
19 < $(srcdir)/$@.inp > $@.out
20 $(CMP) $(srcdir)/$@.good $@.out
21 @$(RM) $@.out
22
230range::
24 $(SEDENV) $(SED) -s -f $(srcdir)/$@.sed < $(srcdir)/$@.inp > $@.out
25 $(CMP) $(srcdir)/$@.good $@.out
26 @$(RM) $@.out
27
28# This checks for a bug in 3.02 and 3.02.80
29stdin::
30 ($(SEDENV) $(SED) d; $(SEDENV) $(SED) G) < $(srcdir)/numsub.inp > $@.1out
31 $(SEDENV) cat $(srcdir)/numsub.inp | ($(SEDENV) $(SED) d; $(SEDENV) $(SED) G) > $@.2out
32 $(CMP) $@.1out $@.2out
33 @$(RM) $@.1out $@.2out
34
35cv-vars classes middle dc distrib factor numsub2 numsub3 numsub4 numsub5 \
36insens::
37 $(SEDENV) $(SED) -n -f $(srcdir)/$@.sed < $(srcdir)/$@.inp > $@.out
38 $(CMP) $(srcdir)/$@.good $@.out
39 @$(RM) $@.out
40
41noeolw::
42 $(SEDENV) $(SED) -n -f $(srcdir)/$@.sed \
43 $(srcdir)/noeol.inp $(srcdir)/noeol.inp > $@.out
44 $(CMP) $(srcdir)/$@.good $@.out
45 $(CMP) $(srcdir)/$@.1good $@.1out
46 $(CMP) $(srcdir)/$@.2good $@.2out
47 @$(RM) $@.1out $@.2out $@.out
48
49subwrite::
50 $(SEDENV) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp > $@.1out
51 $(CMP) $(srcdir)/subwrt1.good $@.1out
52 $(CMP) $(srcdir)/subwrt2.good $@.wout
53 @$(RM) $@.1out $@.wout
54
55bsd::
56 $(SEDENV) sh $(srcdir)/$@.sh '$(SED)' bsd.out
57 $(CMP) $(srcdir)/$@.good $@.out
58 @$(RM) $@.out
59
60writeout::
61 $(SEDENV) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp >$@.1out
62 $(CMP) $(srcdir)/wrtout1.good $@.1out
63 $(CMP) $(srcdir)/wrtout2.good $@.wout
64 @$(RM) $@.1out $@.wout
65
66readin.in2: $(srcdir)/readin.in2
67 cat $(srcdir)/readin.in2 > $@
68
69readin:: readin.in2
70 $(SEDENV) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp >$@.out
71 $(CMP) $(srcdir)/$@.good $@.out
72 @$(RM) $@.out
73
74eval.in2: $(srcdir)/eval.inp
75 cat $(srcdir)/eval.inp > $@
76
77eval:: eval.in2
78 $(SEDENV) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp > $@.out
79 $(CMP) $(srcdir)/$@.good $@.out
80 @$(RM) $@.out
81
82binary binary2 binary3::
83 $(SEDENV) $(SED) -n -f $(srcdir)/$@.sed < $(srcdir)/binary.inp >$@.out
84 $(CMP) $(srcdir)/binary.good $@.out
85 @$(RM) $@.out
86
87#
88# cmdlines targets
89#
90
91help::
92 $(SED) --help | $(SED) '1s/ [^ ]* / sed /' > $@.1out
93 $(SED) 2>&1 | $(SED) '1s/ [^ ]* / sed /' > $@.2out || :
94 $(CMP) $@.1out $@.2out
95 @$(RM) $@.1out $@.2out
96
97version::
98 $(SED) 's^@'VERSION'@^$(VERSION)^' $(srcdir)/version.gin > $@.good
99 $(SEDENV) $(SED) --version > $@.out 2>&1
100 $(CMP) $@.good $@.out
101 @$(RM) $@.good $@.out
102
103file::
104 $(SEDENV) $(SED) --file=$(srcdir)/newjis.sed \
105 < $(srcdir)/newjis.inp > $@.out
106 $(CMP) $(srcdir)/newjis.good $@.out
107 @$(RM) $@.out
108
109quiet::
110 $(SEDENV) $(SED) --quiet -f $(srcdir)/cv-vars.sed \
111 < $(srcdir)/cv-vars.inp > $@.out
112 $(CMP) $(srcdir)/cv-vars.good $@.out
113 @$(RM) $@.out
114
115# The following target is not used in super sed builds (only GNU sed)
116
117bug-regex7$(EXEEXT) bug-regex8$(EXEEXT) bug-regex9$(EXEEXT) \
118bug-regex10$(EXEEXT) bug-regex11$(EXEEXT) bug-regex12$(EXEEXT) \
119bug-regex13$(EXEEXT) bug-regex14$(EXEEXT) bug-regex15$(EXEEXT) bug-regex16$(EXEEXT) \
120bug-regex21$(EXEEXT) runtests$(EXEEXT) runptests$(EXEEXT)::
121 echo "$(SEDENV) ./$@ > `echo $@ | $(SED) s/$(EXEEXT)$$/.log/`"
122 @$(SEDENV) ./$@ > `echo $@ | $(SED) s/$(EXEEXT)$$/.log/`
123
124tst-pcre$(EXEEXT)::
125 $(SEDENV) ./tst-pcre $(srcdir)/PCRE.tests > tst-pcre.log
126
127tst-boost$(EXEEXT)::
128 $(SEDENV) ./tst-boost $(srcdir)/BOOST.tests > tst-boost.log
129
130tst-rxspencer$(EXEEXT)::
131 $(SEDENV) ./tst-rxspencer $(srcdir)/SPENCER.tests > tst-spencer.log
132
133tst-regex2$(EXEEXT)::
134 $(SEDENV) ./tst-regex2 $(srcdir)/tst-regex2.c > tst-regex2.log
135
136# The following target is not used in GNU sed builds (only super-sed)
137
138pcretest$(EXEEXT)::
139 $(SEDENV) ./pcretest $(srcdir)/pcre1.inp pcre1.out
140 $(CMP) $(srcdir)/pcre1.good pcre1.out
141 #$(SEDENV) ./pcretest -p $(srcdir)/pcre1.inp pcre1p.out
142 #$(CMP) $(srcdir)/pcre1p.good pcre1p.out
143 $(SEDENV) ./pcretest -P $(srcdir)/pcre2.inp pcre2.out
144 $(CMP) $(srcdir)/pcre2.good pcre2.out
145 $(SEDENV) ./pcretest -P -p $(srcdir)/pcre2.inp pcre2p.out
146 $(CMP) $(srcdir)/pcre2p.good pcre2p.out
147 $(SEDENV) ./pcretest $(srcdir)/pcre3.inp pcre3.out
148 $(CMP) $(srcdir)/pcre3.good pcre3.out
149 $(SEDENV) ./pcretest -p $(srcdir)/pcre3.inp pcre3p.out
150 $(CMP) $(srcdir)/pcre3p.good pcre3p.out
151 @$(RM) pcre*.out
152
153.PHONY: \
154bug-regex7$(EXEEXT) bug-regex8$(EXEEXT) bug-regex9$(EXEEXT) \
155bug-regex10$(EXEEXT) bug-regex11$(EXEEXT) bug-regex12$(EXEEXT) \
156bug-regex13$(EXEEXT) bug-regex14$(EXEEXT) bug-regex15$(EXEEXT) bug-regex16$(EXEEXT) \
157bug-regex21$(EXEEXT) runtests$(EXEEXT) runptests$(EXEEXT) tst-regex2$(EXEEXT) \
158tst-pcre$(EXEEXT) tst-boost$(EXEEXT) tst-rxspencer$(EXEEXT) pcretest$(EXEEXT)
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette