diff options
author | Christo Kotze <onaforeignshore@hotmail.co.uk> | 2018-02-14 13:17:50 +0300 |
---|---|---|
committer | Christo Kotze <onaforeignshore@hotmail.co.uk> | 2018-02-14 13:17:50 +0300 |
commit | 4fc4d157037bcef7d3c3610463dbbdb8b919a2c9 (patch) | |
tree | 13054136b93a26263a0c0edd462656582914759b /test/segments/dir.spec | |
parent | 276bc9017c99591cfdab373f659182c7e9166063 (diff) |
Added tests for DIR_PATH_SEPARATOR_FOREGROUND
Diffstat (limited to 'test/segments/dir.spec')
-rwxr-xr-x | test/segments/dir.spec | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/test/segments/dir.spec b/test/segments/dir.spec index a7be9fe2..7d158389 100755 --- a/test/segments/dir.spec +++ b/test/segments/dir.spec @@ -427,7 +427,7 @@ function testTruncateToUniqueWorks() { unset POWERLEVEL9K_SHORTEN_STRATEGY } -function testBoldHomeDirectoryWorks() { +function testBoldHomeDirWorks() { POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD=true cd ~ @@ -449,7 +449,7 @@ function testBoldHomeSubdirWorks() { unset POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD } -function testBoldRootDirectoryWorks() { +function testBoldRootDirWorks() { POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD=true cd / @@ -469,7 +469,7 @@ function testBoldRootSubdirWorks() { unset POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD } -function testBoldRootSubsubdirWorks() { +function testBoldRootSubSubdirWorks() { POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD=true mkdir -p /tmp/powerlevel9k-test cd /tmp/powerlevel9k-test @@ -513,7 +513,7 @@ function testHighlightRootWorks() { unset POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND } -function testHighlightRootSubdirDirectoryWorks() { +function testHighlightRootSubdirWorks() { POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND='red' cd /tmp @@ -523,7 +523,7 @@ function testHighlightRootSubdirDirectoryWorks() { unset POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND } -function testHighlightRootSubdirDirectoryWorks() { +function testHighlightRootSubSubdirWorks() { POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND='red' mkdir /tmp/powerlevel9k-test cd /tmp/powerlevel9k-test @@ -535,4 +535,28 @@ function testHighlightRootSubdirDirectoryWorks() { unset POWERLEVEL9K_DIR_PATH_HIGHLIGHT_FOREGROUND } +function testDirSeparatorColorHomeSubdirWorks() { + POWERLEVEL9K_DIR_PATH_SEPARATOR_FOREGROUND='red' + mkdir -p ~/powerlevel9k-test + cd ~/powerlevel9k-test + + assertEquals "%K{blue} %F{black}~%F{red}/%F{black}powerlevel9k-test%b %k%F{blue}%f " "$(build_left_prompt)" + + cd - + rm -fr ~/powerlevel9k-test + unset POWERLEVEL9K_DIR_PATH_SEPARATOR_FOREGROUND +} + +function testDirSeparatorColorRootSubSubdirWorks() { + POWERLEVEL9K_DIR_PATH_SEPARATOR_FOREGROUND='red' + mkdir -p /tmp/powerlevel9k-test + cd /tmp/powerlevel9k-test + + assertEquals "%K{blue} %F{black}%F{red}/%F{black}tmp%F{red}/%F{black}powerlevel9k-test%b %k%F{blue}%f " "$(build_left_prompt)" + + cd - + rm -fr /tmp/powerlevel9k-test + unset POWERLEVEL9K_DIR_PATH_SEPARATOR_FOREGROUND +} + source shunit2/source/2.1/src/shunit2 |