File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed
Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 1+ # bpm-load
2+
3+ The ` bpm-load ` is available for ` Bash ` and ` Zsh ` environments
Original file line number Diff line number Diff line change @@ -29,6 +29,14 @@ echo_bpm_package_path_posix() {
2929 EOF
3030}
3131
32+ echo_bpm_source_bpm_load () {
33+ cat << -"EOF "
34+ # bpm-load
35+ source 'bpm-load'
36+
37+ EOF
38+ }
39+
3240# For each shell, items are printed in order
3341# - Setting bpm variables
3442# - Sourcing bpm completion
@@ -86,6 +94,7 @@ do-init() {
8694
8795 EOF
8896 echo_bpm_include_posix
97+ echo_bpm_source_bpm_load
8998
9099 echo_bpm_package_path_posix
91100 cat << -"EOF "
@@ -107,6 +116,7 @@ do-init() {
107116 EOF
108117
109118 echo_bpm_include_posix
119+ echo_bpm_source_bpm_load
110120
111121 echo_bpm_package_path_posix
112122 cat << -"EOF "
Original file line number Diff line number Diff line change @@ -20,7 +20,26 @@ load './util/init.sh'
2020 assert test_util.is_exported ' BPM_CELLAR'
2121}
2222
23- @test " errors if shell is not available" {
23+ @test " sources bpm-load for Bash" {
24+ BPM_REPO_SOURCE=" $BPM_TEST_REPO_ROOT /../source"
25+
26+ eval " $( do-init bash) "
27+
28+ assert_success
29+ assert [ " $( type -t bpm-load) " = ' function' ]
30+ }
31+
32+
33+ @test " sources bpm-load for Zsh" {
34+ BPM_REPO_SOURCE=" $BPM_TEST_REPO_ROOT /../source"
35+
36+ eval " $( do-init zsh) "
37+
38+ assert_success
39+ assert [ " $( type -t bpm-load) " = ' function' ]
40+ }
41+
42+ @test " fails if shell is not available" {
2443 run do-init fakesh
2544
2645 assert_failure
You can’t perform that action at this time.
0 commit comments