Skip to content

Commit

Permalink
add image compare to vtest
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Sep 17, 2013
1 parent fbb2361 commit c2daabe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vtest/README
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ The shell script "gen" creates a subdirectory with the
html file "vtest.html" for visual compare including all needed
image files.

Add a new test:
- clone a mscz test file into xxx.mscz
- create the test by editing the xxx.mscz file
- create reference png xxx-ref.png:
mscore xxx.mscz -o -r 130 xxx-ref.png


5 changes: 5 additions & 0 deletions vtest/gen
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/sh

#
# "compare" - image magick compare program
#
SRC="mmrest-1 fmrest-1"

MSCORE=../build.debug/mscore/mscore
Expand All @@ -14,6 +17,7 @@ for src in $SRC; do
echo process ../$src
cp ../$src-ref.png .
../$MSCORE ../$src.mscz -r $DPI -o $src.png
compare $src-1.png $src-ref.png $src-diff.png
done

rm -f $F
Expand All @@ -23,6 +27,7 @@ for src in $SRC; do
echo " <h2>$src</h2></br>" >> $F
echo " <img src=\"$src-1.png\">" >> $F
echo " <img src=\"$src-ref.png\">" >> $F
echo " <img src=\"$src-diff.png\">" >> $F
done
echo " </body>" >> $F
echo "</html>" >> $F
Expand Down

0 comments on commit c2daabe

Please sign in to comment.