]> git.ipfire.org Git - thirdparty/git.git/blame - t/t0010-racy-git.sh
t2104: style fixes
[thirdparty/git.git] / t / t0010-racy-git.sh
CommitLineData
29e4d363
JH
1#!/bin/sh
2
3test_description='racy GIT'
4
c150064d 5TEST_PASSES_SANITIZE_LEAK=true
29e4d363
JH
6. ./test-lib.sh
7
8# This test can give false success if your machine is sufficiently
9# slow or your trial happened to happen on second boundary.
10
407c8eb0 11for trial in 0 1 2 3 4
29e4d363
JH
12do
13 rm -f .git/index
14 echo frotz >infocom
407c8eb0 15 git update-index --add infocom
29e4d363
JH
16 echo xyzzy >infocom
17
8fc5593c 18 files=$(git diff-files -p)
29e4d363 19 test_expect_success \
407c8eb0 20 "Racy GIT trial #$trial part A" \
29e4d363 21 'test "" != "$files"'
407c8eb0
JH
22
23 sleep 1
24 echo xyzzy >cornerstone
25 git update-index --add cornerstone
26
8fc5593c 27 files=$(git diff-files -p)
407c8eb0
JH
28 test_expect_success \
29 "Racy GIT trial #$trial part B" \
30 'test "" != "$files"'
31
29e4d363
JH
32done
33
34test_done