Skip to content

Commit

Permalink
fix: address additional tests for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
reubeno committed Sep 26, 2024
1 parent 99c0926 commit c4e3d23
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions brush-shell/tests/cases/builtins/command.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ cases:
- name: "command -v"
stdin: |
command -v echo
command -v ls
command -v $(which ls)
command -v cat
command -v $(command -v cat)
command -v non-existent || echo "1. Not found"
command -v /usr/bin/non-existent || echo "2. Not found"
Expand Down
2 changes: 1 addition & 1 deletion brush-shell/tests/cases/builtins/dot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cases:
}
stdin: |
var="orig"
source script.sh
source ./script.sh
echo "var: ${var}"
script_func
Expand Down
5 changes: 3 additions & 2 deletions brush-shell/tests/cases/extended_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,10 @@ cases:
stdin: |
regex="^$"
[[ "" =~ '' ]] && echo "1. Matched"
# TODO: The commented out lines appear differ in behavior between versions of bash.
# [[ "" =~ '' ]] && echo "1. Matched"
[[ "" =~ '^$' ]] && echo "2. Matched"
[[ "" =~ "" ]] && echo "3. Matched"
# [[ "" =~ "" ]] && echo "3. Matched"
[[ "" =~ "^$" ]] && echo "4. Matched"
[[ "" =~ ^$ ]] && echo "5. Matched"
[[ "" =~ ${regex} ]] && echo "6. Matched"
Expand Down
4 changes: 2 additions & 2 deletions brush-shell/tests/cases/word_expansion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ cases:
echo "\${arr2@Q}: ${arr2@Q}"
- name: "Parameter quote transformations - K"
known_failure: true
skip: true # TODO: Figure out why this succeeds on macOS but fails on Linux
stdin: |
var='""'
echo "\${var@K}: ${var@K}"
Expand All @@ -720,7 +720,7 @@ cases:
echo "\${arr2[*]@K}: ${arr2[*]@K}"
- name: "Parameter quote transformations - k"
known_failure: true
skip: true # TODO: Figure out why this succeeds on macOS but fails on Linux
stdin: |
var='""'
echo "\${var@k}: ${var@k}"
Expand Down

0 comments on commit c4e3d23

Please sign in to comment.