From 8ac36068fc2117526ad5740a2c57712248810a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Thu, 21 Jan 2021 13:40:18 +0100 Subject: [PATCH] cmdlineTests.sh: Add edit and skip options like in isoltest --- test/cmdlineTests.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh index 5d517c306..1c3e23d4a 100755 --- a/test/cmdlineTests.sh +++ b/test/cmdlineTests.sh @@ -87,12 +87,16 @@ function ask_expectation_update then update_expectation "$newExpectation" "$expectationFile" else + local editor="${FCEDIT:-${VISUAL:-${EDITOR:-vi}}}" + while true do - read -N 1 -p "(u)pdate expectation/(q)uit? " + read -N 1 -p "(e)dit/(u)pdate expectations/(s)kip/(q)uit? " echo case $REPLY in + e*) "$editor" "$expectationFile"; break;; u*) update_expectation "$newExpectation" "$expectationFile"; break;; + s*) return;; q*) exit 1;; esac done