apenwarr-redo/t/ifcreate-test.do
Avery Pennarun 94c254de77 Rename flush-cache.py to flush-cache, and rearrange the code a bit.
It was working fine, but the style wasn't exactly the way I like it, because
I'm unnecessarily picky. :)

Also, removed the file extension since we should probably learn from the
fact that it's already been rewritten once from one language to another.
Who knows, maybe it will be again someday.
2011-02-23 01:27:41 -08:00

21 lines
582 B
Text

rm -f exists ifcreate[12] ifcreate[12].log ifcreate[12].dep
. ./skip-if-minimal-do.sh
touch exists
redo-ifcreate exists 2>/dev/null && exit 91
rm exists
redo-ifcreate exists || exit 92
for d in 1 2; do
redo ifcreate$d
[ "$(wc -l <ifcreate$d.log)" -eq 1 ] || exit ${d}1
redo-ifchange ifcreate$d
[ "$(wc -l <ifcreate$d.log)" -eq 1 ] || exit ${d}2
./flush-cache
touch ifcreate$d.dep
redo-ifchange ifcreate$d
[ "$(wc -l <ifcreate$d.log)" -eq 2 ] || exit ${d}3
./flush-cache
rm ifcreate$d.dep
redo-ifchange ifcreate$d
[ "$(wc -l <ifcreate$d.log)" -eq 3 ] || exit ${d}4
done