libdisplay-info/test/edid-print-check.sh
Pekka Paalanen f70fa58441 test: add high-level API test
This new test exercises all existing high-level API to make sure the
output does not change unexpectedly.

Unlike with edid-decode tests, these new print tests do not have an
externally defined groundtruth. They are only to detect changes and
exercise code paths.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2022-11-09 14:18:04 +02:00

13 lines
209 B
Bash
Executable file

#!/bin/sh -eu
workdir="$(mktemp -d)"
cleanup() {
rm -rf "$workdir"
}
trap cleanup EXIT
edid="$1"
ref="${edid%.edid}.print"
"$DI_EDID_PRINT" <"$edid" >"$workdir/printout"
diff -u "$ref" "$workdir/printout"