remote-helpers/test-bzr.sh: do not use grep \s
PATCH 1/1 remote-helpers/test-bzr.sh: do not use grep \s
Using grep "devel\s\+3:" to find at least one whitspace is not portable on all grep versions:
Not all grep versions understand "\s" as a "whitespace".
Use a literal TAB followed by SPACE like this [ ] instead.
The + as a qualifier for "one or more" is not a basic regular expression:
use egrep instead of grep.
--- contrib/remote-helpers/test-hg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
contrib/remote-helpers/test-hg.sh +1 -1
@@ -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
Signature · 1 line
1.8.2.341.g543621f
Quoted 7 lines · Torsten Bögershausen
Using grep "devel\s\+3:" to find at least one whitspace is not portable on all grep versions:
Not all grep versions understand "\s" as a "whitespace".Use a literal TAB followed by SPACE like this [ ] instead. The + as a qualifier for "one or more" is not a basic regular expression:
use egrep instead of grep.
If "\t" is not possible, I would rather use [:space:].
Cheers.
Signature · 1 line
Felipe Contreras
Quoted 1 line · Torsten Bögershausen
Using grep "devel\s\+3:" to find at least one whitspace
s/whitspace/whitespace/
Quoted 8 lines
is not portable on all grep versions:
Not all grep versions understand "\s" as a "whitespace".Use a literal TAB followed by SPACE like this [ ] instead. The + as a qualifier for "one or more" is not a basic regular expression:
use egrep instead of grep.Signed-off-by Torsten Bögershausen <[email protected]>