Simplified ioreg, added tests for no status

This commit is contained in:
Nils Winkler
2017-10-24 07:32:00 +02:00
parent 6b97283cbf
commit 601202e816
2 changed files with 19 additions and 1 deletions

View File

@@ -71,6 +71,15 @@ function setup_pmset {
assert_output "4"
}
@test 'plugins battery: battery-percentage with pmset, no status' {
setup_command_exists "pmset"
setup_pmset ""
run battery_percentage
assert_output "-1"
}
#######################
#
# acpi
@@ -254,3 +263,12 @@ function setup_ioreg {
run battery_percentage
assert_output "4"
}
@test 'plugins battery: battery-percentage with ioreg, no status' {
setup_command_exists "ioreg"
setup_ioreg ""
run battery_percentage
assert_output "0"
}