[m-dev.] diff: Re-enable DD test cases

Mark Anthony BROWN dougl at cs.mu.OZ.AU
Tue Jan 25 14:37:43 AEDT 2000


Fergus Henderson writes:
> 
> On 25-Jan-2000, Mark Anthony BROWN <dougl at cs.mu.OZ.AU> wrote:
> > tests/Mmake.common:
> > 	Return the appropriate exit status when making the *.res file.
> ...
> >  	diff $(DIFF_OPTS) $*.exp $*.out > $@ || \
> > |		{ test -f $*.exp2 && \
> > |			if diff $(DIFF_OPTS) $*.exp2 $*.out > $*.res2; then \
> >  				cp $*.res2 $@; \
> > |			else \
> > |				{ test `wc -l < $@` -le `wc -l < $*.res2` || \
> > |					cp $*.res2 $@; } && false; \
> > |			fi \
> > |		}
> 
> You need a `;' after the `fi' before the `}'.
> Otherwise it won't work with all versions of /bin/sh.
> 

D'Oh!  I'll commit the following now.

Estimated hours taken: 0.1

tests/Mmake.common:
	Fix a missing `;' which could cause problems with
	some versions of sh.

Index: tests/Mmake.common
===================================================================
RCS file: /home/mercury1/repository/tests/Mmake.common,v
retrieving revision 1.18
diff -u -r1.18 Mmake.common
--- tests/Mmake.common	2000/01/24 13:55:47	1.18
+++ tests/Mmake.common	2000/01/25 03:08:39
@@ -48,7 +48,7 @@
 			else \
 				{ test `wc -l < $@` -le `wc -l < $*.res2` || \
 					cp $*.res2 $@; } && false; \
-			fi \
+			fi; \
 		}
 
 #-----------------------------------------------------------------------------#


-- 
Mark Brown, PhD student            )O+  |  "Another of Fortran's breakthroughs
(m.brown at cs.mu.oz.au)                   |  was the GOTO statement, which was...
Dept. of Computer Science and Software  |  uniquely simple and understandable"
Engineering, University of Melbourne    |              -- IEEE, 1994
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list