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() {
29
29
EOF
30
30
}
31
31
32
+ echo_bpm_source_bpm_load () {
33
+ cat << -"EOF "
34
+ # bpm-load
35
+ source 'bpm-load'
36
+
37
+ EOF
38
+ }
39
+
32
40
# For each shell, items are printed in order
33
41
# - Setting bpm variables
34
42
# - Sourcing bpm completion
@@ -86,6 +94,7 @@ do-init() {
86
94
87
95
EOF
88
96
echo_bpm_include_posix
97
+ echo_bpm_source_bpm_load
89
98
90
99
echo_bpm_package_path_posix
91
100
cat << -"EOF "
@@ -107,6 +116,7 @@ do-init() {
107
116
EOF
108
117
109
118
echo_bpm_include_posix
119
+ echo_bpm_source_bpm_load
110
120
111
121
echo_bpm_package_path_posix
112
122
cat << -"EOF "
Original file line number Diff line number Diff line change @@ -20,7 +20,26 @@ load './util/init.sh'
20
20
assert test_util.is_exported ' BPM_CELLAR'
21
21
}
22
22
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" {
24
43
run do-init fakesh
25
44
26
45
assert_failure
You can’t perform that action at this time.
0 commit comments