Mercurial > hg > sonic-annotator
diff tests/include.sh @ 248:c8e5fcddf8be
Merge
author | Chris Cannam |
---|---|
date | Fri, 18 Mar 2016 15:15:55 +0000 |
parents | 4941e8b167c0 |
children | 46d3a6461b4a |
line wrap: on
line diff
--- a/tests/include.sh Fri Mar 18 15:15:37 2016 +0000 +++ b/tests/include.sh Fri Mar 18 15:15:55 2016 +0000 @@ -13,8 +13,8 @@ ;; esac -version=1.3 -nextversion=1.4 +version=1.4 +nextversion=1.5 testdir=$mypath/.. r=$testdir/../sonic-annotator @@ -60,11 +60,13 @@ } jsoncompare() { + # The Sonic Annotator version number appears in the JAMS output -- + # filter that out, and also reformat to ignore whitespace differences a="$1" b="$2" - cat "$a" | json_reformat > "${a}__" - cat "$b" | json_reformat > "${b}__" - cmp -s "$a" "$b" + cat "$a" | sed 's/Sonic Annotator v[0-9.]*/Sonic Annotator vXXX/' | json_reformat > "${a}__" + cat "$b" | sed 's/Sonic Annotator v[0-9.]*/Sonic Annotator vXXX/' | json_reformat > "${b}__" + cmp -s "${a}__" "${b}__" rv=$? rm "${a}__" "${b}__" return $rv @@ -81,7 +83,7 @@ echo "--" cat "$3" echo "--" - echo "Diff:" + echo "Diff (output on left, expected on right):" echo "--" sdiff -w78 "$2" "$3" echo "--"