|
|
@ -29,9 +29,9 @@ function testDirPathAbsoluteWorks() {
|
|
|
|
# of /home or /Users path.. That is why we change the test
|
|
|
|
# of /home or /Users path.. That is why we change the test
|
|
|
|
# according to the OS of the host.
|
|
|
|
# according to the OS of the host.
|
|
|
|
if [[ "${OS}" == 'Linux' ]]; then
|
|
|
|
if [[ "${OS}" == 'Linux' ]]; then
|
|
|
|
assertEquals "%K{blue} %F{black}/home/${USER} %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}/home/${USER} %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
elif [[ "${OS}" == 'OSX' ]]; then
|
|
|
|
elif [[ "${OS}" == 'OSX' ]]; then
|
|
|
|
assertEquals "%K{blue} %F{black}/Users/${USER} %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}/Users/${USER} %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
@ -50,7 +50,7 @@ function testTruncateFoldersWorks() {
|
|
|
|
mkdir -p $FOLDER
|
|
|
|
mkdir -p $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}…/12345678/123456789 %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}…/12345678/123456789 %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
@ -72,7 +72,7 @@ function testTruncateFolderWithHomeDirWorks() {
|
|
|
|
# Switch back to home folder as this causes the problem.
|
|
|
|
# Switch back to home folder as this causes the problem.
|
|
|
|
cd ..
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}~ %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}~ %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
rmdir $FOLDER
|
|
|
|
rmdir $FOLDER
|
|
|
|
cd ${CURRENT_DIR}
|
|
|
|
cd ${CURRENT_DIR}
|
|
|
@ -91,7 +91,7 @@ function testTruncateMiddleWorks() {
|
|
|
|
mkdir -p $FOLDER
|
|
|
|
mkdir -p $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}/tmp/po…st/1/12/123/1234/12…45/12…56/12…67/12…78/123456789 %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}/tmp/po…st/1/12/123/1234/12…45/12…56/12…67/12…78/123456789 %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
@ -110,7 +110,7 @@ function testTruncationFromRightWorks() {
|
|
|
|
mkdir -p $FOLDER
|
|
|
|
mkdir -p $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}/tmp/po…/1/12/123/12…/12…/12…/12…/12…/123456789 %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}/tmp/po…/1/12/123/12…/12…/12…/12…/12…/123456789 %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
@ -129,7 +129,7 @@ function testTruncateToLastWorks() {
|
|
|
|
mkdir -p $FOLDER
|
|
|
|
mkdir -p $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}123456789 %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}123456789 %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
@ -148,7 +148,7 @@ function testTruncateToFirstAndLastWorks() {
|
|
|
|
mkdir -p $FOLDER
|
|
|
|
mkdir -p $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}/tmp/powerlevel9k-test/…/…/…/…/…/…/…/12345678/123456789 %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}/tmp/powerlevel9k-test/…/…/…/…/…/…/…/12345678/123456789 %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
@ -167,7 +167,7 @@ function testTruncateAbsoluteWorks() {
|
|
|
|
mkdir -p $FOLDER
|
|
|
|
mkdir -p $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}…89 %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}…89 %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
@ -187,7 +187,7 @@ function testTruncationFromRightWithEmptyDelimiter() {
|
|
|
|
mkdir -p $FOLDER
|
|
|
|
mkdir -p $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}/tmp/po/1/12/123/12/12/12/12/12/123456789 %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}/tmp/po/1/12/123/12/12/12/12/12/123456789 %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
@ -207,7 +207,7 @@ function testTruncateWithFolderMarkerWorks() {
|
|
|
|
# Setup folder marker
|
|
|
|
# Setup folder marker
|
|
|
|
touch $BASEFOLDER/1/12/.shorten_folder_marker
|
|
|
|
touch $BASEFOLDER/1/12/.shorten_folder_marker
|
|
|
|
cd $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
assertEquals "%K{blue} %F{black}/…/12/123/1234/12345/123456/1234567 %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}/…/12/123/1234/12345/123456/1234567 %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr $BASEFOLDER
|
|
|
|
rm -fr $BASEFOLDER
|
|
|
@ -228,7 +228,7 @@ function testTruncateWithFolderMarkerWithChangedFolderMarker() {
|
|
|
|
# Setup folder marker
|
|
|
|
# Setup folder marker
|
|
|
|
touch $BASEFOLDER/1/12/.xxx
|
|
|
|
touch $BASEFOLDER/1/12/.xxx
|
|
|
|
cd $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
assertEquals "%K{blue} %F{black}/…/12/123/1234/12345/123456/1234567 %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}/…/12/123/1234/12345/123456/1234567 %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr $BASEFOLDER
|
|
|
|
rm -fr $BASEFOLDER
|
|
|
@ -260,7 +260,7 @@ function testTruncateWithPackageNameWorks() {
|
|
|
|
# Load Powerlevel9k
|
|
|
|
# Load Powerlevel9k
|
|
|
|
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
|
|
|
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}My_Package/1/12/123/12…/12…/12…/12…/12…/123456789 %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}My_Package/1/12/123/12…/12…/12…/12…/12…/123456789 %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
# Go back
|
|
|
|
# Go back
|
|
|
|
cd $p9kFolder
|
|
|
|
cd $p9kFolder
|
|
|
@ -300,7 +300,7 @@ function testTruncateWithPackageNameIfRepoIsSymlinkedInsideDeepFolder() {
|
|
|
|
# Load Powerlevel9k
|
|
|
|
# Load Powerlevel9k
|
|
|
|
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
|
|
|
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}My_Package/as…/qwerqwer %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}My_Package/as…/qwerqwer %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
# Go back
|
|
|
|
# Go back
|
|
|
|
cd $p9kFolder
|
|
|
|
cd $p9kFolder
|
|
|
@ -336,7 +336,7 @@ function testTruncateWithPackageNameIfRepoIsSymlinkedInsideGitDir() {
|
|
|
|
# Load Powerlevel9k
|
|
|
|
# Load Powerlevel9k
|
|
|
|
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
|
|
|
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}My_Package/.g…/re…/heads %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}My_Package/.g…/re…/heads %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
# Go back
|
|
|
|
# Go back
|
|
|
|
cd $p9kFolder
|
|
|
|
cd $p9kFolder
|
|
|
@ -352,7 +352,7 @@ function testHomeFolderDetectionWorks() {
|
|
|
|
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
|
|
|
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
|
|
|
|
|
|
|
|
|
|
|
cd ~
|
|
|
|
cd ~
|
|
|
|
assertEquals "%K{blue} %F{black%}home-icon %f%F{black}~ %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000%}home-icon %f%F{000}~ %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -368,7 +368,7 @@ function testHomeSubfolderDetectionWorks() {
|
|
|
|
local FOLDER=~/powerlevel9k-test
|
|
|
|
local FOLDER=~/powerlevel9k-test
|
|
|
|
mkdir $FOLDER
|
|
|
|
mkdir $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
assertEquals "%K{blue} %F{black%}sub-icon %f%F{black}~/powerlevel9k-test %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000%}sub-icon %f%F{000}~/powerlevel9k-test %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr $FOLDER
|
|
|
|
rm -fr $FOLDER
|
|
|
@ -385,7 +385,7 @@ function testOtherFolderDetectionWorks() {
|
|
|
|
local FOLDER=/tmp/powerlevel9k-test
|
|
|
|
local FOLDER=/tmp/powerlevel9k-test
|
|
|
|
mkdir $FOLDER
|
|
|
|
mkdir $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
assertEquals "%K{blue} %F{black%}folder-icon %f%F{black}/tmp/powerlevel9k-test %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000%}folder-icon %f%F{000}/tmp/powerlevel9k-test %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr $FOLDER
|
|
|
|
rm -fr $FOLDER
|
|
|
@ -403,7 +403,7 @@ function testChangingDirPathSeparator() {
|
|
|
|
mkdir -p $FOLDER
|
|
|
|
mkdir -p $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
cd $FOLDER
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}xXxtmpxXxpowerlevel9k-testxXx1xXx2 %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}xXxtmpxXxpowerlevel9k-testxXx1xXx2 %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
@ -421,7 +421,7 @@ function testHomeFolderAbbreviation() {
|
|
|
|
# Load Powerlevel9k
|
|
|
|
# Load Powerlevel9k
|
|
|
|
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
|
|
|
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}~ %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}~ %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
# substituted
|
|
|
|
# substituted
|
|
|
|
local POWERLEVEL9K_HOME_FOLDER_ABBREVIATION='qQq'
|
|
|
|
local POWERLEVEL9K_HOME_FOLDER_ABBREVIATION='qQq'
|
|
|
@ -429,7 +429,7 @@ function testHomeFolderAbbreviation() {
|
|
|
|
# Load Powerlevel9k
|
|
|
|
# Load Powerlevel9k
|
|
|
|
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
|
|
|
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}qQq %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}qQq %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd /tmp
|
|
|
|
cd /tmp
|
|
|
|
# default
|
|
|
|
# default
|
|
|
@ -438,7 +438,7 @@ function testHomeFolderAbbreviation() {
|
|
|
|
# Load Powerlevel9k
|
|
|
|
# Load Powerlevel9k
|
|
|
|
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
|
|
|
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}/tmp %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}/tmp %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
# substituted
|
|
|
|
# substituted
|
|
|
|
local POWERLEVEL9K_HOME_FOLDER_ABBREVIATION='qQq'
|
|
|
|
local POWERLEVEL9K_HOME_FOLDER_ABBREVIATION='qQq'
|
|
|
@ -446,7 +446,7 @@ function testHomeFolderAbbreviation() {
|
|
|
|
# Load Powerlevel9k
|
|
|
|
# Load Powerlevel9k
|
|
|
|
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
|
|
|
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}/tmp %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}/tmp %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd "$dir"
|
|
|
|
cd "$dir"
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -462,7 +462,7 @@ function testOmittingFirstCharacterWorks() {
|
|
|
|
|
|
|
|
|
|
|
|
cd /tmp
|
|
|
|
cd /tmp
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black%}folder-icon %f%F{black}tmp %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000%}folder-icon %f%F{000}tmp %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -480,7 +480,7 @@ function testOmittingFirstCharacterWorksWithChangingPathSeparator() {
|
|
|
|
mkdir -p /tmp/powerlevel9k-test/1/2
|
|
|
|
mkdir -p /tmp/powerlevel9k-test/1/2
|
|
|
|
cd /tmp/powerlevel9k-test/1/2
|
|
|
|
cd /tmp/powerlevel9k-test/1/2
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black%}folder-icon %f%F{black}tmpxXxpowerlevel9k-testxXx1xXx2 %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000%}folder-icon %f%F{000}tmpxXxpowerlevel9k-testxXx1xXx2 %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
@ -507,7 +507,7 @@ function testOmittingFirstCharacterWorksWithChangingPathSeparatorAndDefaultTrunc
|
|
|
|
mkdir -p /tmp/powerlevel9k-test/1/2
|
|
|
|
mkdir -p /tmp/powerlevel9k-test/1/2
|
|
|
|
cd /tmp/powerlevel9k-test/1/2
|
|
|
|
cd /tmp/powerlevel9k-test/1/2
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}xXx1xXx2 %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}xXx1xXx2 %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
@ -527,7 +527,7 @@ function testOmittingFirstCharacterWorksWithChangingPathSeparatorAndMiddleTrunca
|
|
|
|
mkdir -p /tmp/powerlevel9k-test/1/2
|
|
|
|
mkdir -p /tmp/powerlevel9k-test/1/2
|
|
|
|
cd /tmp/powerlevel9k-test/1/2
|
|
|
|
cd /tmp/powerlevel9k-test/1/2
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}tmpxXxpo…stxXx1xXx2 %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}tmpxXxpo…stxXx1xXx2 %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
@ -547,7 +547,7 @@ function testOmittingFirstCharacterWorksWithChangingPathSeparatorAndRightTruncat
|
|
|
|
mkdir -p /tmp/powerlevel9k-test/1/2
|
|
|
|
mkdir -p /tmp/powerlevel9k-test/1/2
|
|
|
|
cd /tmp/powerlevel9k-test/1/2
|
|
|
|
cd /tmp/powerlevel9k-test/1/2
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}tmpxXxpo…xXx1xXx2 %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}tmpxXxpo…xXx1xXx2 %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
@ -570,7 +570,7 @@ function testTruncateToUniqueWorks() {
|
|
|
|
mkdir -p /tmp/powerlevel9k-test/bob/docs
|
|
|
|
mkdir -p /tmp/powerlevel9k-test/bob/docs
|
|
|
|
cd /tmp/powerlevel9k-test/alice/devl
|
|
|
|
cd /tmp/powerlevel9k-test/alice/devl
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}txXxpxXxalxXxde %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}txXxpxXxalxXxde %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
@ -586,7 +586,7 @@ function testBoldHomeDirWorks() {
|
|
|
|
|
|
|
|
|
|
|
|
cd ~
|
|
|
|
cd ~
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}%B~%b %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}%B~%b %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -602,7 +602,7 @@ function testBoldHomeSubdirWorks() {
|
|
|
|
mkdir -p ~/powerlevel9k-test
|
|
|
|
mkdir -p ~/powerlevel9k-test
|
|
|
|
cd ~/powerlevel9k-test
|
|
|
|
cd ~/powerlevel9k-test
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}~/%Bpowerlevel9k-test%b %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}~/%Bpowerlevel9k-test%b %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr ~/powerlevel9k-test
|
|
|
|
rm -fr ~/powerlevel9k-test
|
|
|
@ -618,7 +618,7 @@ function testBoldRootDirWorks() {
|
|
|
|
|
|
|
|
|
|
|
|
cd /
|
|
|
|
cd /
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}%B/%b %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}%B/%b %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -633,7 +633,7 @@ function testBoldRootSubdirWorks() {
|
|
|
|
|
|
|
|
|
|
|
|
cd /tmp
|
|
|
|
cd /tmp
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}/%Btmp%b %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}/%Btmp%b %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -649,7 +649,7 @@ function testBoldRootSubSubdirWorks() {
|
|
|
|
mkdir -p /tmp/powerlevel9k-test
|
|
|
|
mkdir -p /tmp/powerlevel9k-test
|
|
|
|
cd /tmp/powerlevel9k-test
|
|
|
|
cd /tmp/powerlevel9k-test
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}/tmp/%Bpowerlevel9k-test%b %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}/tmp/%Bpowerlevel9k-test%b %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
@ -665,7 +665,7 @@ function testHighlightHomeWorks() {
|
|
|
|
|
|
|
|
|
|
|
|
cd ~
|
|
|
|
cd ~
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}%F{red}~ %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}%F{red}~ %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -681,7 +681,7 @@ function testHighlightHomeSubdirWorks() {
|
|
|
|
mkdir -p ~/powerlevel9k-test
|
|
|
|
mkdir -p ~/powerlevel9k-test
|
|
|
|
cd ~/powerlevel9k-test
|
|
|
|
cd ~/powerlevel9k-test
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}~/%F{red}powerlevel9k-test %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}~/%F{red}powerlevel9k-test %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr ~/powerlevel9k-test
|
|
|
|
rm -fr ~/powerlevel9k-test
|
|
|
@ -697,7 +697,7 @@ function testHighlightRootWorks() {
|
|
|
|
|
|
|
|
|
|
|
|
cd /
|
|
|
|
cd /
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}%F{red}/ %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}%F{red}/ %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -712,7 +712,7 @@ function testHighlightRootSubdirWorks() {
|
|
|
|
|
|
|
|
|
|
|
|
cd /tmp
|
|
|
|
cd /tmp
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}/%F{red}tmp %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}/%F{red}tmp %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -728,7 +728,7 @@ function testHighlightRootSubSubdirWorks() {
|
|
|
|
mkdir /tmp/powerlevel9k-test
|
|
|
|
mkdir /tmp/powerlevel9k-test
|
|
|
|
cd /tmp/powerlevel9k-test
|
|
|
|
cd /tmp/powerlevel9k-test
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}/tmp/%F{red}powerlevel9k-test %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}/tmp/%F{red}powerlevel9k-test %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
@ -745,7 +745,7 @@ function testDirSeparatorColorHomeSubdirWorks() {
|
|
|
|
mkdir -p ~/powerlevel9k-test
|
|
|
|
mkdir -p ~/powerlevel9k-test
|
|
|
|
cd ~/powerlevel9k-test
|
|
|
|
cd ~/powerlevel9k-test
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}~%F{red}/%F{black}powerlevel9k-test %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}~%F{red}/%F{black}powerlevel9k-test %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr ~/powerlevel9k-test
|
|
|
|
rm -fr ~/powerlevel9k-test
|
|
|
@ -762,7 +762,7 @@ function testDirSeparatorColorRootSubSubdirWorks() {
|
|
|
|
mkdir -p /tmp/powerlevel9k-test
|
|
|
|
mkdir -p /tmp/powerlevel9k-test
|
|
|
|
cd /tmp/powerlevel9k-test
|
|
|
|
cd /tmp/powerlevel9k-test
|
|
|
|
|
|
|
|
|
|
|
|
assertEquals "%K{blue} %F{black}%F{red}/%F{black}tmp%F{red}/%F{black}powerlevel9k-test %k%F{blue}%f " "$(build_left_prompt)"
|
|
|
|
assertEquals "%K{012} %F{000}%F{red}/%F{black}tmp%F{red}/%F{black}powerlevel9k-test %k%F{012}%f " "$(build_left_prompt)"
|
|
|
|
|
|
|
|
|
|
|
|
cd -
|
|
|
|
cd -
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|
rm -fr /tmp/powerlevel9k-test
|
|
|
|