aboutsummaryrefslogtreecommitdiff
path: root/test/segments/vcs-hg.spec
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2018-11-15 03:55:42 +0300
committerDominik Ritter <dritter03@googlemail.com>2018-11-17 00:20:08 +0300
commit1b7e41964c84b124e91fafec66230c7c678a4145 (patch)
treec4fef09cb61947f754a033dfa3aa4a4bd139b0ff /test/segments/vcs-hg.spec
parent7bc5366af1abb572238aa24dfe2552aed1fab966 (diff)
Fix configuration errors in the tests
Diffstat (limited to 'test/segments/vcs-hg.spec')
-rwxr-xr-xtest/segments/vcs-hg.spec4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/segments/vcs-hg.spec b/test/segments/vcs-hg.spec
index 53afbaac..de7c5d38 100755
--- a/test/segments/vcs-hg.spec
+++ b/test/segments/vcs-hg.spec
@@ -205,6 +205,8 @@ function testBookmarkIconWorks() {
}
function testBranchNameScriptingVulnerability() {
+ local -a POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
+ POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(vcs)
echo "#!/bin/sh\n\necho 'hacked'\n" > evil_script.sh
chmod +x evil_script.sh
@@ -212,7 +214,7 @@ function testBranchNameScriptingVulnerability() {
hg add . >/dev/null
hg commit -m "Initial commit" >/dev/null
- assertEquals "%K{002} %F{000} %f%F{000} \$(./evil_script.sh) %k%F{002}%f " "$(build_left_prompt)"
+ assertEquals "%K{002} %F{000} \$(./evil_script.sh) %k%F{002}%f " "$(build_left_prompt)"
}
source shunit2/shunit2