Mercurial > hg > sonic-annotator
comparison tests/test-rdf-writer/test-rdf-writer.sh @ 188:cbbf8a838b47
Add test for Turtle output encoding (must be UTF-8)
author | Chris Cannam |
---|---|
date | Wed, 25 Feb 2015 10:20:17 +0000 |
parents | 7a31201dc42d |
children | 4ef452f5fefc |
comparison
equal
deleted
inserted
replaced
187:889f770abff3 | 188:cbbf8a838b47 |
---|---|
47 rapper -i turtle -c $tmpttl 2>&1 | egrep -q 'Parsing returned [1-9][0-9]+ triples' || | 47 rapper -i turtle -c $tmpttl 2>&1 | egrep -q 'Parsing returned [1-9][0-9]+ triples' || |
48 fail "RDF output contains no triples (?) for detectionfunction and onsets transforms together$note" | 48 fail "RDF output contains no triples (?) for detectionfunction and onsets transforms together$note" |
49 | 49 |
50 done | 50 done |
51 | 51 |
52 # Check the output encoding -- should be valid UTF-8 always | |
53 | |
54 for code in ucs-2 iso-8859-1; do | |
55 $r -t $transformdir/onsets.n3 -w rdf --rdf-stdout $audiopath/id3v2-$code.mp3 2>/dev/null | uconv --from-code utf-8 --to-code utf-8 --from-callback stop >/dev/null || | |
56 fail "RDF/Turtle output from $code input is not valid utf-8 according to uconv" | |
57 done | |
58 | |
52 exit 0 | 59 exit 0 |