Skip to content

Commit

Permalink
Don't use seq in tests, not everyone has it
Browse files Browse the repository at this point in the history
For example Mac OS X lacks the seq command.  So we cannot use it
there.  A good old while loop works just as good.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Shawn O. Pearce committed May 2, 2007
1 parent cbc6bda commit b3431bc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions t/t5302-pack-index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ test_expect_success \
'setup' \
'rm -rf .git
git-init &&
for i in `seq -w 100`
i=1 &&
while test $i -le 100
do
i=`printf '%03i' $i`
echo $i >file_$i &&
test-genrandom "$i" 8192 >>file_$i &&
git-update-index --add file_$i || return 1
git-update-index --add file_$i &&
i=`expr $i + 1` || return 1
done &&
{ echo 101 && test-genrandom 100 8192; } >file_101 &&
git-update-index --add file_101 &&
Expand Down

0 comments on commit b3431bc

Please sign in to comment.