[PATCH] Fix use of wc in t0000-basic
authorDaniel Barkalow <barkalow@iabervon.org>
Sat, 21 May 2005 00:49:13 +0000 (20:49 -0400)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 21 May 2005 01:03:47 +0000 (18:03 -0700)
The version of wc I have (GNU textutils-2.1) puts spaces at the beginning
of lines. This patch should work for any version of wc.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Acked-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
t/t0000-basic.sh
index 9a557129d98b499bcd601903d6646de29ba4bfc5..6fb7b1a1255ffc82f9484ff343283e9913267aed 100755 (executable)
@@ -32,7 +32,7 @@ test_expect_success \
 find .git/objects -type d -print >full-of-directories
 test_expect_success \
     '.git/objects should have 256 subdirectories.' \
-    'test "$(wc -l full-of-directories | sed -e "s/ .*//")" = 257'
+    'test $(cat full-of-directories | wc -l) = 257'
 
 ################################################################
 # Basics of the basics