mirror of
https://github.com/Powerlevel9k/powerlevel9k.git
synced 2024-09-21 10:27:12 +00:00
Add tests
This commit is contained in:
parent
8f60309386
commit
8bb86908d7
@ -768,4 +768,22 @@ function testDirSeparatorColorRootSubSubdirWorks() {
|
|||||||
rm -fr /tmp/powerlevel9k-test
|
rm -fr /tmp/powerlevel9k-test
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function testDirHomeTruncationWorksOnlyAtTheBeginning() {
|
||||||
|
local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
|
||||||
|
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir)
|
||||||
|
|
||||||
|
local FOLDER=/tmp/p9ktest
|
||||||
|
local SAVED_HOME="${HOME}"
|
||||||
|
HOME="/p9ktest"
|
||||||
|
|
||||||
|
mkdir -p $FOLDER
|
||||||
|
# Setup folder marker
|
||||||
|
cd $FOLDER
|
||||||
|
assertEquals "%K{004} %F{000}/tmp/p9ktest %k%F{004}%f " "$(build_left_prompt)"
|
||||||
|
|
||||||
|
cd -
|
||||||
|
rm -fr $FOLDER
|
||||||
|
HOME="${SAVED_HOME}"
|
||||||
|
}
|
||||||
|
|
||||||
source shunit2/shunit2
|
source shunit2/shunit2
|
||||||
|
Loading…
Reference in New Issue
Block a user