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