File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,6 +130,11 @@ function test_install_downloads_the_given_version_without_dir() {
130130}
131131
132132function test_install_downloads_the_non_stable_beta_version() {
133+ # Skip on Bash 3.0 - mocks don't work for external scripts
134+ if [[ " ${BASH_VERSINFO[0]} " -eq 3 ]] && [[ " ${BASH_VERSINFO[1]} " -lt 1 ]]; then
135+ bashunit::skip " Mocks don't work for external scripts in Bash 3.0"
136+ return
137+ fi
133138 if [[ " $ACTIVE_INTERNET " -eq 1 ]]; then
134139 bashunit::skip " no internet connection" && return
135140 fi
Original file line number Diff line number Diff line change @@ -16,6 +16,12 @@ function test_mock_ps_when_executing_a_sourced_function() {
1616}
1717
1818function test_spy_commands_called_when_executing_a_script() {
19+ # Skip on Bash 3.0 - shell function exports don't work for external scripts
20+ if [[ " ${BASH_VERSINFO[0]} " -eq 3 ]] && [[ " ${BASH_VERSINFO[1]} " -lt 1 ]]; then
21+ bashunit::skip " Spies don't work for external scripts in Bash 3.0"
22+ return
23+ fi
24+
1925 bashunit::spy ps
2026 bashunit::spy awk
2127 bashunit::spy head
@@ -41,6 +47,11 @@ function test_spy_commands_called_when_executing_a_sourced_function() {
4147}
4248
4349function test_spy_commands_called_once_when_executing_a_script() {
50+ # Skip on Bash 3.0 - shell function exports don't work for external scripts
51+ if [[ " ${BASH_VERSINFO[0]} " -eq 3 ]] && [[ " ${BASH_VERSINFO[1]} " -lt 1 ]]; then
52+ bashunit::skip " Spies don't work for external scripts in Bash 3.0"
53+ return
54+ fi
4455 # Skip when coverage is enabled because coverage uses head internally,
4556 # which interferes with spying on head
4657 if bashunit::env::is_coverage_enabled; then
You can’t perform that action at this time.
0 commit comments