diff --git a/t/curse/.gitignore b/t/curse/.gitignore index d99e317..e0a01f9 100644 --- a/t/curse/.gitignore +++ b/t/curse/.gitignore @@ -1,3 +1,5 @@ *.n1 *.n2 *.count +*.countall +countall diff --git a/t/curse/all.do b/t/curse/all.do index 48cf8e5..fc04451 100644 --- a/t/curse/all.do +++ b/t/curse/all.do @@ -1,8 +1,18 @@ +rm -f in.countall out.countall *.count +touch in.countall out.countall +echo x >x.count redo-ifchange 1.n0 2.n0 3.n0 DEPS=$(seq 10 | sed 's/$/.n1/') redo-ifchange $DEPS -COUNT=$(cat *.count | wc -l) -if ! [ "$COUNT" = 100 ]; then - echo "expected 100 writes, got $COUNT" >&2 +COUNT_IN=$(ls *.count | wc -l) +COUNT_OUT=$(cat *.count | wc -l) +if [ "$COUNT_IN" != "$COUNT_OUT" ]; then + echo "expected $COUNT_IN individual writes, got $COUNT_OUT" >&2 exit 42 fi +COUNTALL_IN=$(cat in.countall | wc -l) +COUNTALL_OUT=$(cat out.countall | wc -l) +if [ "$COUNTALL_IN" != "$COUNTALL_OUT" ]; then + echo "expected $COUNTALL_IN allwrites, got $COUNTALL_OUT" >&2 + exit 43 +fi diff --git a/t/curse/clean.do b/t/curse/clean.do index f8bd9bb..c34c50e 100644 --- a/t/curse/clean.do +++ b/t/curse/clean.do @@ -1,2 +1,3 @@ -rm -f *~ .*~ *.n1 *.n2 *.tmp *.count +rm -f *~ .*~ *.n1 *.n2 *.tmp *.count countall *.countall + diff --git a/t/curse/countall.do b/t/curse/countall.do new file mode 100644 index 0000000..10edc7c --- /dev/null +++ b/t/curse/countall.do @@ -0,0 +1,2 @@ +echo $1 >>out.countall +echo hello diff --git a/t/curse/default.n2.do b/t/curse/default.n2.do index 99675e2..ad037fa 100644 --- a/t/curse/default.n2.do +++ b/t/curse/default.n2.do @@ -1,2 +1,4 @@ echo n2-$1 echo $1 >>$1.count +echo $1 >>in.countall +redo countall