aboutsummaryrefslogtreecommitdiff
path: root/test/segments/battery.spec
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2019-02-01 16:19:02 +0300
committerGitHub <noreply@github.com>2019-02-01 16:19:02 +0300
commitbd340d4a88797e760efb28c1180254e7779c990f (patch)
tree0ea929fbc249e98b3ad3cbfe7c466180fac9447c /test/segments/battery.spec
parent6ccdfdf37e47f67683c016426cac89c6a3ac9fb0 (diff)
parent5737ca6e81a3191cb232085877b5894be0a052ed (diff)
Merge pull request #966 from ytang/fix-rprompt-icons-cut-off
[Bugfix] Fix icons cut off in RPROMPT segments
Diffstat (limited to 'test/segments/battery.spec')
-rwxr-xr-xtest/segments/battery.spec26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/segments/battery.spec b/test/segments/battery.spec
index 79e25d6f..39437b7f 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{001}🔋 %f%F{001}4%% (0:05) " "$(prompt_battery left 1 false ${FOLDER})"
+ assertEquals "%K{000} %F{001}🔋 %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{003}🔋 %f%F{003}4%% (0:05) " "$(prompt_battery left 1 false ${FOLDER})"
+ assertEquals "%K{000} %F{003}🔋 %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{007}🔋 %f%F{007}98%% (3:57) " "$(prompt_battery left 1 false ${FOLDER})"
+ assertEquals "%K{000} %F{007}🔋 %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{003}🔋 %f%F{003}98%% (3:57) " "$(prompt_battery left 1 false ${FOLDER})"
+ assertEquals "%K{000} %F{003}🔋 %F{003}98%% (3:57) " "$(prompt_battery left 1 false ${FOLDER})"
}
function testBatterySegmentIfBatteryIsFullOnOSX() {
@@ -101,7 +101,7 @@ function testBatterySegmentIfBatteryIsFullOnOSX() {
makeBatterySay "Now drawing from 'AC Power'
-InternalBattery-0 (id=1234567) 99%; charged; 0:00 remaining present: true"
- assertEquals "%K{000} %F{002}🔋 %f%F{002}99%% " "$(prompt_battery left 1 false ${FOLDER})"
+ assertEquals "%K{000} %F{002}🔋 %F{002}99%% " "$(prompt_battery left 1 false ${FOLDER})"
}
function testBatterySegmentIfBatteryIsCalculatingOnOSX() {
@@ -109,42 +109,42 @@ function testBatterySegmentIfBatteryIsCalculatingOnOSX() {
makeBatterySay "Now drawing from 'Battery Power'
-InternalBattery-0 (id=1234567) 99%; discharging; (no estimate) present: true"
- assertEquals "%K{000} %F{007}🔋 %f%F{007}99%% (...) " "$(prompt_battery left 1 false ${FOLDER})"
+ assertEquals "%K{000} %F{007}🔋 %F{007}99%% (...) " "$(prompt_battery left 1 false ${FOLDER})"
}
function testBatterySegmentIfBatteryIsLowWhileDischargingOnLinux() {
local OS='Linux' # Fake Linux
makeBatterySay "4" "Discharging"
- assertEquals "%K{000} %F{001}🔋 %f%F{001}4%% " "$(prompt_battery left 1 false ${FOLDER})"
+ assertEquals "%K{000} %F{001}🔋 %F{001}4%% " "$(prompt_battery left 1 false ${FOLDER})"
}
function testBatterySegmentIfBatteryIsLowWhileChargingOnLinux() {
local OS='Linux' # Fake Linux
makeBatterySay "4" "Charging"
- assertEquals "%K{000} %F{003}🔋 %f%F{003}4%% " "$(prompt_battery left 1 false ${FOLDER})"
+ assertEquals "%K{000} %F{003}🔋 %F{003}4%% " "$(prompt_battery left 1 false ${FOLDER})"
}
function testBatterySegmentIfBatteryIsNormalWhileDischargingOnLinux() {
local OS='Linux' # Fake Linux
makeBatterySay "10" "Discharging"
- assertEquals "%K{000} %F{007}🔋 %f%F{007}10%% " "$(prompt_battery left 1 false ${FOLDER})"
+ assertEquals "%K{000} %F{007}🔋 %F{007}10%% " "$(prompt_battery left 1 false ${FOLDER})"
}
function testBatterySegmentIfBatteryIsNormalWhileChargingOnLinux() {
local OS='Linux' # Fake Linux
makeBatterySay "10" "Charging"
- assertEquals "%K{000} %F{003}🔋 %f%F{003}10%% " "$(prompt_battery left 1 false ${FOLDER})"
+ assertEquals "%K{000} %F{003}🔋 %F{003}10%% " "$(prompt_battery left 1 false ${FOLDER})"
}
function testBatterySegmentIfBatteryIsFullOnLinux() {
local OS='Linux' # Fake Linux
makeBatterySay "100" "Full"
- assertEquals "%K{000} %F{002}🔋 %f%F{002}100%% " "$(prompt_battery left 1 false ${FOLDER})"
+ assertEquals "%K{000} %F{002}🔋 %F{002}100%% " "$(prompt_battery left 1 false ${FOLDER})"
}
function testBatterySegmentIfBatteryIsNormalWithAcpiEnabledOnLinux() {
@@ -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{007}🔋 %f%F{007}50%% (1:38) " "$(prompt_battery left 1 false ${FOLDER})"
+ assertEquals "%K{000} %F{007}🔋 %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{007}🔋 %f%F{007}50%% (...) " "$(prompt_battery left 1 false ${FOLDER})"
+ assertEquals "%K{000} %F{007}🔋 %F{007}50%% (...) " "$(prompt_battery left 1 false ${FOLDER})"
}
source shunit2/shunit2 \ No newline at end of file