[zsh] use interactive shell for running tests
This commit is contained in:
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user