From ec6f61949b88cb494ea64308cb20ce5893887f8d Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Fri, 19 Nov 2010 00:55:36 -0800 Subject: [PATCH] t/curse: test to make sure the same file isn't generated more than once. redo currently passes this when running serially, but not in parallel. --- t/curse/.gitignore | 1 + t/curse/all.do | 5 +++++ t/curse/clean.do | 3 ++- t/curse/default.n2.do | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/t/curse/.gitignore b/t/curse/.gitignore index ef540df..d99e317 100644 --- a/t/curse/.gitignore +++ b/t/curse/.gitignore @@ -1,2 +1,3 @@ *.n1 *.n2 +*.count diff --git a/t/curse/all.do b/t/curse/all.do index 675d041..48cf8e5 100644 --- a/t/curse/all.do +++ b/t/curse/all.do @@ -1,3 +1,8 @@ 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 + exit 42 +fi diff --git a/t/curse/clean.do b/t/curse/clean.do index 6b093db..f8bd9bb 100644 --- a/t/curse/clean.do +++ b/t/curse/clean.do @@ -1 +1,2 @@ -rm -f *~ .*~ *.n1 *.n2 *.tmp +rm -f *~ .*~ *.n1 *.n2 *.tmp *.count + diff --git a/t/curse/default.n2.do b/t/curse/default.n2.do index fd6689c..99675e2 100644 --- a/t/curse/default.n2.do +++ b/t/curse/default.n2.do @@ -1 +1,2 @@ echo n2-$1 +echo $1 >>$1.count