Added an additional test case and a fix for using the pmset command
The other commands still need to be mocked and tested/fixed, too.
This commit is contained in:
@@ -26,6 +26,15 @@ load ../../plugins/available/battery.plugin
|
||||
assert_output "98"
|
||||
}
|
||||
|
||||
@test 'plugins battery: battery-percentage with pmset, 98.5%' {
|
||||
function pmset {
|
||||
echo "-InternalBattery-0 (id=12345) 98.5%; discharging; 16:00 remaining present: true"
|
||||
}
|
||||
|
||||
run battery_percentage
|
||||
assert_output "98"
|
||||
}
|
||||
|
||||
@test 'plugins battery: battery-percentage with pmset, 4%' {
|
||||
function pmset {
|
||||
echo "-InternalBattery-0 (id=12345) 4%; discharging; 16:00 remaining present: true"
|
||||
|
||||
Reference in New Issue
Block a user