[m-rev.] diff: fix string_format test problems under cygwin

Peter Ross pro at missioncriticalit.com
Thu Dec 5 19:45:13 AEDT 2002


On Thu, Dec 05, 2002 at 03:25:18PM +1100, Fergus Henderson wrote:
> On 02-Nov-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> > Fix a problem with the tests on a text mount under cygwin.  For some
> > unknown reason, the .sorted_out file produced contains ^M's when using
> > mmake.  They don't occur when creating the output from the shell prompt.
> 
> > @@ -76,7 +76,7 @@
> >  	@echo "Comparing $*.sorted_out with $*.exp*,"
> >  	@echo "	results in $@"
> >  	@-rm -f $@ $*.res[1-5]
> > -	@cat $*.out | sort > $*.sorted_out
> > +	@cat $*.out | sort | sed -e 's/$$//g' > $*.sorted_out
> 
> Could you try
> 
> 	@sort < $*.out > $*.sorted_out
> 
> and/or
> 
> 	@sort $*.out > $*.sorted_out
> 


Estimated hours taken: 0.1
Branches: main

tests/general/string_format/Mmakefile:
	Rather than using cat to pipe the file to sort, pass it as an
	argument.  This avoids using sed to normalise the output.

Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/general/string_format/Mmakefile,v
retrieving revision 1.8
diff -u -r1.8 Mmakefile
--- Mmakefile	2 Dec 2002 12:40:20 -0000	1.8
+++ Mmakefile	5 Dec 2002 08:42:32 -0000
@@ -76,7 +76,7 @@
 	@echo "Comparing $*.sorted_out with $*.exp*,"
 	@echo "	results in $@"
 	@-rm -f $@ $*.res[1-5]
-	@cat $*.out | sort | sed -e 's/
$$//g' > $*.sorted_out
+	@sort $*.out > $*.sorted_out
 	@{ diff $(DIFF_OPTS) $*.exp $*.sorted_out > $*.res1 && \
 		echo "Matched $*.exp" && \
 		cp $*.res1 $@; } || \

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list