summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreplanet <emeric.planet@gmail.com>2016-11-14 20:58:58 +0000
committereplanet <emeric.planet@gmail.com>2016-11-14 20:58:58 +0000
commit7c9108c9b99f53fad7a56f0d2a3d3c1bbbad5906 (patch)
tree1dde7e2fc82bdaee5ec829c4808293e8302796bf
parentb0af4e4c8543d8cdfd8bc7cd68b760d9d66e927c (diff)
Added unit test case for CPU temperature
-rw-r--r--testcases/002-cpu-temp/expected_output.txt1
-rw-r--r--testcases/002-cpu-temp/i3status.conf10
-rw-r--r--testcases/002-cpu-temp/temp1_input1
3 files changed, 12 insertions, 0 deletions
diff --git a/testcases/002-cpu-temp/expected_output.txt b/testcases/002-cpu-temp/expected_output.txt
new file mode 100644
index 0000000..e46afa8
--- /dev/null
+++ b/testcases/002-cpu-temp/expected_output.txt
@@ -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
index 0000000..d83b32d
--- /dev/null
+++ b/testcases/002-cpu-temp/i3status.conf
@@ -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
index 0000000..6096bd1
--- /dev/null
+++ b/testcases/002-cpu-temp/temp1_input
@@ -0,0 +1 @@
+42000