From 7fcd6afefed3743c3e03aa38743823f2ef6bae66 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Fri, 30 Sep 2016 12:14:54 +1300 Subject: [PATCH] Fix testcase macro to handle no CGI parameters (cherry picked from commit d0f82a221750f178a942a5db5f37614622b718b8) --- xapian-applications/omega/omegatest | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xapian-applications/omega/omegatest b/xapian-applications/omega/omegatest index 149b07a11..392e689df 100755 --- a/xapian-applications/omega/omegatest +++ b/xapian-applications/omega/omegatest @@ -52,6 +52,9 @@ failed=0 testcase() { expected=$1 shift + # If there are no positional parameters, pass one as otherwise omega will + # wait for parameters on stdin. + [ "$#" != 0 ] || set - dummy output=`$FAKETIME ${FAKE_NOW+"$FAKE_NOW"} "$OMEGA" "$@"` if [ "$output" != "$expected" ] ; then echo "$OMEGA $@:" -- 2.11.4.GIT