Merge pull request #178 from eplanet/ut_cpu_temp
Unit testing some new cases
This commit is contained in:
commit
7b63102b9d
1
testcases/002-cpu-temp/expected_output.txt
Normal file
1
testcases/002-cpu-temp/expected_output.txt
Normal file
@ -0,0 +1 @@
|
||||
T: 42 °C
|
10
testcases/002-cpu-temp/i3status.conf
Normal file
10
testcases/002-cpu-temp/i3status.conf
Normal file
@ -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"
|
||||
}
|
1
testcases/002-cpu-temp/temp1_input
Normal file
1
testcases/002-cpu-temp/temp1_input
Normal file
@ -0,0 +1 @@
|
||||
42000
|
1
testcases/003-path-exists/expected_output.txt
Normal file
1
testcases/003-path-exists/expected_output.txt
Normal file
@ -0,0 +1 @@
|
||||
EXISTING: yes | NONEXISTANT: no
|
14
testcases/003-path-exists/i3status.conf
Normal file
14
testcases/003-path-exists/i3status.conf
Normal file
@ -0,0 +1,14 @@
|
||||
general {
|
||||
output_format = "none"
|
||||
}
|
||||
|
||||
order += "path_exists EXISTING"
|
||||
order += "path_exists NONEXISTANT"
|
||||
|
||||
path_exists EXISTING {
|
||||
path = "testcases/003-path-exists"
|
||||
}
|
||||
|
||||
path_exists NONEXISTANT {
|
||||
path = "testcases/003-path-exists/nonexistant"
|
||||
}
|
1
testcases/004-run-watch/expected_output.txt
Normal file
1
testcases/004-run-watch/expected_output.txt
Normal file
@ -0,0 +1 @@
|
||||
EXISTING: yes | NONEXISTANT: no
|
14
testcases/004-run-watch/i3status.conf
Normal file
14
testcases/004-run-watch/i3status.conf
Normal file
@ -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"
|
||||
}
|
1
testcases/004-run-watch/pidfile
Normal file
1
testcases/004-run-watch/pidfile
Normal file
@ -0,0 +1 @@
|
||||
1
|
Loading…
Reference in New Issue
Block a user