mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-12-11 22:02:32 +01:00
Merge branch 'master' into fix-rprompt-icons-cut-off
This commit is contained in:
commit
a98fa7ff54
60 changed files with 4899 additions and 1136 deletions
|
|
@ -14,8 +14,6 @@ function setUp() {
|
|||
PATH="${RUST_TEST_FOLDER}:${PATH}"
|
||||
|
||||
export TERM="xterm-256color"
|
||||
# Load Powerlevel9k
|
||||
source powerlevel9k.zsh-theme
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
|
|
@ -29,22 +27,25 @@ function mockRust() {
|
|||
}
|
||||
|
||||
function testRust() {
|
||||
mockRust
|
||||
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
|
||||
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(rust_version)
|
||||
mockRust
|
||||
|
||||
assertEquals "%K{208} %F{black%}Rust %F{black}0.4.1a-alpha %k%F{darkorange}%f " "$(build_left_prompt)"
|
||||
# Load Powerlevel9k
|
||||
source powerlevel9k.zsh-theme
|
||||
|
||||
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
|
||||
assertEquals "%K{208} %F{000}Rust %F{000}0.4.1a-alpha %k%F{208}%f " "$(build_left_prompt)"
|
||||
}
|
||||
|
||||
function testRustPrintsNothingIfRustIsNotAvailable() {
|
||||
POWERLEVEL9K_CUSTOM_WORLD='echo world'
|
||||
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
|
||||
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(custom_world rust_version)
|
||||
local POWERLEVEL9K_CUSTOM_WORLD='echo world'
|
||||
|
||||
assertEquals "%K{white} %F{black}world %k%F{white}%f " "$(build_left_prompt)"
|
||||
# Load Powerlevel9k
|
||||
source powerlevel9k.zsh-theme
|
||||
|
||||
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
|
||||
unset POWERLEVEL9K_CUSTOM_WORLD
|
||||
assertEquals "%K{007} %F{000}world %k%F{007}%f " "$(build_left_prompt)"
|
||||
}
|
||||
|
||||
source shunit2/source/2.1/src/shunit2
|
||||
source shunit2/shunit2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue