3 # test for broken time stamps
7 not
() { "$@" && exit 1 ||
:; }
14 echo this is my favorite
test > foobar
16 sleep 2 # so the time stamps won't accidentally be identical
17 darcs record
-am 'add foobar'
19 HASHVAL
=0000000025-4cbbfd8ce543076b132b13b60ae06d0189ee80b4d5908abb5e060d331d25eb5c
21 if test -d _darcs
/pristine.hashed
;
23 ls _darcs
/pristine.hashed
24 test -f _darcs
/pristine.hashed
/$HASHVAL
25 # verify that the modification time of the file in the pristine cache
26 # is identical to the modification time of the file in the working
28 not
test foobar
-ot _darcs
/pristine.hashed
/$HASHVAL
29 not
test foobar
-nt _darcs
/pristine.hashed
/$HASHVAL
31 not
test foobar
-ot _darcs
/pristine
/foobar
32 not
test foobar
-nt _darcs
/pristine
/foobar
35 # Now let's verify that the test actually works...
40 if test -d _darcs
/pristine.hashed
;
42 not
test foobar
-ot _darcs
/pristine.hashed
/$HASHVAL
43 test foobar
-nt _darcs
/pristine.hashed
/$HASHVAL
45 not
test foobar
-ot _darcs
/pristine
/foobar
46 test foobar
-nt _darcs
/pristine
/foobar