From 14462092f8835abb38bb281888176f9f24655ca9 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Fri, 15 Jan 2016 16:35:03 +0100 Subject: [PATCH] test-lib: improve on previous fix With GNU "grep" \b works but it's safer to use "egrep" which is also POSIX rather than "grep" as not all the "grep"s out there might support \b. License: MIT Signed-off-by: Christian Couder --- test/sharness/lib/test-lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sharness/lib/test-lib.sh b/test/sharness/lib/test-lib.sh index f88ac6b2c49..e2c27f7ba0c 100644 --- a/test/sharness/lib/test-lib.sh +++ b/test/sharness/lib/test-lib.sh @@ -321,7 +321,7 @@ test_should_contain() { test_str_contains() { find=$1 shift - echo "$@" | grep "\b$find\b" >/dev/null + echo "$@" | egrep "\b$find\b" >/dev/null } disk_usage() {