-
-
Notifications
You must be signed in to change notification settings - Fork 41
Lower bash support from 3.2 to 3.0 #493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Chemaclass
wants to merge
12
commits into
main
Choose a base branch
from
feat/468-bash-support-3.0
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
087e31d
feat: lower bash support from 3.2 to 3.0
Chemaclass 2fe286f
refactor: support bash 3.0 arrays
Chemaclass c9ba457
fix: linter
Chemaclass 0ab6f6b
fix: linter
Chemaclass ab46d80
ref: bashunit support bash3.0
Chemaclass baef9bf
Merge branch 'main' into feat/468-bash-support-3.0
Chemaclass 76db26f
chore: adjust code for bash3.0 compatibility
Chemaclass 1f09ad9
chore: add gh workflow bash3.0
Chemaclass 239194e
chore: run bash3.0 ci in async
Chemaclass 96ec56f
fix: .github/workflows/bash30-tests.yml
Chemaclass 8dfdc07
fix: .github/workflows/bash30-tests.yml linter
Chemaclass 6200c66
fix: shellcheck
Chemaclass File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -192,9 +192,16 @@ function runner::call_test_functions() { | |
|
|
||
| local provider_data | ||
| provider_data=() | ||
| while IFS=" " read -r line; do | ||
| provider_data+=("$line") | ||
| done <<< "$(helper::get_provider_data "$fn_name" "$script")" | ||
| local provider_output | ||
| provider_output="$(helper::get_provider_data "$fn_name" "$script")" | ||
| if [[ -n "$provider_output" ]]; then | ||
| local line | ||
| while IFS=" " read -r line; do | ||
| provider_data+=("$line") | ||
|
||
| done << EOF | ||
| $provider_output | ||
| EOF | ||
| fi | ||
|
|
||
| # No data provider found | ||
| if [[ "${#provider_data[@]}" -eq 0 ]]; then | ||
|
|
@@ -207,9 +214,14 @@ function runner::call_test_functions() { | |
| for data in "${provider_data[@]}"; do | ||
| local parsed_data | ||
| parsed_data=() | ||
| local args_output | ||
| args_output="$(runner::parse_data_provider_args "$data")" | ||
| local line | ||
| while IFS= read -r line; do | ||
| parsed_data+=( "$(helper::decode_base64 "${line}")" ) | ||
| done <<< "$(runner::parse_data_provider_args "$data")" | ||
| done << EOF | ||
| $args_output | ||
| EOF | ||
| runner::run_test "$script" "$fn_name" "${parsed_data[@]}" | ||
| done | ||
| unset fn_name | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lines 50 and 244:
local name=(...)creates a scalar variablelocal name="(...)"in Bash 3.0. It doesn't create an array.lines 53, 124, 306, and 326: Loop variables
i,fn, andlineare leaked.