]> git.sur5r.net Git - i3/i3status/commitdiff
Added test case for run_watch 178/head
authoreplanet <emeric.planet@gmail.com>
Mon, 14 Nov 2016 21:33:09 +0000 (21:33 +0000)
committereplanet <emeric.planet@gmail.com>
Mon, 14 Nov 2016 21:33:09 +0000 (21:33 +0000)
The valid test case assumes pid 1 exists, which should always
be true on Unix environment.

testcases/004-run-watch/expected_output.txt [new file with mode: 0644]
testcases/004-run-watch/i3status.conf [new file with mode: 0644]
testcases/004-run-watch/pidfile [new file with mode: 0644]

diff --git a/testcases/004-run-watch/expected_output.txt b/testcases/004-run-watch/expected_output.txt
new file mode 100644 (file)
index 0000000..3dbe379
--- /dev/null
@@ -0,0 +1 @@
+EXISTING: yes | NONEXISTANT: no
diff --git a/testcases/004-run-watch/i3status.conf b/testcases/004-run-watch/i3status.conf
new file mode 100644 (file)
index 0000000..95a9bb1
--- /dev/null
@@ -0,0 +1,14 @@
+general {
+        output_format = "none"
+}
+
+order += "run_watch EXISTING"
+order += "run_watch NONEXISTANT"
+
+run_watch EXISTING {
+        pidfile = "testcases/004-run-watch/pidfile"
+}
+
+run_watch NONEXISTANT {
+        pidfile = "testcases/004-run-watch/notexistant"
+}
diff --git a/testcases/004-run-watch/pidfile b/testcases/004-run-watch/pidfile
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1