mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-12-04 21:56:46 +01:00
Prepare tests for performance optimizations
This commit is contained in:
parent
99f0eddd62
commit
06de83cc0f
31 changed files with 645 additions and 117 deletions
|
|
@ -7,8 +7,6 @@ SHUNIT_PARENT=$0
|
|||
|
||||
function setUp() {
|
||||
export TERM="xterm-256color"
|
||||
# Load Powerlevel9k
|
||||
source powerlevel9k.zsh-theme
|
||||
|
||||
P9K_HOME=$(pwd)
|
||||
### Test specific
|
||||
|
|
@ -33,6 +31,9 @@ function testSymfonyVersionSegmentPrintsNothingIfPhpIsNotAvailable() {
|
|||
local POWERLEVEL9K_CUSTOM_WORLD='echo world'
|
||||
alias php="nophp"
|
||||
|
||||
# Load Powerlevel9k
|
||||
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
||||
|
||||
assertEquals "%K{white} %F{black}world %k%F{white}%f " "$(build_left_prompt)"
|
||||
|
||||
unalias php
|
||||
|
|
@ -46,6 +47,9 @@ function testSymfonyVersionSegmentPrintsNothingIfSymfonyIsNotAvailable() {
|
|||
# navigate into a folder that does not contain symfony.
|
||||
local POWERLEVEL9K_CUSTOM_WORLD='echo world'
|
||||
|
||||
# Load Powerlevel9k
|
||||
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
||||
|
||||
assertEquals "%K{white} %F{black}world %k%F{white}%f " "$(build_left_prompt)"
|
||||
}
|
||||
|
||||
|
|
@ -61,6 +65,9 @@ function testSymfonyVersionPrintsNothingIfPhpThrowsAnError() {
|
|||
Parse error: parse error, expecting `;´ or `{´ in /Users/dr/Privat/vendor/ocramius/proxy-manager/src/ProxyManager/Configuration.php on line 97"
|
||||
}
|
||||
|
||||
# Load Powerlevel9k
|
||||
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
||||
|
||||
assertEquals "%K{white} %F{black}world %k%F{white}%f " "$(build_left_prompt)"
|
||||
|
||||
unfunction php
|
||||
|
|
@ -77,6 +84,9 @@ function testSymfonyVersionSegmentWorks() {
|
|||
echo "Symfony version 3.1.4 - app/dev/debug"
|
||||
}
|
||||
|
||||
# Load Powerlevel9k
|
||||
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
||||
|
||||
assertEquals "%K{240} %F{black%}SF %f%F{black}3.1.4 %k%F{240}%f " "$(build_left_prompt)"
|
||||
|
||||
unfunction php
|
||||
|
|
@ -96,6 +106,9 @@ function testSymfonyVersionSegmentWorksInNestedFolder() {
|
|||
mkdir -p src/P9K/AppBundle
|
||||
cd src/P9K/AppBundle
|
||||
|
||||
# Load Powerlevel9k
|
||||
source ${P9K_HOME}/powerlevel9k.zsh-theme
|
||||
|
||||
assertEquals "%K{240} %F{black%}SF %f%F{black}3.1.4 %k%F{240}%f " "$(build_left_prompt)"
|
||||
|
||||
unfunction php
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue