summaryrefslogtreecommitdiff
path: root/test/segments/rust_version.spec
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2018-08-31 22:43:20 +0300
committerGitHub <noreply@github.com>2018-08-31 22:43:20 +0300
commite207dec8de036112fcac8b8face41e87e1d0b7ec (patch)
treecf455c0cb6d45464008d1b14877cef910a368ea6 /test/segments/rust_version.spec
parent571a859413866897cf962396f02f65a288f677ac (diff)
parent69c69b9cd91d77178324a86d8924efccadaa7247 (diff)
Merge pull request #944 from dritter/prepare_066
Preparing for v0.6.6 release!
Diffstat (limited to 'test/segments/rust_version.spec')
-rwxr-xr-xtest/segments/rust_version.spec21
1 files changed, 11 insertions, 10 deletions
diff --git a/test/segments/rust_version.spec b/test/segments/rust_version.spec
index 34883a10..007ca694 100755
--- a/test/segments/rust_version.spec
+++ b/test/segments/rust_version.spec
@@ -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%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%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{015} %F{000}world %k%F{015}%f " "$(build_left_prompt)"
}
-source shunit2/source/2.1/src/shunit2
+source shunit2/shunit2