mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-12-11 22:02:32 +01:00
Fix tests on older ZSH versions
This commit is contained in:
parent
4b32b2c0b2
commit
16e5e14af7
23 changed files with 227 additions and 132 deletions
|
|
@ -28,7 +28,8 @@ function tearDown() {
|
|||
}
|
||||
|
||||
function testSwapSegmentWorksOnOsx() {
|
||||
local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(swap)
|
||||
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
|
||||
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(swap)
|
||||
local OS="OSX" # Fake OSX
|
||||
sysctl() {
|
||||
echo "vm.swapusage: total = 3072,00M used = 1620,50M free = 1451,50M (encrypted)"
|
||||
|
|
@ -40,7 +41,8 @@ function testSwapSegmentWorksOnOsx() {
|
|||
}
|
||||
|
||||
function testSwapSegmentWorksOnLinux() {
|
||||
local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(swap)
|
||||
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
|
||||
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(swap)
|
||||
local OS="Linux" # Fake Linux
|
||||
mkdir proc
|
||||
echo "SwapTotal: 1000000" > proc/meminfo
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue