Simplified ioreg, added tests for no status
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user