Skip to contentSkip to conversation

t9401: Use tr to handle TAB

PATCH New Torsten Bögershausen 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 t9401: Use tr to handle TAB

Not all sed versions understand \s as whitespace
Use tr to translate '\t' into ' ' before feeding the line into sed

---
 t/t9401-git-cvsserver-crlf.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
t/t9401-git-cvsserver-crlf.sh +1 -1
index cdb8360..f2ec9d2 100755
@@ -46,7 +46,7 @@ check_status_options() {
 	echo "Error from cvs status: $1 $2" >> "${WORKDIR}/marked.log"
 	return 1;
     fi
-    got="$(sed -n -e 's/^\s*Sticky Options:\s*//p' "${WORKDIR}/status.out")"
+    got="$(tr '\t' ' ' < "${WORKDIR}/status.out" | sed -n -e 's/^ *Sticky Options: *//p')"
     expect="$3"
     if [ x"$expect" = x"" ] ; then
 	expect="(none)"
Signature · 1 line
1.7.12