Add t/deps/basic, to test basic autodependency behaviour.
Unfortunately it failed before the previous patch, so that's why this test is needed :( The test is a little ugly, because the bug I'm testing for didn't happen except if you ran 'redo' two times in a row, not two times inside the same redo session. That's because dependency caching inside the one session prevents the accidental rebuild.
This commit is contained in:
parent
f337df463d
commit
3fcd677428
7 changed files with 23 additions and 3 deletions
2
t/deps/basic/.gitignore
vendored
Normal file
2
t/deps/basic/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
*.log
|
||||
*.out
|
||||
1
t/deps/basic/1.in
Normal file
1
t/deps/basic/1.in
Normal file
|
|
@ -0,0 +1 @@
|
|||
this is 1
|
||||
1
t/deps/basic/2.in
Normal file
1
t/deps/basic/2.in
Normal file
|
|
@ -0,0 +1 @@
|
|||
this is 2
|
||||
3
t/deps/basic/default.out.do
Normal file
3
t/deps/basic/default.out.do
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
redo-ifchange $1.in
|
||||
echo $$
|
||||
echo $$ >>$1.log
|
||||
12
t/deps/basic/test.do
Normal file
12
t/deps/basic/test.do
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
rm -f *.out *.log
|
||||
|
||||
. ../../flush-cache.sh
|
||||
redo-ifchange 1.out 2.out
|
||||
[ "$(cat 1.log | wc -l)" = 1 ] || exit 55
|
||||
[ "$(cat 2.log | wc -l)" = 1 ] || exit 56
|
||||
. ../../flush-cache.sh
|
||||
touch 1.in
|
||||
redo-ifchange 1.out 2.out
|
||||
[ "$(cat 1.log | wc -l)" = 2 ] || exit 57
|
||||
[ "$(cat 2.log | wc -l)" = 1 ] || exit 58
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue