xmlspec tests not being evaluated

Petr Sumbera <[email protected]> Thu, 14 Nov 2013 14:49:46 +0100
Newsgroups gmane.comp.gnome.lib.xslt
Message-ID <[email protected]>
Hi,

after applying following commit on very old libxslt version I was 
wondering why I'm getting test error.

https://git.gnome.org/browse/libxslt/commit/?id=ecb6bcb8d1b7e44842edde3929f412d46b40c89f

It turned out that newer versions are not properly evaluating results.

Please see attached patch which solved the issue. Note that beside 
enabling diff evaluation and handling id format change it also makes 
output less verbose (removes info about parsing time from output).

Thanks,

Petr

_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
[email protected]
https://mail.gnome.org/mailman/listinfo/xslt
libxslt.patch (text/plain, 1.8 KB)
diff --git a/tests/xmlspec/Makefile.am b/tests/xmlspec/Makefile.am
index 123d02e..c831a85 100644
--- a/tests/xmlspec/Makefile.am
+++ b/tests/xmlspec/Makefile.am
@@ -20,27 +20,25 @@ test tests: $(top_builddir)/xsltproc/xsltproc
 		$(srcdir)/REC-xml-2e.xsl $(srcdir)/REC-xml-20001006.xml \
 		> REC-xml-20001006.out 2> debug ; \
 	  diff $(srcdir)/REC-xml-20001006.html REC-xml-20001006.out | \
-		grep -v 'id[0-9]' | grep -v -- '---' | grep -v 100 | grep -v 3866 ; \
+		grep -v 'id[mp0-9][0-9]' | grep -v -- '---' | grep -v '^[0-9]*c[0-9]*$$' ; \
 	  grep implemented debug | sort | uniq -c || true; \
-	  grep " ms$$" debug || true; \
-	  grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" || true`
-	@if [ -n "$$log" ] ; then \
+	  grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" || true`; \
+	  if [ -n "$$log" ] ; then \
 	  	echo REC-xml-20001006 result ; \
 		echo "$$log" ; \
-	fi
+	  fi
 	@rm -f REC-xml-20001006.out
 	@log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc  \
 		-timing --param show.diff.markup 1 \
 		$(srcdir)/REC-xml-2e.xsl $(srcdir)/REC-xml-20001006.xml \
 		> REC-xml-20001006-review.out 2> debug ; \
 	  diff $(srcdir)/REC-xml-20001006-review.html REC-xml-20001006-review.out | \
-		grep -v 'id[0-9]' | grep -v -- '---' | grep -v 117 | grep -v 4066 ; \
+		grep -v 'id[mp0-9][0-9]' | grep -v -- '---' | grep -v '^[0-9]*c[0-9]*$$' ; \
 	  grep implemented debug | sort | uniq -c || true; \
-	  grep " ms$$" debug || true; \
-	  grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" || true`
-	@if [ -n "$$log" ] ; then \
+	  grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0" || true`; \
+	  if [ -n "$$log" ] ; then \
 	  	echo "REC-xml-20001006 (show.diff.markup) result" ; \
 		echo "$$log" ; \
-	fi
+	  fi
 	@rm -f REC-xml-20001006-review.out