Skip to content

Commit b45003b

Browse files
committed
Fix compare output in HTML test driver
Newer versions output two numbers instead of just one, so we pick the first number: ++ compare -metric AE b-div.html_wdir/{html.png,ref.png,diff.png} + diffcount='0 (0)' + '[' '0 (0)' = 0 ']' + echo FAIL FAIL
1 parent ff0ddad commit b45003b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/html/driver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function test_file() {
9393
render_page "$ref_file" "$wdir/ref.png"
9494

9595
# AE = Absolute Error count of the number of different pixels
96-
diffcount=$(compare -metric AE "$wdir/html.png" "$wdir/ref.png" "$wdir/diff.png" 2>&1 || true)
96+
diffcount=$(compare -metric AE "$wdir/html.png" "$wdir/ref.png" "$wdir/diff.png" 2>&1 | cut -d ' ' -f 1 || true)
9797

9898
# The test passes only if both images are identical
9999
if [ "$diffcount" = "0" ]; then

0 commit comments

Comments
 (0)