Follow upstream changes -- Bytestring updates
[git-darcs-import.git] / bugs / issue390_whatsnew.sh
blob09a954e6275440680d0f70c63dc6e1b36053bcc4
1 #!/usr/bin/env bash
3 # For issue390: darcs whatsnew somefile" lstats every file in the working copy and pristine/ directory
5 set -ev
7 rm -rf temp
8 mkdir temp
9 cd temp
10 darcs init
11 date > file1
12 date > file2
13 darcs add file*
14 darcs record -am "test"
16 TRACE=`which strace`
17 if test -x $TRACE
18 then
19 strace darcs whatsnew file1 &> out
20 # we should be accessing file1
21 grep file1 out
22 # but shouldn't be accessing file2
23 if grep file2 out
24 then
25 echo A whatsnew for file1 should not involve a 'stat' call to file2
26 exit 1
27 else
28 echo Yay. We pass.
30 else
31 echo skipping test since strace was not found
34 rm -rf temp