From 562f6e383d84e16ad3ff9d9c777c89e8150a924f Mon Sep 17 00:00:00 2001 From: Mihai Coman Date: Tue, 15 Nov 2016 13:34:06 +0200 Subject: Add unit tests for threshold format --- .../005-cpu-temp-max-threshold-format/expected_output.txt | 1 + testcases/005-cpu-temp-max-threshold-format/i3status.conf | 11 +++++++++++ testcases/005-cpu-temp-max-threshold-format/temp1_input | 1 + 3 files changed, 13 insertions(+) create mode 100644 testcases/005-cpu-temp-max-threshold-format/expected_output.txt create mode 100644 testcases/005-cpu-temp-max-threshold-format/i3status.conf create mode 100644 testcases/005-cpu-temp-max-threshold-format/temp1_input (limited to 'testcases/005-cpu-temp-max-threshold-format') diff --git a/testcases/005-cpu-temp-max-threshold-format/expected_output.txt b/testcases/005-cpu-temp-max-threshold-format/expected_output.txt new file mode 100644 index 0000000..5ba90c9 --- /dev/null +++ b/testcases/005-cpu-temp-max-threshold-format/expected_output.txt @@ -0,0 +1 @@ +ABOVE_THRESHOLD: 50 °C diff --git a/testcases/005-cpu-temp-max-threshold-format/i3status.conf b/testcases/005-cpu-temp-max-threshold-format/i3status.conf new file mode 100644 index 0000000..10c6b3c --- /dev/null +++ b/testcases/005-cpu-temp-max-threshold-format/i3status.conf @@ -0,0 +1,11 @@ +general { + output_format = "none" +} + +order += "cpu_temperature 0" + +cpu_temperature 0 { + format_above_threshold = "ABOVE_THRESHOLD: %degrees °C" + max_threshold = 45 + path = "testcases/005-cpu-temp-max-threshold-format/temp1_input" +} diff --git a/testcases/005-cpu-temp-max-threshold-format/temp1_input b/testcases/005-cpu-temp-max-threshold-format/temp1_input new file mode 100644 index 0000000..ccfc37a --- /dev/null +++ b/testcases/005-cpu-temp-max-threshold-format/temp1_input @@ -0,0 +1 @@ +50000 -- cgit v1.2.3