diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2018-08-17 19:53:26 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2018-08-17 19:53:26 +0300 |
commit | df0c2198a0a7cb523c3d3428e1d70cb49018cd60 (patch) | |
tree | dc4599772b1560e30c55c0670d25b198fb5c72e9 /test/segments/battery.spec | |
parent | 8e966e3636ce7c7162b60763088252b7111985e5 (diff) |
Fix tests
Diffstat (limited to 'test/segments/battery.spec')
-rwxr-xr-x | test/segments/battery.spec | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/segments/battery.spec b/test/segments/battery.spec index 201f4a79..79e25d6f 100755 --- a/test/segments/battery.spec +++ b/test/segments/battery.spec @@ -69,7 +69,7 @@ function testBatterySegmentIfBatteryIsLowWhileDischargingOnOSX() { makeBatterySay "Now drawing from 'Battery Power' -InternalBattery-0 (id=1234567) 4%; discharging; 0:05 remaining present: true" - assertEquals "%K{000} %F{009}🔋 %f%F{009}4%% (0:05) " "$(prompt_battery left 1 false ${FOLDER})" + assertEquals "%K{000} %F{001}🔋 %f%F{001}4%% (0:05) " "$(prompt_battery left 1 false ${FOLDER})" } function testBatterySegmentIfBatteryIsLowWhileChargingOnOSX() { @@ -77,7 +77,7 @@ function testBatterySegmentIfBatteryIsLowWhileChargingOnOSX() { makeBatterySay "Now drawing from 'Battery Power' -InternalBattery-0 (id=1234567) 4%; charging; 0:05 remaining present: true" - assertEquals "%K{000} %F{011}🔋 %f%F{011}4%% (0:05) " "$(prompt_battery left 1 false ${FOLDER})" + assertEquals "%K{000} %F{003}🔋 %f%F{003}4%% (0:05) " "$(prompt_battery left 1 false ${FOLDER})" } function testBatterySegmentIfBatteryIsAlmostFullWhileDischargingOnOSX() { @@ -85,7 +85,7 @@ function testBatterySegmentIfBatteryIsAlmostFullWhileDischargingOnOSX() { makeBatterySay "Now drawing from 'Battery Power' -InternalBattery-0 (id=1234567) 98%; discharging; 3:57 remaining present: true" - assertEquals "%K{000} %F{015}🔋 %f%F{015}98%% (3:57) " "$(prompt_battery left 1 false ${FOLDER})" + assertEquals "%K{000} %F{007}🔋 %f%F{007}98%% (3:57) " "$(prompt_battery left 1 false ${FOLDER})" } function testBatterySegmentIfBatteryIsAlmostFullWhileChargingOnOSX() { @@ -93,7 +93,7 @@ function testBatterySegmentIfBatteryIsAlmostFullWhileChargingOnOSX() { makeBatterySay "Now drawing from 'Battery Power' -InternalBattery-0 (id=1234567) 98%; charging; 3:57 remaining present: true" - assertEquals "%K{000} %F{011}🔋 %f%F{011}98%% (3:57) " "$(prompt_battery left 1 false ${FOLDER})" + assertEquals "%K{000} %F{003}🔋 %f%F{003}98%% (3:57) " "$(prompt_battery left 1 false ${FOLDER})" } function testBatterySegmentIfBatteryIsFullOnOSX() { @@ -109,35 +109,35 @@ function testBatterySegmentIfBatteryIsCalculatingOnOSX() { makeBatterySay "Now drawing from 'Battery Power' -InternalBattery-0 (id=1234567) 99%; discharging; (no estimate) present: true" - assertEquals "%K{000} %F{015}🔋 %f%F{015}99%% (...) " "$(prompt_battery left 1 false ${FOLDER})" + assertEquals "%K{000} %F{007}🔋 %f%F{007}99%% (...) " "$(prompt_battery left 1 false ${FOLDER})" } function testBatterySegmentIfBatteryIsLowWhileDischargingOnLinux() { local OS='Linux' # Fake Linux makeBatterySay "4" "Discharging" - assertEquals "%K{000} %F{009}🔋 %f%F{009}4%% " "$(prompt_battery left 1 false ${FOLDER})" + assertEquals "%K{000} %F{001}🔋 %f%F{001}4%% " "$(prompt_battery left 1 false ${FOLDER})" } function testBatterySegmentIfBatteryIsLowWhileChargingOnLinux() { local OS='Linux' # Fake Linux makeBatterySay "4" "Charging" - assertEquals "%K{000} %F{011}🔋 %f%F{011}4%% " "$(prompt_battery left 1 false ${FOLDER})" + assertEquals "%K{000} %F{003}🔋 %f%F{003}4%% " "$(prompt_battery left 1 false ${FOLDER})" } function testBatterySegmentIfBatteryIsNormalWhileDischargingOnLinux() { local OS='Linux' # Fake Linux makeBatterySay "10" "Discharging" - assertEquals "%K{000} %F{015}🔋 %f%F{015}10%% " "$(prompt_battery left 1 false ${FOLDER})" + assertEquals "%K{000} %F{007}🔋 %f%F{007}10%% " "$(prompt_battery left 1 false ${FOLDER})" } function testBatterySegmentIfBatteryIsNormalWhileChargingOnLinux() { local OS='Linux' # Fake Linux makeBatterySay "10" "Charging" - assertEquals "%K{000} %F{011}🔋 %f%F{011}10%% " "$(prompt_battery left 1 false ${FOLDER})" + assertEquals "%K{000} %F{003}🔋 %f%F{003}10%% " "$(prompt_battery left 1 false ${FOLDER})" } function testBatterySegmentIfBatteryIsFullOnLinux() { @@ -155,7 +155,7 @@ function testBatterySegmentIfBatteryIsNormalWithAcpiEnabledOnLinux() { # For running on Mac, we need to mock date :( [[ -f /usr/local/bin/gdate ]] && alias date=gdate - assertEquals "%K{000} %F{015}🔋 %f%F{015}50%% (1:38) " "$(prompt_battery left 1 false ${FOLDER})" + assertEquals "%K{000} %F{007}🔋 %f%F{007}50%% (1:38) " "$(prompt_battery left 1 false ${FOLDER})" unalias date &>/dev/null # unaliasing date fails where it was never aliased (e.g. on Linux). @@ -171,7 +171,7 @@ function testBatterySegmentIfBatteryIsCalculatingWithAcpiEnabledOnLinux() { echo "echo 'Batter 0: Discharging, 50%, rate remaining'" > ${FOLDER}/usr/bin/acpi chmod +x ${FOLDER}/usr/bin/acpi - assertEquals "%K{000} %F{015}🔋 %f%F{015}50%% (...) " "$(prompt_battery left 1 false ${FOLDER})" + assertEquals "%K{000} %F{007}🔋 %f%F{007}50%% (...) " "$(prompt_battery left 1 false ${FOLDER})" } source shunit2/shunit2
\ No newline at end of file |