1 # This may have been leftover from a previous run, when switching
2 # between "real" redo and minimal/do, so clean it up.
6 echo 'echo hello' >touch1.do
8 [ -e touch1 ] || exit 55
9 [ "$(cat touch1)" = "hello" ] || exit 56
11 # ensure that 'redo touch1' always re-runs touch1.do even if we have
12 # already built touch1 in this session, and even if touch1 already exists.
13 echo 'echo hello2' >touch1.do
15 [ "$(cat touch1)" = "hello2" ] || exit 57
17 # ensure that touch1 is rebuilt even if it got deleted after the last redo
18 # inside the same session. Also ensure that we can produce a zero-byte
19 # output file explicitly.
21 echo 'touch $3' >touch1.do
23 [ -e touch1 ] || exit 66
24 [ -z "$(cat touch1)" ] || exit 67
26 # Also test that zero bytes of output does not create the file at all, as
27 # opposed to creating a zero-byte file.
29 echo 'touch touch1-ran' >touch1.do
31 [ -e touch1 ] && exit 75
32 [ -e touch1-ran ] || exit 76
35 # Make sure that redo-ifchange *won't* rebuild touch1 if we have already
36 # built it, even if building it did not produce an output file.
38 [ -e touch1 ] && exit 77
39 [ -e touch1-ran ] && exit 78