trivial diff: fix test case for --use-subdirs

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Jun 6 21:09:33 AEST 1998


Estimated hours taken: 0.25

tests/invalid/Mmakefile:
	Allow tests to pass if the output matches either the .err_exp
	file or the .err_exp2 file (if any).

tests/invalid/missing_interface_import.err_exp2:
	Add an alternative expected output for this test case,
	since the output is different depending on whether
	or not it gets compiled with --use-subdirs.

Index: tests/invalid/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/invalid/Mmakefile,v
retrieving revision 1.17
diff -u -r1.17 Mmakefile
--- Mmakefile	1998/04/09 03:59:07	1.17
+++ Mmakefile	1998/06/06 11:04:08
@@ -75,9 +75,13 @@
 	if $(MC) $(MCFLAGS) --errorcheck-only $* > $*.err 2>&1; \
 	then false; else true; fi
 
+# Some tests have more than one possible valid output, so
+# we allow the test to pass if it matches *either* the .err_exp
+# or the .err_exp2 file. 
 %.err_res: %.err %.err_exp
 	-rm -f $@
-	diff -c $*.err_exp $*.err > $@
+	diff -c $*.err_exp $*.err > $@ || \
+		{ [ -f $*.err_exp2 ] && diff -c $*.err_exp2 $*.err > $@; }
 
 all:	check
 
cvs diff: tests/invalid/missing_interface_import.err_exp2 is a new entry, no comparison available
--- tests/invalid/missing_interface_import.err_exp	Wed Mar  4 04:47:55 1998
+++ tests/invalid/missing_interface_import.err_exp2	Sat Jun  6 21:03:18 1998
@@ -4,5 +4,5 @@
 missing_interface_import.m:009:   error: undefined type `std_util:univ'/0.
 missing_interface_import.m:010: In definition of predicate `missing_interface_import:q'/1:
 missing_interface_import.m:010:   error: undefined type `list'/1.
-`missing_interface_import.int' not written.
+`Mercury/ints/missing_interface_import.int' not written.
 For more information, try recompiling with `-E'.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list