summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2017-08-12 20:46:08 +0300
committerBen Hilburn <bhilburn@gmail.com>2017-08-12 20:46:08 +0300
commit02332d596214c8e68bd3e86a8d0b90d3a4d60cf1 (patch)
tree10141d1b780c4693a000ebc13d77f1051a009d44 /test
parent6aca483b6046b7ec4a2ace6a0d1d3c2fd1022a36 (diff)
parentf8ba6937b9b649602f78c89397ec8e6cdd2c0b23 (diff)
Merge branch 'master' into next
Diffstat (limited to 'test')
-rwxr-xr-xtest/segments/dir.spec20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/segments/dir.spec b/test/segments/dir.spec
index f4842f38..bb0297e2 100755
--- a/test/segments/dir.spec
+++ b/test/segments/dir.spec
@@ -72,6 +72,26 @@ function testTruncationFromRightWorks() {
unset POWERLEVEL9K_SHORTEN_STRATEGY
}
+function testTruncationFromRightWithEmptyDelimiter() {
+ POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
+ POWERLEVEL9K_SHORTEN_DELIMITER=""
+ POWERLEVEL9K_SHORTEN_STRATEGY='truncate_from_right'
+
+ FOLDER=/tmp/powerlevel9k-test/1/12/123/1234/12345/123456/1234567/12345678/123456789
+ mkdir -p $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)"
+
+ cd -
+ rm -fr /tmp/powerlevel9k-test
+
+ unset FOLDER
+ unset POWERLEVEL9K_SHORTEN_DIR_LENGTH
+ unset POWERLEVEL9K_SHORTEN_DELIMITER
+ unset POWERLEVEL9K_SHORTEN_STRATEGY
+}
+
function testTruncateWithFolderMarkerWorks() {
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir)
POWERLEVEL9K_SHORTEN_STRATEGY="truncate_with_folder_marker"