From 06de83cc0f2282b2217c6151277dfd6789593c2e Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Wed, 25 Jul 2018 07:52:06 +0200 Subject: Prepare tests for performance optimizations --- test/segments/detect_virt.spec | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/segments/detect_virt.spec') diff --git a/test/segments/detect_virt.spec b/test/segments/detect_virt.spec index 2dad6af0..7df92a24 100755 --- a/test/segments/detect_virt.spec +++ b/test/segments/detect_virt.spec @@ -17,6 +17,9 @@ function testDetectVirtSegmentPrintsNothingIfSystemdIsNotAvailable() { local POWERLEVEL9K_CUSTOM_WORLD='echo world' alias systemd-detect-virt="novirt" + # Load Powerlevel9k + source powerlevel9k.zsh-theme + assertEquals "%K{white} %F{black}world %k%F{white}%f " "$(build_left_prompt)" unalias systemd-detect-virt @@ -27,6 +30,9 @@ function testDetectVirtSegmentIfSystemdReturnsPlainName() { POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(detect_virt) alias systemd-detect-virt="echo 'xxx'" + # Load Powerlevel9k + source powerlevel9k.zsh-theme + assertEquals "%K{black} %F{yellow}xxx %k%F{black}%f " "$(build_left_prompt)" unalias systemd-detect-virt @@ -40,6 +46,9 @@ function testDetectVirtSegmentIfRootFsIsOnExpectedInode() { # directory having the inode number "2".. alias systemd-detect-virt="echo 'none'" + # Load Powerlevel9k + source powerlevel9k.zsh-theme + # The original command in the implementation is "ls -di / | grep -o 2", # which translates to: Show the inode number of "/" and test if it is "2". alias ls="echo '2'" @@ -58,6 +67,9 @@ function testDetectVirtSegmentIfRootFsIsNotOnExpectedInode() { # directory having the inode number "2".. alias systemd-detect-virt="echo 'none'" + # Load Powerlevel9k + source powerlevel9k.zsh-theme + # The original command in the implementation is "ls -di / | grep -o 2", # which translates to: Show the inode number of "/" and test if it is "2". alias ls="echo '3'" -- cgit v1.2.3