]> git.sur5r.net Git - i3/i3status/commitdiff
Added unit test case for CPU temperature
authoreplanet <emeric.planet@gmail.com>
Mon, 14 Nov 2016 20:58:58 +0000 (20:58 +0000)
committereplanet <emeric.planet@gmail.com>
Mon, 14 Nov 2016 20:58:58 +0000 (20:58 +0000)
testcases/002-cpu-temp/expected_output.txt [new file with mode: 0644]
testcases/002-cpu-temp/i3status.conf [new file with mode: 0644]
testcases/002-cpu-temp/temp1_input [new file with mode: 0644]

diff --git a/testcases/002-cpu-temp/expected_output.txt b/testcases/002-cpu-temp/expected_output.txt
new file mode 100644 (file)
index 0000000..e46afa8
--- /dev/null
@@ -0,0 +1 @@
+T: 42 °C
diff --git a/testcases/002-cpu-temp/i3status.conf b/testcases/002-cpu-temp/i3status.conf
new file mode 100644 (file)
index 0000000..d83b32d
--- /dev/null
@@ -0,0 +1,10 @@
+general {
+        output_format = "none"
+}
+
+order = "cpu_temperature 0"
+
+cpu_temperature 0 {
+        format = "T: %degrees °C"
+        path = "testcases/002-cpu-temp/temp1_input"
+}
diff --git a/testcases/002-cpu-temp/temp1_input b/testcases/002-cpu-temp/temp1_input
new file mode 100644 (file)
index 0000000..6096bd1
--- /dev/null
@@ -0,0 +1 @@
+42000