git » firstones » commit e74a381

test: Show a command to accept http rendering diffs

author Alberto Bertogli
2025-06-09 09:25:42 UTC
committer Alberto Bertogli
2025-06-09 09:25:42 UTC
parent 99f369f40d4fe1830c54419bf9d4fc66ed231d01

test: Show a command to accept http rendering diffs

Just out of convenience, when a http rendering test fails, show
a command we can use to update the goldens to match the new render.

test/run.sh +2 -0

diff --git a/test/run.sh b/test/run.sh
index b00297c..4947e40 100755
--- a/test/run.sh
+++ b/test/run.sh
@@ -132,6 +132,8 @@ function http_get_and_compare() {
 		then
 			echo "ERROR: http/$1.jpg differs from .5-http/$1.jpg" \
 				> ".5-http/$1.failed"
+			echo "  accept: cp 'test/.5-http/$1.jpg' 'test/http/$1.jpg'" \
+				>> ".5-http/$1.failed"
 			exit 1
 		fi
 	fi