From 4972f0b8eba711f0dafc46cdbb4e191d550da091 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Tue, 24 Jul 2018 16:24:33 +0200 Subject: Improve tests by making use of local variables --- test/functions/icons.spec | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'test/functions') diff --git a/test/functions/icons.spec b/test/functions/icons.spec index c8d88644..068062e6 100755 --- a/test/functions/icons.spec +++ b/test/functions/icons.spec @@ -10,21 +10,15 @@ function setUp() { _OLD_LC_CTYPE="${LC_CTYPE}" # Reset actual LC_CTYPE unset LC_CTYPE - - # Store old P9K mode - _OLD_P9K_MODE="${POWERLEVEL9K_MODE}" } function tearDown() { # Restore LC_CTYPE LC_CTYPE="${_OLD_LC_CTYPE}" - - # Restore old P9K mode - POWERLEVEL9K_MODE="${_OLD_P9K_MODE}" } function testLcCtypeIsSetCorrectlyInDefaultMode() { - POWERLEVEL9K_MODE="default" + local POWERLEVEL9K_MODE="default" # Load Powerlevel9k source functions/icons.zsh @@ -32,7 +26,7 @@ function testLcCtypeIsSetCorrectlyInDefaultMode() { } function testLcCtypeIsSetCorrectlyInAwesomePatchedMode() { - POWERLEVEL9K_MODE="awesome-patched" + local POWERLEVEL9K_MODE="awesome-patched" # Load Powerlevel9k source functions/icons.zsh @@ -40,7 +34,7 @@ function testLcCtypeIsSetCorrectlyInAwesomePatchedMode() { } function testLcCtypeIsSetCorrectlyInAwesomeFontconfigMode() { - POWERLEVEL9K_MODE="awesome-fontconfig" + local POWERLEVEL9K_MODE="awesome-fontconfig" # Load Powerlevel9k source functions/icons.zsh @@ -48,7 +42,7 @@ function testLcCtypeIsSetCorrectlyInAwesomeFontconfigMode() { } function testLcCtypeIsSetCorrectlyInNerdfontFontconfigMode() { - POWERLEVEL9K_MODE="nerdfont-fontconfig" + local POWERLEVEL9K_MODE="nerdfont-fontconfig" # Load Powerlevel9k source functions/icons.zsh @@ -56,7 +50,7 @@ function testLcCtypeIsSetCorrectlyInNerdfontFontconfigMode() { } function testLcCtypeIsSetCorrectlyInFlatMode() { - POWERLEVEL9K_MODE="flat" + local POWERLEVEL9K_MODE="flat" # Load Powerlevel9k source functions/icons.zsh @@ -64,7 +58,7 @@ function testLcCtypeIsSetCorrectlyInFlatMode() { } function testLcCtypeIsSetCorrectlyInCompatibleMode() { - POWERLEVEL9K_MODE="compatible" + local POWERLEVEL9K_MODE="compatible" # Load Powerlevel9k source functions/icons.zsh @@ -76,7 +70,7 @@ function testLcCtypeIsSetCorrectlyInCompatibleMode() { function testAllIconsAreDefinedLikeInDefaultMode() { # Always compare against this mode local _P9K_TEST_MODE="default" - POWERLEVEL9K_MODE="${_P9K_TEST_MODE}" + local POWERLEVEL9K_MODE="${_P9K_TEST_MODE}" source functions/icons.zsh # _ICONS_UNDER_TEST is an array of just the keys of $icons. # We later check via (r) "subscript" flag that our key @@ -148,7 +142,7 @@ function testAllIconsAreDefinedLikeInDefaultMode() { function testAllIconsAreDefinedLikeInAwesomePatchedMode() { # Always compare against this mode local _P9K_TEST_MODE="awesome-patched" - POWERLEVEL9K_MODE="$_P9K_TEST_MODE" + local POWERLEVEL9K_MODE="$_P9K_TEST_MODE" source functions/icons.zsh # _ICONS_UNDER_TEST is an array of just the keys of $icons. # We later check via (r) "subscript" flag that our key @@ -220,7 +214,7 @@ function testAllIconsAreDefinedLikeInAwesomePatchedMode() { function testAllIconsAreDefinedLikeInAwesomeFontconfigMode() { # Always compare against this mode local _P9K_TEST_MODE="awesome-fontconfig" - POWERLEVEL9K_MODE="$_P9K_TEST_MODE" + local POWERLEVEL9K_MODE="$_P9K_TEST_MODE" source functions/icons.zsh # _ICONS_UNDER_TEST is an array of just the keys of $icons. # We later check via (r) "subscript" flag that our key @@ -292,7 +286,7 @@ function testAllIconsAreDefinedLikeInAwesomeFontconfigMode() { function testAllIconsAreDefinedLikeInNerdfontFontconfigMode() { # Always compare against this mode local _P9K_TEST_MODE="nerdfont-fontconfig" - POWERLEVEL9K_MODE="$_P9K_TEST_MODE" + local POWERLEVEL9K_MODE="$_P9K_TEST_MODE" source functions/icons.zsh # _ICONS_UNDER_TEST is an array of just the keys of $icons. # We later check via (r) "subscript" flag that our key -- cgit v1.2.3 From 99f0eddd62806f99b8116e3f327689bc32529d5d Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Tue, 24 Jul 2018 16:34:10 +0200 Subject: Add tests for nerdfont-complete icons --- test/functions/icons.spec | 117 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) (limited to 'test/functions') diff --git a/test/functions/icons.spec b/test/functions/icons.spec index 068062e6..d4ddc805 100755 --- a/test/functions/icons.spec +++ b/test/functions/icons.spec @@ -115,6 +115,15 @@ function testAllIconsAreDefinedLikeInDefaultMode() { assertTrue "The key ${key} does exist in ${_P9K_TEST_MODE} mode, but not in ${POWERLEVEL9K_MODE}!" "(( ${+current_icons[(r)$key]} ))" done + # Switch to "nerdfont-complete" mode + POWERLEVEL9K_MODE="nerdfont-complete" + source functions/icons.zsh + typeset -ah current_icons + current_icons=(${(k)icons[@]}) + for key in ${_ICONS_UNDER_TEST}; do + assertTrue "The key ${key} does exist in ${_P9K_TEST_MODE} mode, but not in ${POWERLEVEL9K_MODE}!" "(( ${+current_icons[(r)$key]} ))" + done + # Switch to "flat" mode POWERLEVEL9K_MODE="flat" source functions/icons.zsh @@ -187,6 +196,15 @@ function testAllIconsAreDefinedLikeInAwesomePatchedMode() { assertTrue "The key ${key} does exist in ${_P9K_TEST_MODE} mode, but not in ${POWERLEVEL9K_MODE}!" "(( ${+current_icons[(r)$key]} ))" done + # Switch to "nerdfont-complete" mode + POWERLEVEL9K_MODE="nerdfont-complete" + source functions/icons.zsh + typeset -ah current_icons + current_icons=(${(k)icons[@]}) + for key in ${_ICONS_UNDER_TEST}; do + assertTrue "The key ${key} does exist in ${_P9K_TEST_MODE} mode, but not in ${POWERLEVEL9K_MODE}!" "(( ${+current_icons[(r)$key]} ))" + done + # Switch to "flat" mode POWERLEVEL9K_MODE="flat" source functions/icons.zsh @@ -259,6 +277,15 @@ function testAllIconsAreDefinedLikeInAwesomeFontconfigMode() { assertTrue "The key ${key} does exist in ${_P9K_TEST_MODE} mode, but not in ${POWERLEVEL9K_MODE}!" "(( ${+current_icons[(r)$key]} ))" done + # Switch to "nerdfont-complete" mode + POWERLEVEL9K_MODE="nerdfont-complete" + source functions/icons.zsh + typeset -ah current_icons + current_icons=(${(k)icons[@]}) + for key in ${_ICONS_UNDER_TEST}; do + assertTrue "The key ${key} does exist in ${_P9K_TEST_MODE} mode, but not in ${POWERLEVEL9K_MODE}!" "(( ${+current_icons[(r)$key]} ))" + done + # Switch to "flat" mode POWERLEVEL9K_MODE="flat" source functions/icons.zsh @@ -331,6 +358,96 @@ function testAllIconsAreDefinedLikeInNerdfontFontconfigMode() { assertTrue "The key ${key} does exist in ${_P9K_TEST_MODE} mode, but not in ${POWERLEVEL9K_MODE}!" "(( ${+current_icons[(r)$key]} ))" done + # Switch to "nerdfont-complete" mode + POWERLEVEL9K_MODE="nerdfont-complete" + source functions/icons.zsh + typeset -ah current_icons + current_icons=(${(k)icons[@]}) + for key in ${_ICONS_UNDER_TEST}; do + assertTrue "The key ${key} does exist in ${_P9K_TEST_MODE} mode, but not in ${POWERLEVEL9K_MODE}!" "(( ${+current_icons[(r)$key]} ))" + done + + # Switch to "flat" mode + POWERLEVEL9K_MODE="flat" + source functions/icons.zsh + typeset -ah current_icons + current_icons=(${(k)icons[@]}) + for key in ${_ICONS_UNDER_TEST}; do + assertTrue "The key ${key} does exist in ${_P9K_TEST_MODE} mode, but not in ${POWERLEVEL9K_MODE}!" "(( ${+current_icons[(r)$key]} ))" + done + + # Switch to "compatible" mode + POWERLEVEL9K_MODE="compatible" + source functions/icons.zsh + typeset -ah current_icons + current_icons=(${(k)icons[@]}) + for key in ${_ICONS_UNDER_TEST}; do + assertTrue "The key ${key} does exist in ${_P9K_TEST_MODE} mode, but not in ${POWERLEVEL9K_MODE}!" "(( ${+current_icons[(r)$key]} ))" + done + + unset current_icons + unset _ICONS_UNDER_TEST +} + +# Go through all icons defined in nerdfont-complete mode, and +# check if all of them are defined in the other modes. +function testAllIconsAreDefinedLikeInNerdfontCompleteMode() { + # Always compare against this mode + local _P9K_TEST_MODE="nerdfont-complete" + local POWERLEVEL9K_MODE="$_P9K_TEST_MODE" + source functions/icons.zsh + # _ICONS_UNDER_TEST is an array of just the keys of $icons. + # We later check via (r) "subscript" flag that our key + # is in the values of our flat array. + typeset -ah _ICONS_UNDER_TEST + _ICONS_UNDER_TEST=(${(k)icons[@]}) + + # Switch to "default" mode + POWERLEVEL9K_MODE="default" + source functions/icons.zsh + typeset -ah current_icons + current_icons=(${(k)icons[@]}) + for key in ${_ICONS_UNDER_TEST}; do + # Iterate over all keys found in the _ICONS_UNDER_TEST + # array and compare it with the icons array of the + # current POWERLEVEL9K_MODE. + # Use parameter expansion, to directly check if the + # key exists in the flat current array of keys. That + # is quite complicated, but there seems no easy way + # to check the mere existance of a key in an array. + # The usual way would always return the value, so that + # would do the wrong thing as we have some (on purpose) + # empty values. + assertTrue "The key ${key} does exist in ${_P9K_TEST_MODE} mode, but not in ${POWERLEVEL9K_MODE}!" "(( ${+current_icons[(r)$key]} ))" + done + + # Switch to "awesome-patched" mode + POWERLEVEL9K_MODE="awesome-patched" + source functions/icons.zsh + typeset -ah current_icons + current_icons=(${(k)icons[@]}) + for key in ${_ICONS_UNDER_TEST}; do + assertTrue "The key ${key} does exist in ${_P9K_TEST_MODE} mode, but not in ${POWERLEVEL9K_MODE}!" "(( ${+current_icons[(r)$key]} ))" + done + + # Switch to "awesome-fontconfig" mode + POWERLEVEL9K_MODE="awesome-fontconfig" + source functions/icons.zsh + typeset -ah current_icons + current_icons=(${(k)icons[@]}) + for key in ${_ICONS_UNDER_TEST}; do + assertTrue "The key ${key} does exist in ${_P9K_TEST_MODE} mode, but not in ${POWERLEVEL9K_MODE}!" "(( ${+current_icons[(r)$key]} ))" + done + + # Switch to "nerdfont-fontconfig" mode + POWERLEVEL9K_MODE="nerdfont-fontconfig" + source functions/icons.zsh + typeset -ah current_icons + current_icons=(${(k)icons[@]}) + for key in ${_ICONS_UNDER_TEST}; do + assertTrue "The key ${key} does exist in ${_P9K_TEST_MODE} mode, but not in ${POWERLEVEL9K_MODE}!" "(( ${+current_icons[(r)$key]} ))" + done + # Switch to "flat" mode POWERLEVEL9K_MODE="flat" source functions/icons.zsh -- cgit v1.2.3 From 81fd69ae98337c20cb3e530d4efe13bec2fb3b20 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Sat, 4 Aug 2018 17:34:52 +0200 Subject: Update shunit2 to newest version --- shunit2 | 2 +- test/core/color_overriding.spec | 2 +- test/core/joining_segments.spec | 2 +- test/core/prompt.spec | 2 +- test/core/visual_identifier.spec | 2 +- test/functions/colors.spec | 2 +- test/functions/icons.spec | 2 +- test/functions/utilities.spec | 2 +- test/powerlevel9k.spec | 2 +- test/segments/anaconda.spec | 2 +- test/segments/aws_eb_env.spec | 2 +- test/segments/background_jobs.spec | 2 +- test/segments/battery.spec | 2 +- test/segments/command_execution_time.spec | 2 +- test/segments/context.spec | 2 +- test/segments/custom.spec | 2 +- test/segments/detect_virt.spec | 2 +- test/segments/dir.spec | 2 +- test/segments/disk_usage.spec | 2 +- test/segments/go_version.spec | 2 +- test/segments/ip.spec | 2 +- test/segments/kubecontext.spec | 2 +- test/segments/laravel_version.spec | 2 +- test/segments/load.spec | 2 +- test/segments/node_version.spec | 2 +- test/segments/nodeenv.spec | 2 +- test/segments/nvm.spec | 2 +- test/segments/php_version.spec | 2 +- test/segments/public_ip.spec | 2 +- test/segments/ram.spec | 2 +- test/segments/rust_version.spec | 2 +- test/segments/ssh.spec | 2 +- test/segments/status.spec | 2 +- test/segments/swap.spec | 2 +- test/segments/swift_version.spec | 2 +- test/segments/symfony_version.spec | 2 +- test/segments/todo.spec | 2 +- test/segments/vcs-git.spec | 2 +- test/segments/vcs-hg.spec | 2 +- test/segments/vi_mode.spec | 2 +- 40 files changed, 40 insertions(+), 40 deletions(-) (limited to 'test/functions') diff --git a/shunit2 b/shunit2 index 60dd60bc..07bb3292 160000 --- a/shunit2 +++ b/shunit2 @@ -1 +1 @@ -Subproject commit 60dd60bcd1573befe38465010263ab242e55811d +Subproject commit 07bb3292048a4982aad7247bdd7890f2bf532ece diff --git a/test/core/color_overriding.spec b/test/core/color_overriding.spec index ead890d7..48b30f00 100755 --- a/test/core/color_overriding.spec +++ b/test/core/color_overriding.spec @@ -59,4 +59,4 @@ function testColorOverridingOfCustomSegment() { assertEquals "%K{red} %F{green%}CW %f%F{red}world %k%F{red}%f " "$(build_left_prompt)" } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/core/joining_segments.spec b/test/core/joining_segments.spec index 708e9bf1..f224007e 100755 --- a/test/core/joining_segments.spec +++ b/test/core/joining_segments.spec @@ -184,4 +184,4 @@ function testRightJoiningBuiltinSegmentWorks() { unalias php } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/core/prompt.spec b/test/core/prompt.spec index 42518f06..dd5bba58 100755 --- a/test/core/prompt.spec +++ b/test/core/prompt.spec @@ -101,4 +101,4 @@ function testPrefixingSecondLineOnLeftPrompt() { assertEquals "╭─%f%b%k%K{white} %F{black}world1 %k%F{white}%f ${nl}XXX" "${(e)PROMPT}" } -source shunit2/source/2.1/src/shunit2 +source shunit2/shunit2 diff --git a/test/core/visual_identifier.spec b/test/core/visual_identifier.spec index db9896db..c6b1125b 100755 --- a/test/core/visual_identifier.spec +++ b/test/core/visual_identifier.spec @@ -47,4 +47,4 @@ function testVisualIdentifierPrintsNothingIfNotAvailable() { assertEquals "%K{white} %F{black}world1 %k%F{white}%f " "$(build_left_prompt)" } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/functions/colors.spec b/test/functions/colors.spec index 61a40087..bb06b719 100755 --- a/test/functions/colors.spec +++ b/test/functions/colors.spec @@ -39,4 +39,4 @@ function testIsSameColorDoesNotYieldNotEqualColorsTruthy() { } -source shunit2/source/2.1/src/shunit2 +source shunit2/shunit2 diff --git a/test/functions/icons.spec b/test/functions/icons.spec index d4ddc805..ec0cb1fa 100755 --- a/test/functions/icons.spec +++ b/test/functions/icons.spec @@ -470,4 +470,4 @@ function testAllIconsAreDefinedLikeInNerdfontCompleteMode() { unset _ICONS_UNDER_TEST } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/functions/utilities.spec b/test/functions/utilities.spec index a9bd67e3..b727c1f6 100755 --- a/test/functions/utilities.spec +++ b/test/functions/utilities.spec @@ -106,4 +106,4 @@ function testSegmentShouldNotBeJoinedIfPredecessingSegmentIsNotJoinedButConditio unset segments } -source shunit2/source/2.1/src/shunit2 +source shunit2/shunit2 diff --git a/test/powerlevel9k.spec b/test/powerlevel9k.spec index 57f85c98..8de0f1e2 100755 --- a/test/powerlevel9k.spec +++ b/test/powerlevel9k.spec @@ -120,4 +120,4 @@ function testNewlineOnRpromptCanBeDisabled() { assertEquals '$(print_icon MULTILINE_FIRST_PROMPT_PREFIX) world  $(print_icon MULTILINE_LAST_PROMPT_PREFIX) rworld' "$(print -P ${PROMPT}${RPROMPT})" } -source shunit2/source/2.1/src/shunit2 +source shunit2/shunit2 diff --git a/test/segments/anaconda.spec b/test/segments/anaconda.spec index 2aa8d272..c35f0494 100755 --- a/test/segments/anaconda.spec +++ b/test/segments/anaconda.spec @@ -66,4 +66,4 @@ function testAnacondaSegmentWorks() { assertEquals "%K{blue} %F{black%}icon-here %f%F{black}(tmptest) %k%F{blue}%f " "$(build_left_prompt)" } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/aws_eb_env.spec b/test/segments/aws_eb_env.spec index 42740ea6..92240e42 100755 --- a/test/segments/aws_eb_env.spec +++ b/test/segments/aws_eb_env.spec @@ -58,4 +58,4 @@ function testAwsEbEnvSegmentWorksIfElasticBeanstalkEnvironmentIsSetInParentDirec cd - } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/background_jobs.spec b/test/segments/background_jobs.spec index 0a61c3e1..fa8d5ce6 100755 --- a/test/segments/background_jobs.spec +++ b/test/segments/background_jobs.spec @@ -75,4 +75,4 @@ function testBackgroundJobsSegmentWithVerboseMode() { unfunction jobs } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/battery.spec b/test/segments/battery.spec index 835e1468..4f81eaec 100755 --- a/test/segments/battery.spec +++ b/test/segments/battery.spec @@ -170,4 +170,4 @@ function testBatterySegmentIfBatteryIsCalculatingWithAcpiEnabledOnLinux() { assertEquals "%K{black} %F{white%}🔋 %f%F{white}50%% (...) " "$(prompt_battery left 1 false ${FOLDER})" } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/command_execution_time.spec b/test/segments/command_execution_time.spec index 65623a00..b47d3fc9 100755 --- a/test/segments/command_execution_time.spec +++ b/test/segments/command_execution_time.spec @@ -101,4 +101,4 @@ function testCommandExecutionTimeIsFormattedHumandReadbleForHourLongCommand() { assertEquals "%K{red} %F{yellow1%}Dur %f%F{yellow1}02:00:00 %k%F{red}%f " "$(build_left_prompt)" } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/context.spec b/test/segments/context.spec index 2cef90dd..0805474f 100755 --- a/test/segments/context.spec +++ b/test/segments/context.spec @@ -103,4 +103,4 @@ function testContextSegmentIsShownIfForced() { assertEquals "%K{black} %F{yellow}$(whoami) %k%F{black}%f " "$(build_left_prompt)" } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/custom.spec b/test/segments/custom.spec index b7719d1c..3062d2e5 100755 --- a/test/segments/custom.spec +++ b/test/segments/custom.spec @@ -83,4 +83,4 @@ function testSettingVisualIdentifierForegroundColorForCustomSegment() { assertEquals "%K{white} %F{red%}hw %f%F{black}world %k%F{white}%f " "$(build_left_prompt)" } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/detect_virt.spec b/test/segments/detect_virt.spec index 7df92a24..f5c54198 100755 --- a/test/segments/detect_virt.spec +++ b/test/segments/detect_virt.spec @@ -80,4 +80,4 @@ function testDetectVirtSegmentIfRootFsIsNotOnExpectedInode() { unalias systemd-detect-virt } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/dir.spec b/test/segments/dir.spec index 1f0440cd..09fa8505 100755 --- a/test/segments/dir.spec +++ b/test/segments/dir.spec @@ -768,4 +768,4 @@ function testDirSeparatorColorRootSubSubdirWorks() { rm -fr /tmp/powerlevel9k-test } -source shunit2/source/2.1/src/shunit2 +source shunit2/shunit2 diff --git a/test/segments/disk_usage.spec b/test/segments/disk_usage.spec index ece19bb5..80fc996f 100755 --- a/test/segments/disk_usage.spec +++ b/test/segments/disk_usage.spec @@ -128,4 +128,4 @@ function testDiskUsageSegmentCriticalLevelCouldBeAdjusted() { unfunction df } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/go_version.spec b/test/segments/go_version.spec index 6d8f13b9..6260aaf5 100755 --- a/test/segments/go_version.spec +++ b/test/segments/go_version.spec @@ -85,4 +85,4 @@ function testGoSegmentPrintsNothingIfGoIsNotAvailable() { unalias go } -source shunit2/source/2.1/src/shunit2 +source shunit2/shunit2 diff --git a/test/segments/ip.spec b/test/segments/ip.spec index 190953ad..8ffb41eb 100755 --- a/test/segments/ip.spec +++ b/test/segments/ip.spec @@ -228,4 +228,4 @@ inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0 unfunction ip } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/kubecontext.spec b/test/segments/kubecontext.spec index 746ab806..b954de4a 100755 --- a/test/segments/kubecontext.spec +++ b/test/segments/kubecontext.spec @@ -101,4 +101,4 @@ function testKubeContextPrintsNothingIfKubectlNotAvailable() { unalias kubectl } -source shunit2/source/2.1/src/shunit2 +source shunit2/shunit2 diff --git a/test/segments/laravel_version.spec b/test/segments/laravel_version.spec index f4fd704d..88818c6a 100755 --- a/test/segments/laravel_version.spec +++ b/test/segments/laravel_version.spec @@ -68,4 +68,4 @@ function testLaravelVersionSegmentPrintsNothingIfPhpIsNotAvailable() { unalias php } -source shunit2/source/2.1/src/shunit2 +source shunit2/shunit2 diff --git a/test/segments/load.spec b/test/segments/load.spec index f7c1b9be..9caa82c3 100755 --- a/test/segments/load.spec +++ b/test/segments/load.spec @@ -146,4 +146,4 @@ function testLoadSegmentCriticalState() { unalias nproc } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/node_version.spec b/test/segments/node_version.spec index d003f5c3..1627f436 100755 --- a/test/segments/node_version.spec +++ b/test/segments/node_version.spec @@ -38,4 +38,4 @@ function testNodeVersionSegmentWorks() { unfunction node } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/nodeenv.spec b/test/segments/nodeenv.spec index aff22586..b72b426a 100755 --- a/test/segments/nodeenv.spec +++ b/test/segments/nodeenv.spec @@ -96,4 +96,4 @@ function testNodeenvSegmentWorks() { unset NODE_VIRTUAL_ENV } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/nvm.spec b/test/segments/nvm.spec index c8e99ea3..83d4c8f6 100755 --- a/test/segments/nvm.spec +++ b/test/segments/nvm.spec @@ -69,4 +69,4 @@ function testNvmSegmentPrintsNothingWhenOnDefaultVersion() { assertEquals "%K{white} %F{black}world %k%F{white}%f " "$(build_left_prompt)" } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/php_version.spec b/test/segments/php_version.spec index 4b9ab753..1a3ec91b 100755 --- a/test/segments/php_version.spec +++ b/test/segments/php_version.spec @@ -39,4 +39,4 @@ Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies unalias php } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/public_ip.spec b/test/segments/public_ip.spec index c4b2ae88..9a2dcdab 100755 --- a/test/segments/public_ip.spec +++ b/test/segments/public_ip.spec @@ -219,4 +219,4 @@ function testPublicIpSegmentWhenGoingOnline() { unfunction dig } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/ram.spec b/test/segments/ram.spec index dc0b6c6b..f1331427 100755 --- a/test/segments/ram.spec +++ b/test/segments/ram.spec @@ -63,4 +63,4 @@ function testRamSegmentWorksOnLinux() { assertEquals "%K{yellow} %F{black%}RAM %f%F{black}0.29G " "$(prompt_ram left 1 false ${FOLDER})" } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/rust_version.spec b/test/segments/rust_version.spec index 583807a6..9643125f 100755 --- a/test/segments/rust_version.spec +++ b/test/segments/rust_version.spec @@ -48,4 +48,4 @@ function testRustPrintsNothingIfRustIsNotAvailable() { assertEquals "%K{white} %F{black}world %k%F{white}%f " "$(build_left_prompt)" } -source shunit2/source/2.1/src/shunit2 +source shunit2/shunit2 diff --git a/test/segments/ssh.spec b/test/segments/ssh.spec index a6701dcf..36971e13 100755 --- a/test/segments/ssh.spec +++ b/test/segments/ssh.spec @@ -77,4 +77,4 @@ function testSshSegmentWorksIfAllNecessaryVariablesAreSet() { unset SSH_CLIENT } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/status.spec b/test/segments/status.spec index b3ba3e36..97dc6b31 100755 --- a/test/segments/status.spec +++ b/test/segments/status.spec @@ -110,4 +110,4 @@ function testStatusSegmentIntegrated() { assertEquals "%f%b%k%K{black} %F{red%}✘%f %k%F{black}%f " "${(e)PROMPT}" } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/swap.spec b/test/segments/swap.spec index 20a2d40a..2f4fbbf1 100755 --- a/test/segments/swap.spec +++ b/test/segments/swap.spec @@ -55,4 +55,4 @@ function testSwapSegmentWorksOnLinux() { assertEquals "%K{yellow} %F{black%}SWP %f%F{black}0.95G " "$(prompt_swap left 1 false ${FOLDER})" } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/swift_version.spec b/test/segments/swift_version.spec index da9aaa92..4b7c6351 100755 --- a/test/segments/swift_version.spec +++ b/test/segments/swift_version.spec @@ -54,4 +54,4 @@ function testSwiftSegmentWorks() { unfunction swift } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/symfony_version.spec b/test/segments/symfony_version.spec index 99dea476..89a2e0be 100755 --- a/test/segments/symfony_version.spec +++ b/test/segments/symfony_version.spec @@ -114,4 +114,4 @@ function testSymfonyVersionSegmentWorksInNestedFolder() { unfunction php } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/todo.spec b/test/segments/todo.spec index 7f1d7fba..488dc993 100755 --- a/test/segments/todo.spec +++ b/test/segments/todo.spec @@ -55,4 +55,4 @@ function testTodoSegmentWorksAsExpected() { assertEquals "%K{244} %F{black%}☑ %f%F{black}100 %k%F{grey50}%f " "$(build_left_prompt)" } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/vcs-git.spec b/test/segments/vcs-git.spec index f78012dd..b84e08d9 100755 --- a/test/segments/vcs-git.spec +++ b/test/segments/vcs-git.spec @@ -375,4 +375,4 @@ function testShorteningCommitHashIsNotShownIfShowChangesetIsFalse() { assertEquals "%K{green} %F{black} master %k%F{green}%f " "$(build_left_prompt)" } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/vcs-hg.spec b/test/segments/vcs-hg.spec index 3074952a..ff84a3d6 100755 --- a/test/segments/vcs-hg.spec +++ b/test/segments/vcs-hg.spec @@ -204,4 +204,4 @@ function testBookmarkIconWorks() { assertEquals "%K{green} %F{black} default Binitial %k%F{green}%f " "$(build_left_prompt)" } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file diff --git a/test/segments/vi_mode.spec b/test/segments/vi_mode.spec index 5bed38bd..8913dfea 100755 --- a/test/segments/vi_mode.spec +++ b/test/segments/vi_mode.spec @@ -45,4 +45,4 @@ function testViInsertModeStringIsCustomizable() { assertEquals "%K{black} %F{blue}INSERT " "$(prompt_vi_mode left 1 false)" } -source shunit2/source/2.1/src/shunit2 \ No newline at end of file +source shunit2/shunit2 \ No newline at end of file -- cgit v1.2.3