Skip to content

Commit

Permalink
[zsh] use interactive shell for running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ghthor committed Feb 23, 2024
1 parent 09873d9 commit a5f6af9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: test
env:
TEST_SHELLS: ${{ matrix.test_shell }}
run: nix-shell -p ruby $TEST_SHELLS --run ./run_tests.sh
run: nix-shell -p ruby $TEST_SHELLS --command ./run_tests.sh
# - run: nix-shell -p shunit2 -i ./run_tests.sh
# - run: nix build
# - run: nix flake check
11 changes: 1 addition & 10 deletions test/lib/git/status_shortcuts_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,7 @@ test_git_commit_prompt() {
export HISTFILESIZE=1000
export HISTSIZE=1000

if [[ $shell == "zsh" ]]; then
export SAVEHIST=1000
zsh_appendhistory=$( (setopt | grep -q appendhistory) && echo "true")
if [ "$zsh_appendhistory" != "true" ]; then
setopt appendhistory
trap "unsetopt appendhistory" EXIT
fi
fi
export SAVEHIST=1000

touch a b c d
git add . >/dev/null
Expand All @@ -344,8 +337,6 @@ test_git_commit_prompt() {

# Test that history was appended correctly.
if [[ $shell == "zsh" ]]; then
setopt
cat $HISTFILE
test_history="$(history)"
else
# Need to load history from $HISTFILE
Expand Down

0 comments on commit a5f6af9

Please sign in to comment.