[zsh] use interactive shell for running tests

This commit is contained in:
Will Owens
2024-02-23 06:03:55 -05:00
parent 2a05bcc79f
commit 13a69cc9c0
2 changed files with 2 additions and 11 deletions

View File

@@ -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

View File

@@ -321,14 +321,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
@@ -345,8 +338,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