* [PATCH V2] remote-helpers/test-bzr.sh: do not use grep \s
@ 2013-04-07 9:23 Torsten Bögershausen
0 siblings, 0 replies; only message in thread
From: Torsten Bögershausen @ 2013-04-07 9:23 UTC (permalink / raw)
To: git, tboegi; +Cc: felipe.contreras, sunshine, sunshine
Using grep "devel\s\+3:" to find at least one whitespace
is not portable on all grep versions:
Not all grep versions understand "\s" as a "whitespace".
The + as a qualifier for "one or more" is not a basic regular expression:
use egrep instead of grep.
Use a literal TAB followed by SPACE like this [ ] instead,
which is more portable than [:space:]
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
contrib/remote-helpers/test-hg.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh
index 5f81dfa..7bb81f2 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/contrib/remote-helpers/test-hg.sh
@@ -115,7 +115,7 @@ test_expect_success 'update bookmark' '
git push
) &&
- hg -R hgrepo bookmarks | grep "devel\s\+3:"
+ hg -R hgrepo bookmarks | egrep "devel[ ]+3:"
'
test_done
--
1.8.2.341.g543621f
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-04-07 9:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-07 9:23 [PATCH V2] remote-helpers/test-bzr.sh: do not use grep \s Torsten Bögershausen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).