Skip to content

Commit

Permalink
add header in visual tests to identify current and reference images
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Dec 3, 2013
1 parent ec1c7ed commit 63ee4cc
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
11 changes: 11 additions & 0 deletions vtest/gen
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,20 @@ for src in $SRC; do
compare $src-1.png $src-ref.png $src-diff.png
done

cp -f ../style.css .

rm -f $F
echo "<html>" >> $F
echo " <head>" >> $F
echo " <link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">" >> $F
echo " </head>" >> $F
echo " <body>" >> $F
echo " <div id=\"topbar\">" >> $F
echo " <span>Current</span>" >> $F
echo " <span>Reference</span>" >> $F
echo " <span>Comparison</span>" >> $F
echo " </div>" >> $F
echo " <div id=\"topmargin\"></div>" >> $F
for src in $SRC; do
echo " <h2 id=\"$src\">$src <a class=\"toc-anchor\" href=\"#$src\">#</a></h2>" >> $F
echo " <div>" >> $F
Expand Down
13 changes: 12 additions & 1 deletion vtest/gen.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set SRC=mmrest-1,bravura-mmrest,mmrest-2,mmrest-4,mmrest-5,mmrest-6,mmrest-7,mmr
noteheadposition-1,valign-1,emmentaler-1,bravura-1,emmentaler-2,bravura-2, ^
emmentaler-3,bravura-3,emmentaler-4,bravura-4,emmentaler-5,bravura-5, ^
emmentaler-6,bravura-6,emmentaler-7,bravura-7, ^
emmentaler-8,bravura-8,emmentaler-9,bravura-9
emmentaler-8,bravura-8,emmentaler-9,bravura-9,emmentaler-10,bravura-10

set MSCORE=..\win32install\bin\mscore.exe
set DPI=130
Expand All @@ -25,10 +25,21 @@ FOR /D %%a IN (%SRC%) DO (
compare -metric AE -fuzz 50% %%a-1.png %%a-ref.png %%a-diff.png
)

xcopy ..\style.css .

del /q %F%

echo ^<html^> >> %F%
echo ^<head^> >> %F%
echo ^<link rel="stylesheet" type="text/css" href="style.css"^> >> %F%
echo ^<head^> >> %F%
echo ^<body^> >> %F%
echo ^<div id="topbar"^> >> %F%
echo ^<span^>Current^</span^> >> %F%
echo ^<span^>Reference^</span^> >> %F%
echo ^<span^>Comparison^</span^> >> %F%
echo ^</div^> >> %F%
echo ^<div id="topmargin"^>^</div^> >> %F%
FOR /D %%a IN (%SRC%) DO (
echo ^<h2 id="%%a"^>%%a ^<a class="toc-anchor" href="#%%a"^>#^</a^>^</h2^> >> %F%
echo ^<div^> >> %F%
Expand Down
19 changes: 19 additions & 0 deletions vtest/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#topbar {
border-bottom:1px solid #eb7429;
background:#fc9453;
padding:10px 20px;
position:fixed;
top:0;
left:0;
z-index:2000;
width:100%;
}

#topbar span {
float:left;
width:512px;
}

#topmargin {
height:20px;
}

0 comments on commit 63ee4cc

Please sign in to comment.