summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2018-08-09 00:47:01 +0300
committerDominik Ritter <dritter03@googlemail.com>2018-08-09 00:47:01 +0300
commitef5f9bb1b494bcb1ceb81f7c833750d85701ca4a (patch)
tree7cdb68827967cfa254e64e53dadffd68ea1d7bf2 /test
parent27fe2c65712a092c8e652fe2c58ac310f69a8e36 (diff)
Fix tests
Diffstat (limited to 'test')
-rwxr-xr-xtest/powerlevel9k.spec6
-rwxr-xr-xtest/segments/command_execution_time.spec12
-rwxr-xr-xtest/segments/dir.spec10
-rwxr-xr-xtest/segments/go_version.spec2
-rwxr-xr-xtest/segments/kubecontext.spec4
-rwxr-xr-xtest/segments/laravel_version.spec2
-rwxr-xr-xtest/segments/rust_version.spec2
-rwxr-xr-xtest/segments/status.spec12
8 files changed, 25 insertions, 25 deletions
diff --git a/test/powerlevel9k.spec b/test/powerlevel9k.spec
index 2206a9d0..b5b81fc4 100755
--- a/test/powerlevel9k.spec
+++ b/test/powerlevel9k.spec
@@ -65,7 +65,7 @@ function testDynamicColoringOfVisualIdentifiersWork() {
cd /tmp
- assertEquals "%K{012} %F{green%}icon-here %f%F{000}/tmp %k%F{012}%f " "$(build_left_prompt)"
+ assertEquals "%K{012} %F{002}icon-here %f%F{000}/tmp %k%F{012}%f " "$(build_left_prompt)"
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
unset POWERLEVEL9K_DIR_DEFAULT_VISUAL_IDENTIFIER_COLOR
@@ -86,7 +86,7 @@ function testColoringOfVisualIdentifiersDoesNotOverwriteColoringOfSegment() {
cd /tmp
- assertEquals "%K{011} %F{green%}icon-here %f%F{009}/tmp %k%F{011}%f " "$(build_left_prompt)"
+ assertEquals "%K{011} %F{002}icon-here %f%F{009}/tmp %k%F{011}%f " "$(build_left_prompt)"
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
unset POWERLEVEL9K_DIR_DEFAULT_VISUAL_IDENTIFIER_COLOR
@@ -106,7 +106,7 @@ function testOverwritingIconsWork() {
#cd ~/$testFolder
cd /tmp
- assertEquals "%K{012} %F{000%}icon-here %f%F{000}/tmp %k%F{012}%f " "$(build_left_prompt)"
+ assertEquals "%K{012} %F{000}icon-here %f%F{000}/tmp %k%F{012}%f " "$(build_left_prompt)"
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
unset POWERLEVEL9K_DIR_FOLDER_ICON
diff --git a/test/segments/command_execution_time.spec b/test/segments/command_execution_time.spec
index 7e060be7..fc6110e4 100755
--- a/test/segments/command_execution_time.spec
+++ b/test/segments/command_execution_time.spec
@@ -28,7 +28,7 @@ function testCommandExecutionTimeThresholdCouldBeChanged() {
POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=1
_P9K_COMMAND_DURATION=2.03
- assertEquals "%K{009} %F{226%}Dur %f%F{226}2.03 %k%F{009}%f " "$(build_left_prompt)"
+ assertEquals "%K{009} %F{226}Dur %f%F{226}2.03 %k%F{009}%f " "$(build_left_prompt)"
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
unset _P9K_COMMAND_DURATION
@@ -40,7 +40,7 @@ function testCommandExecutionTimeThresholdCouldBeSetToZero() {
POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=0
_P9K_COMMAND_DURATION=0.03
- assertEquals "%K{009} %F{226%}Dur %f%F{226}0.03 %k%F{009}%f " "$(build_left_prompt)"
+ assertEquals "%K{009} %F{226}Dur %f%F{226}0.03 %k%F{009}%f " "$(build_left_prompt)"
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
unset _P9K_COMMAND_DURATION
@@ -53,7 +53,7 @@ function testCommandExecutionTimePrecisionCouldBeChanged() {
POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=4
_P9K_COMMAND_DURATION=0.0001
- assertEquals "%K{009} %F{226%}Dur %f%F{226}0.0001 %k%F{009}%f " "$(build_left_prompt)"
+ assertEquals "%K{009} %F{226}Dur %f%F{226}0.0001 %k%F{009}%f " "$(build_left_prompt)"
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
unset _P9K_COMMAND_DURATION
@@ -66,7 +66,7 @@ function testCommandExecutionTimePrecisionCouldBeSetToZero() {
POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0
_P9K_COMMAND_DURATION=23.5001
- assertEquals "%K{009} %F{226%}Dur %f%F{226}23 %k%F{009}%f " "$(build_left_prompt)"
+ assertEquals "%K{009} %F{226}Dur %f%F{226}23 %k%F{009}%f " "$(build_left_prompt)"
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
unset _P9K_COMMAND_DURATION
@@ -77,7 +77,7 @@ function testCommandExecutionTimeIsFormattedHumandReadbleForMinuteLongCommand()
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(command_execution_time)
_P9K_COMMAND_DURATION=180
- assertEquals "%K{009} %F{226%}Dur %f%F{226}03:00 %k%F{009}%f " "$(build_left_prompt)"
+ assertEquals "%K{009} %F{226}Dur %f%F{226}03:00 %k%F{009}%f " "$(build_left_prompt)"
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
unset _P9K_COMMAND_DURATION
@@ -87,7 +87,7 @@ function testCommandExecutionTimeIsFormattedHumandReadbleForHourLongCommand() {
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(command_execution_time)
_P9K_COMMAND_DURATION=7200
- assertEquals "%K{009} %F{226%}Dur %f%F{226}02:00:00 %k%F{009}%f " "$(build_left_prompt)"
+ assertEquals "%K{009} %F{226}Dur %f%F{226}02:00:00 %k%F{009}%f " "$(build_left_prompt)"
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
unset _P9K_COMMAND_DURATION
diff --git a/test/segments/dir.spec b/test/segments/dir.spec
index c16e32fc..4e4022b1 100755
--- a/test/segments/dir.spec
+++ b/test/segments/dir.spec
@@ -329,7 +329,7 @@ function testHomeFolderDetectionWorks() {
POWERLEVEL9K_HOME_ICON='home-icon'
cd ~
- assertEquals "%K{012} %F{000%}home-icon %f%F{000}~ %k%F{012}%f " "$(build_left_prompt)"
+ assertEquals "%K{012} %F{000}home-icon %f%F{000}~ %k%F{012}%f " "$(build_left_prompt)"
cd -
unset POWERLEVEL9K_HOME_ICON
@@ -341,7 +341,7 @@ function testHomeSubfolderDetectionWorks() {
FOLDER=~/powerlevel9k-test
mkdir $FOLDER
cd $FOLDER
- assertEquals "%K{012} %F{000%}sub-icon %f%F{000}~/powerlevel9k-test %k%F{012}%f " "$(build_left_prompt)"
+ assertEquals "%K{012} %F{000}sub-icon %f%F{000}~/powerlevel9k-test %k%F{012}%f " "$(build_left_prompt)"
cd -
rm -fr $FOLDER
@@ -355,7 +355,7 @@ function testOtherFolderDetectionWorks() {
FOLDER=/tmp/powerlevel9k-test
mkdir $FOLDER
cd $FOLDER
- assertEquals "%K{012} %F{000%}folder-icon %f%F{000}/tmp/powerlevel9k-test %k%F{012}%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 -
rm -fr $FOLDER
@@ -407,7 +407,7 @@ function testOmittingFirstCharacterWorks() {
POWERLEVEL9K_FOLDER_ICON='folder-icon'
cd /tmp
- assertEquals "%K{012} %F{000%}folder-icon %f%F{000}tmp %k%F{012}%f " "$(build_left_prompt)"
+ assertEquals "%K{012} %F{000}folder-icon %f%F{000}tmp %k%F{012}%f " "$(build_left_prompt)"
cd -
unset POWERLEVEL9K_FOLDER_ICON
@@ -421,7 +421,7 @@ function testOmittingFirstCharacterWorksWithChangingPathSeparator() {
mkdir -p /tmp/powerlevel9k-test/1/2
cd /tmp/powerlevel9k-test/1/2
- assertEquals "%K{012} %F{000%}folder-icon %f%F{000}tmpxXxpowerlevel9k-testxXx1xXx2 %k%F{012}%f " "$(build_left_prompt)"
+ assertEquals "%K{012} %F{000}folder-icon %f%F{000}tmpxXxpowerlevel9k-testxXx1xXx2 %k%F{012}%f " "$(build_left_prompt)"
cd -
rm -fr /tmp/powerlevel9k-test
diff --git a/test/segments/go_version.spec b/test/segments/go_version.spec
index 30b157a5..39be4157 100755
--- a/test/segments/go_version.spec
+++ b/test/segments/go_version.spec
@@ -40,7 +40,7 @@ function testGo() {
PWD="$HOME/go/src/github.com/bhilburn/powerlevel9k"
- assertEquals "%K{002} %F{255%} %f%F{255}go1.5.3 %k%F{002}%f " "$(build_left_prompt)"
+ assertEquals "%K{002} %F{255} %f%F{255}go1.5.3 %k%F{002}%f " "$(build_left_prompt)"
unset POWERLEVEL9K_GO_ICON
unset PWD
diff --git a/test/segments/kubecontext.spec b/test/segments/kubecontext.spec
index 33853a3f..1457558f 100755
--- a/test/segments/kubecontext.spec
+++ b/test/segments/kubecontext.spec
@@ -69,7 +69,7 @@ function testKubeContext() {
alias kubectl=mockKubectl
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(kubecontext)
- assertEquals "%K{013} %F{015%}⎈ %f%F{015}minikube/default %k%F{013}%f " "$(build_left_prompt)"
+ assertEquals "%K{013} %F{015}⎈ %f%F{015}minikube/default %k%F{013}%f " "$(build_left_prompt)"
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
unalias kubectl
@@ -78,7 +78,7 @@ function testKubeContextOtherNamespace() {
alias kubectl=mockKubectlOtherNamespace
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(kubecontext)
- assertEquals "%K{013} %F{015%}⎈ %f%F{015}minikube/kube-system %k%F{013}%f " "$(build_left_prompt)"
+ assertEquals "%K{013} %F{015}⎈ %f%F{015}minikube/kube-system %k%F{013}%f " "$(build_left_prompt)"
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
unalias kubectl
diff --git a/test/segments/laravel_version.spec b/test/segments/laravel_version.spec
index ffc11786..b620ce8a 100755
--- a/test/segments/laravel_version.spec
+++ b/test/segments/laravel_version.spec
@@ -31,7 +31,7 @@ function testLaravelVersionSegment() {
POWERLEVEL9K_LARAVEL_ICON='x'
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(laravel_version)
- assertEquals "%K{001} %F{015%}x %f%F{015}5.4.23 %k%F{001}%f " "$(build_left_prompt)"
+ assertEquals "%K{001} %F{015}x %f%F{015}5.4.23 %k%F{001}%f " "$(build_left_prompt)"
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
unset POWERLEVEL9K_LARAVEL_ICON
diff --git a/test/segments/rust_version.spec b/test/segments/rust_version.spec
index 7031be87..1317ba85 100755
--- a/test/segments/rust_version.spec
+++ b/test/segments/rust_version.spec
@@ -32,7 +32,7 @@ function testRust() {
mockRust
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(rust_version)
- assertEquals "%K{208} %F{000%}Rust %f%F{000}0.4.1a-alpha %k%F{208}%f " "$(build_left_prompt)"
+ assertEquals "%K{208} %F{000}Rust %f%F{000}0.4.1a-alpha %k%F{208}%f " "$(build_left_prompt)"
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
}
diff --git a/test/segments/status.spec b/test/segments/status.spec
index fc44275e..8a9b6a1c 100755
--- a/test/segments/status.spec
+++ b/test/segments/status.spec
@@ -31,7 +31,7 @@ function testStatusWorksAsExpectedIfReturnCodeIsZeroAndVerboseIsSet() {
local POWERLEVEL9K_STATUS_HIDE_SIGNAME=true
local POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(status)
- assertEquals "%K{000} %F{002%}✔%f %k%F{000}%f " "$(build_left_prompt)"
+ assertEquals "%K{000} %F{002}✔%f %k%F{000}%f " "$(build_left_prompt)"
}
function testStatusInGeneralErrorCase() {
@@ -40,7 +40,7 @@ function testStatusInGeneralErrorCase() {
local POWERLEVEL9K_STATUS_VERBOSE=true
local POWERLEVEL9K_STATUS_SHOW_PIPESTATUS=false
- assertEquals "%K{009} %F{226%}↵ %f%F{226}1 %k%F{009}%f " "$(build_left_prompt)"
+ assertEquals "%K{009} %F{226}↵ %f%F{226}1 %k%F{009}%f " "$(build_left_prompt)"
}
function testPipestatusInErrorCase() {
@@ -50,7 +50,7 @@ function testPipestatusInErrorCase() {
local POWERLEVEL9K_STATUS_VERBOSE=true
local POWERLEVEL9K_STATUS_SHOW_PIPESTATUS=true
- assertEquals "%K{009} %F{226%}↵ %f%F{226}0|0|1|0 %k%F{009}%f " "$(build_left_prompt)"
+ assertEquals "%K{009} %F{226}↵ %f%F{226}0|0|1|0 %k%F{009}%f " "$(build_left_prompt)"
}
function testStatusCrossWinsOverVerbose() {
@@ -60,7 +60,7 @@ function testStatusCrossWinsOverVerbose() {
local POWERLEVEL9K_STATUS_VERBOSE=true
local POWERLEVEL9K_STATUS_CROSS=true
- assertEquals "%K{000} %F{009%}✘%f %k%F{000}%f " "$(build_left_prompt)"
+ assertEquals "%K{000} %F{009}✘%f %k%F{000}%f " "$(build_left_prompt)"
}
function testStatusShowsSignalNameInErrorCase() {
@@ -70,7 +70,7 @@ function testStatusShowsSignalNameInErrorCase() {
local POWERLEVEL9K_STATUS_VERBOSE=true
local POWERLEVEL9K_STATUS_HIDE_SIGNAME=false
- assertEquals "%K{009} %F{226%}↵ %f%F{226}SIGILL(4) %k%F{009}%f " "$(build_left_prompt)"
+ assertEquals "%K{009} %F{226}↵ %f%F{226}SIGILL(4) %k%F{009}%f " "$(build_left_prompt)"
}
function testStatusSegmentIntegrated() {
@@ -79,7 +79,7 @@ function testStatusSegmentIntegrated() {
false; powerlevel9k_prepare_prompts
- assertEquals "%f%b%k%K{000} %F{009%}✘%f %k%F{000}%f " "${(e)PROMPT}"
+ assertEquals "%f%b%k%K{000} %F{009}✘%f %k%F{000}%f " "${(e)PROMPT}"
}
source shunit2/source/2.1/src/shunit2 \ No newline at end of file