From 445ee1fa4a9e82250d21c66ba957a1e19077efd9 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 24 Nov 2024 18:01:02 +0100 Subject: tests(infrastructure/driver): Support setting the golden file --- tests/infrastructure/driver.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/infrastructure/driver.sh') diff --git a/tests/infrastructure/driver.sh b/tests/infrastructure/driver.sh index 52f7d3ad..f8688161 100644 --- a/tests/infrastructure/driver.sh +++ b/tests/infrastructure/driver.sh @@ -63,6 +63,15 @@ __test_eval() { ;; esac ;; + "SetGolden") + msg "Trying to set '$args' as golden file." + [ -f "$args" ] || { + msg "Argument is not a file!" + exit 1 + } + printf "%s" "$args" >"$__TEST_EVAL_GOLDEN_FILE" + msg "Set golden file to: '$args'" + ;; *) msg "Unrecognized command: '$cmd'" exit 1 -- cgit 1.4.1