diff tests/test-summaries.sh @ 59:52b9d58edb78

Ensure expected output (as well as test output) gets canonicalised before comparison. The test in question still fails -- I think now only because of plugin output ordering changes (prior to svcore rev f3fd2988fc9b it also had picked up some incorrect output feature types)
author Chris Cannam
date Mon, 09 Jan 2012 16:30:44 +0000
parents 94d988cef54e
children fae326c22df5
line wrap: on
line diff
--- a/tests/test-summaries.sh	Mon Jan 09 14:55:17 2012 +0000
+++ b/tests/test-summaries.sh	Mon Jan 09 16:30:44 2012 +0000
@@ -6,10 +6,11 @@
 infile=$mypath/audio/3clicks8.wav
 tmpfile=$mypath/tmp_1_$$
 tmpcanonical=$mypath/tmp_2_$$
+expcanonical=$mypath/tmp_exp_2_$$
 tmpcmp1=$mypath/tmp_3_$$
 tmpcmp2=$mypath/tmp_4_$$
 
-trap "rm -f $tmpfile $tmpcanonical $tmpcmp1 $tmpcmp2" 0
+trap "rm -f $tmpfile $tmpcanonical $expcanonical $tmpcmp1 $tmpcmp2" 0
 
 . test-include.sh
 
@@ -77,8 +78,11 @@
 rapper -i turtle $tmpfile -o turtle 2>/dev/null | grep -v '^@prefix :' | grep -v 'file:/' > $tmpcanonical ||
     fail "Fails to produce parseable RDF/TTL for transform $stransform"
 
-compare $tmpcanonical ${sexpected}.n3 || \
-    faildiff "Output mismatch for canonicalised version of transform $stransform" $tmpcanonical ${sexpected}.n3
+rapper -i turtle ${sexpected}.n3 -o turtle 2>/dev/null | grep -v '^@prefix :' | grep -v 'file:/' > $expcanonical ||
+    fail "Internal error: Failed to canonicalise expected output file $expected.n3"
+
+compare $tmpcanonical $expcanonical || \
+    faildiff "Output mismatch for canonicalised version of transform $stransform" $tmpcanonical $expcanonical
 
 exit 0