summaryrefslogtreecommitdiff
path: root/stamp
diff options
context:
space:
mode:
Diffstat (limited to 'stamp')
-rw-r--r--stamp/all.do28
1 files changed, 28 insertions, 0 deletions
diff --git a/stamp/all.do b/stamp/all.do
index e0cd366..d740bf0 100644
--- a/stamp/all.do
+++ b/stamp/all.do
@@ -22,3 +22,31 @@ if [ $a2 -eq $a3 ]; then
else
echo 'FAIL: a2 != a3' >&2
fi
+
+echo 'date +%s | redo-stamp; sleep 1; date +%s' >c.do
+
+redo-ifchange c
+read c1 <c
+
+redo-ifchange c
+read c2 <c
+
+echo 'sleep 1; date +%s' >c.do
+
+redo-ifchange c
+read c3 <c
+
+redo-ifchange c
+read c4 <c
+
+if [ $c1 -lt $c2 ]; then
+ echo 'PASS: c1 < c2' >&2
+else
+ echo 'FAIL: c1 > c2' >&2
+fi
+
+if [ $c3 -eq $c4 ]; then
+ echo 'PASS: c3 = c4' >&2
+else
+ echo 'FAIL: c3 != c4' >&2
+fi