summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-04-20 11:25:03 +0100
committerLars Wirzenius <liw@liw.fi>2013-04-20 11:25:03 +0100
commit389f0a3d444e113b3ca36baa72306b404f1ae6f4 (patch)
tree29e777706f11532339baab061c03e689067974f8 /tests
parent963664a6d980a4e425e557f766408d23f0de4a32 (diff)
downloaddesktop-cronish-389f0a3d444e113b3ca36baa72306b404f1ae6f4.tar.gz
Fix trigger-file
Diffstat (limited to 'tests')
-rwxr-xr-xtests/mtime-new.script12
-rwxr-xr-xtests/mtime-nofile.script11
-rw-r--r--tests/mtime-nofile.stdout1
-rwxr-xr-xtests/mtime-old.script11
-rw-r--r--tests/mtime-old.stdout1
5 files changed, 21 insertions, 15 deletions
diff --git a/tests/mtime-new.script b/tests/mtime-new.script
index 2d1f28e..ae1338c 100755
--- a/tests/mtime-new.script
+++ b/tests/mtime-new.script
@@ -2,13 +2,15 @@
set -eu
-touch "$DATADIR/foo.trigger"
-cat <<EOF > "$DATADIR/foo.tasks"
+touch "$DATADIR/mtime-new.trigger"
+touch "$DATADIR/mtime-new.out"
+cat <<EOF > "$DATADIR/mtime-new.tasks"
date:
- trigger-file: $DATADIR/foo.trigger
+ trigger-file: $DATADIR/mtime-new.trigger
trigger-age: 10
- command: echo triggered > $DATADIR/foo.out
+ command: echo triggered > $DATADIR/mtime-new.out
EOF
-./desktop-cronish --quiet --max-jobs 5 "$DATADIR/foo.tasks"
+./desktop-cronish --quiet --max-jobs 5 "$DATADIR/mtime-new.tasks"
+cat "$DATADIR/mtime-new.out"
diff --git a/tests/mtime-nofile.script b/tests/mtime-nofile.script
index 9a04a71..772becc 100755
--- a/tests/mtime-nofile.script
+++ b/tests/mtime-nofile.script
@@ -2,13 +2,14 @@
set -eu
-rm -f "$DATADIR/foo.trigger"
-cat <<EOF > "$DATADIR/foo.tasks"
+rm -f "$DATADIR/mtime-nofile.trigger"
+cat <<EOF > "$DATADIR/mtime-nofile.tasks"
date:
- trigger-file: $DATADIR/foo.trigger
+ trigger-file: $DATADIR/mtime-nofile.trigger
trigger-age: 10
- command: echo triggered > $DATADIR/foo.out
+ command: echo triggered > $DATADIR/mtime-nofile.out
EOF
-./desktop-cronish --quiet --max-jobs 1 "$DATADIR/foo.tasks"
+./desktop-cronish --quiet --max-jobs 1 "$DATADIR/mtime-nofile.tasks"
+cat "$DATADIR/mtime-nofile.out"
diff --git a/tests/mtime-nofile.stdout b/tests/mtime-nofile.stdout
new file mode 100644
index 0000000..bd20802
--- /dev/null
+++ b/tests/mtime-nofile.stdout
@@ -0,0 +1 @@
+triggered
diff --git a/tests/mtime-old.script b/tests/mtime-old.script
index a14ad25..b58b53e 100755
--- a/tests/mtime-old.script
+++ b/tests/mtime-old.script
@@ -2,13 +2,14 @@
set -eu
-touch -t 197001010000.00 "$DATADIR/foo.trigger"
-cat <<EOF > "$DATADIR/foo.tasks"
+touch -t 197001010000.00 "$DATADIR/mtime-old.trigger"
+cat <<EOF > "$DATADIR/mtime-old.tasks"
date:
- trigger-file: $DATADIR/foo.trigger
+ trigger-file: $DATADIR/mtime-old.trigger
trigger-age: 10
- command: echo triggered > $DATADIR/foo.out
+ command: echo triggered > $DATADIR/mtime-old.out
EOF
-./desktop-cronish --quiet --max-jobs 5 "$DATADIR/foo.tasks"
+./desktop-cronish --quiet --max-jobs 5 "$DATADIR/mtime-old.tasks"
+cat "$DATADIR/mtime-old.out"
diff --git a/tests/mtime-old.stdout b/tests/mtime-old.stdout
new file mode 100644
index 0000000..bd20802
--- /dev/null
+++ b/tests/mtime-old.stdout
@@ -0,0 +1 @@
+triggered