source: trunk/third/sed/testsuite/Makefile.am @ 17271

Revision 17271, 4.4 KB checked in by ghudson, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r17270, which included commits to RCS files with non-trunk default branches.
Line 
1SED=$(top_builddir)/sed/sed
2#TIME=time
3CMP=cmp
4RM=rm -f
5
6CLEANFILES = tmp* core *.core
7DISTCLEANFILES = version.good
8
9#We're not currently set up for testing the way automake would
10#like us to be.
11#TESTS = basics othersedcmds cmdlines
12check: basics othersedcmds cmdlines
13
14EXTRA_DIST = \
15        Makefile.in \
16        enable.good enable.inp enable.sed \
17        sep.good sep.inp sep.sed \
18        inclib.good inclib.inp inclib.sed \
19        8bit.good 8bit.inp 8bit.sed \
20        newjis.good newjis.inp  newjis.sed \
21        manis.inp manis.sed \
22        xabcx.good xabcx.inp xabcx.sed \
23        dollar.good dollar.inp dollar.sed \
24        noeol.good noeol.inp noeol.sed \
25        numsub.good numsub.inp numsub.sed \
26        allsub.good allsub.sed \
27        subwrite.inp subwrite.sed  subwrt1.good subwrt2.good \
28        head.good head.inp head.sed \
29        madding.good madding.inp madding.sed \
30        mac-mf.good mac-mf.inp mac-mf.sed \
31        empty.good empty.inp empty.sed \
32        8to7.good 8to7.sed \
33        cv-vars.good cv-vars.inp cv-vars.sed \
34        middle.good middle.sed \
35        khadafy.inp khadafy.sed \
36        spencer.inp spencer.sh \
37        linecnt.good linecnt.inp linecnt.sed \
38        distrib.good distrib.inp distrib.sed distrib.sh \
39        writeout.inp writeout.sed wrtout1.good wrtout2.good \
40        readin.good readin.in2 readin.inp readin.sed \
41        dc.good dc.inp \
42        help.good version.gin
43
44CORE_BASICS = \
45        enable sep inclib 8bit newjis xabcx dollar noeol \
46        numsub head madding mac-mf empty
47
48
49basics: $(CORE_BASICS) manis allsub 8to7 cv-vars middle
50othersedcmds: subwrite khadafy linecnt distrib writeout readin dc
51cmdlines: help version file quiet
52
53#NOTE: the "spencer" test suite is no longer run by default, because
54# it: a) tests EREs instead of BREs; and b) tests using EREs with
55# undefined semantics.  One can still explicitly "make spencer" if
56# desired, but its use is depreciated.  A replacement BRE tester
57# will written for a later revision of sed.
58
59
60
61$(CORE_BASICS) linecnt::
62        $(TIME) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp > tmp.$@
63        $(CMP) $(srcdir)/$@.good tmp.$@
64        @$(RM) tmp.$@
65
66manis khadafy::
67        $(TIME) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp > tmp.$@
68        $(CMP) $(srcdir)/$@.inp tmp.$@
69        @$(RM) tmp.$@
70
71allsub::
72        $(TIME) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/numsub.inp > tmp.$@
73        $(CMP) $(srcdir)/$@.good tmp.$@
74        @$(RM) tmp.$@
75
768to7::
77        $(TIME) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/8bit.inp > tmp.$@
78        $(CMP) $(srcdir)/$@.good tmp.$@
79        @$(RM) tmp.$@
80
81cv-vars::
82        $(TIME) $(SED) -n -f $(srcdir)/$@.sed < $(srcdir)/$@.inp > tmp.$@
83        $(CMP) $(srcdir)/$@.good tmp.$@
84        @$(RM) tmp.$@
85
86middle::
87        $(TIME) $(SED) -n -f $(srcdir)/$@.sed < $(srcdir)/head.inp > tmp.$@
88        $(CMP) $(srcdir)/$@.good tmp.$@
89        @$(RM) tmp.$@
90
91subwrite::
92        $(TIME) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp > tmp.1$@
93        $(CMP) $(srcdir)/subwrt1.good tmp.1$@
94        $(CMP) $(srcdir)/subwrt2.good tmp.subwrite-w
95        @$(RM) tmp.1$@ tmp.subwrite-w
96
97spencer::
98        sh $(srcdir)/$@.sh $(SED) <  $(srcdir)/$@.inp > tmp.$@
99        $(TIME) sh tmp.$@
100        @$(RM) tmp.$@
101
102distrib::
103        $(TIME) sh $(srcdir)/$@.sh $(SED) < $(srcdir)/$@.inp > tmp.$@
104        $(CMP) $(srcdir)/$@.good tmp.$@
105        @$(RM) tmp.$@
106
107writeout::
108        $(TIME) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp >tmp.1$@
109        $(CMP) $(srcdir)/wrtout1.good tmp.1$@
110        $(CMP) $(srcdir)/wrtout2.good tmp.writeout-w
111        @$(RM) tmp.1$@ tmp.writeout-w
112
113readin::
114        @test -f $@.in2 || cp $(srcdir)/$@.in2 $@.in2
115        $(TIME) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp >tmp.$@
116        $(CMP) $(srcdir)/$@.good tmp.$@
117        @$(RM) tmp.$@
118
119dc::
120        @echo "Patience, the dc.sed test is expected to take a while..."
121        $(TIME) $(SED) -n -f $(top_srcdir)/dc.sed < $(srcdir)/$@.inp >tmp.$@
122        $(CMP) $(srcdir)/$@.good tmp.$@
123        @$(RM) tmp.$@
124
125#
126# cmdlines targets
127#
128
129help::
130        $(SED) --help | $(SED) '1s/ [^ ]* / sed /' > tmp.1$@
131        $(SED) -h | $(SED) '1s/ [^ ]* / sed /' > tmp.2$@
132        -$(SED) 2>&1 | $(SED) '1s/ [^ ]* / sed /' > tmp.3$@ || true
133        $(CMP) $(srcdir)/$@.good tmp.1$@
134        $(CMP) tmp.1$@ tmp.2$@
135        $(CMP) tmp.2$@ tmp.3$@
136        @$(RM) tmp.1$@ tmp.2$@ tmp.3$@
137
138version:: version.good
139        $(SED) --version  > tmp.1$@ 2>&1
140        $(SED) -V > tmp.2$@ 2>&1
141        $(CMP) $@.good tmp.1$@
142        $(CMP) $@.good tmp.2$@
143        @$(RM) tmp.1$@ tmp.2$@
144
145file::
146        $(TIME) $(SED) --file=$(srcdir)/newjis.sed < $(srcdir)/newjis.inp > tmp.$@
147        $(CMP) $(srcdir)/newjis.good tmp.$@
148        @$(RM) tmp.$@
149
150quiet::
151        $(TIME) $(SED) --quiet -f $(srcdir)/cv-vars.sed \
152                < $(srcdir)/cv-vars.inp > tmp.$@
153        $(CMP) $(srcdir)/cv-vars.good tmp.$@
154        @$(RM) tmp.$@
155
156
157# automake won't cooperate with me and let me AC_OUTPUT() this,
158# so I need to special-case this:
159version.good: $(srcdir)/version.gin Makefile
160        $(SED) 's^@'VERSION'@^@VERSION@^' $(srcdir)/version.gin > tmp-$@
161        mv tmp-$@ $@
Note: See TracBrowser for help on using the repository browser.