>From c5daae5ae3cca0cebd72a3ee57ecfe6bf63d8b83 Mon Sep 17 00:00:00 2001 From: Assaf Gordon Date: Tue, 26 Jun 2018 05:04:45 -0600 Subject: [PATCH] tests: accept getopt errors without single-quotes On OpenBSD 6.2, invalid single options produce error messages without single quotes: $ ./src/chroot -/ chroot: unknown option -- / As opposed to other systems: ./src/chroot: invalid option -- '/' Modify the grep search to accept this. * tests/misc/usage_vs_getopt.sh (checkprg): Change the grep pattern to accomodate no-single-quotes cases. --- tests/misc/usage_vs_getopt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/misc/usage_vs_getopt.sh b/tests/misc/usage_vs_getopt.sh index aec1c6da2..c20e15ada 100755 --- a/tests/misc/usage_vs_getopt.sh +++ b/tests/misc/usage_vs_getopt.sh @@ -36,7 +36,7 @@ checkprg () { # Append the pattern for a short unknown option. returns_ $rcexp $prg -/ >/dev/null 2> err || fail=1 - grep -F "'/'" err || framework_failure_ + grep " '*/'*\$" err || framework_failure_ sed -n "1s/'\/'/'OPT'/p" < err >> pat || framework_failure_ # Get output for --help. -- 2.11.0