diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2025-06-21 13:41:12 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2025-06-29 14:36:10 +0200 |
commit | b45003b748a166babdf5a3e567d7633ba31100f4 (patch) | |
tree | 58cbb873843645af3b640702ac02051ea9ecd4da /test/html/driver.sh | |
parent | ff0ddad450acf53bb5a65106f361af447305c747 (diff) |
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
Diffstat (limited to 'test/html/driver.sh')
-rwxr-xr-x | test/html/driver.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/html/driver.sh b/test/html/driver.sh index 07a78b84..e4fbc739 100755 --- a/test/html/driver.sh +++ b/test/html/driver.sh @@ -93,7 +93,7 @@ function test_file() { render_page "$ref_file" "$wdir/ref.png" # AE = Absolute Error count of the number of different pixels - diffcount=$(compare -metric AE "$wdir/html.png" "$wdir/ref.png" "$wdir/diff.png" 2>&1 || true) + diffcount=$(compare -metric AE "$wdir/html.png" "$wdir/ref.png" "$wdir/diff.png" 2>&1 | cut -d ' ' -f 1 || true) # The test passes only if both images are identical if [ "$diffcount" = "0" ]; then |