diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 21:52:58 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 21:52:58 +0000 |
commit | 931bffbda3668ddc609fc1da8f9eb576b170aa52 (patch) | |
tree | d8c1843a95da5ea0bb4acc09f7e37843d9995c86 /src/nvim/testdir/runnvim.sh | |
parent | 142d9041391780ac15b89886a54015fdc5c73995 (diff) | |
parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
download | rneovim-userreg.tar.gz rneovim-userreg.tar.bz2 rneovim-userreg.zip |
Merge remote-tracking branch 'upstream/master' into userreguserreg
Diffstat (limited to 'src/nvim/testdir/runnvim.sh')
-rwxr-xr-x | src/nvim/testdir/runnvim.sh | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/src/nvim/testdir/runnvim.sh b/src/nvim/testdir/runnvim.sh deleted file mode 100755 index 322265737a..0000000000 --- a/src/nvim/testdir/runnvim.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env bash - -main() {( - local separator="================================================================================" - local oldesttest= - if test "$1" = "--oldesttest" ; then - shift - oldesttest=1 - fi - local root="$1" ; shift - local nvim_prg="$1" ; shift - local test_name="$1" ; shift - - local tlog="$test_name.tlog" - - export NVIM_TEST_ARGC=$# - local arg - local i=0 - # shellcheck disable=SC2034 # (unused "arg", used in "eval"). - for arg ; do - eval "export NVIM_TEST_ARG$i=\"\$arg\"" - i=$(( i+1 )) - done - - export CI_DIR="$root/ci" - BUILD_DIR="$(dirname "$nvim_prg")/.." - export BUILD_DIR - export FAILED=0 - - . "$CI_DIR/common/suite.sh" - . "$CI_DIR/common/test.sh" - - export VIMRUNTIME="$root/runtime" - if ! "$nvim_prg" \ - -u NONE -i NONE \ - --headless \ - --cmd 'set shortmess+=I noswapfile noundofile nomore' \ - -S runnvim.vim \ - "$tlog" > "out-$tlog" 2> "err-$tlog" - then - fail "$test_name" "Nvim exited with non-zero code" - fi - { - echo "Stdout of :terminal runner" - echo "$separator" - cat "out-$tlog" - echo "$separator" - echo "Stderr of :terminal runner" - echo "$separator" - cat "err-$tlog" - echo "$separator" - } >> "$tlog" - if test "$oldesttest" = 1 ; then - if ! diff -q test.out "$test_name.ok" > /dev/null 2>&1 ; then - if test -f test.out ; then - fail "$test_name" "Oldest test .out file differs from .ok file" - { - echo "Diff between test.out and $test_name.ok" - echo "$separator" - diff -a test.out "$test_name.ok" - echo "$separator" - } >> "$tlog" - else - echo "No output in test.out" >> "$tlog" - fi - fi - fi - valgrind_check . - if test -n "$LOG_DIR" ; then - check_sanitizer "$LOG_DIR" - fi - check_core_dumps - if test "$FAILED" = 1 ; then - cat "$tlog" - fi - rm -f "$tlog" - if test "$FAILED" = 1 ; then - echo "Test $test_name failed, see output above and summary for more details" >> test.log - # When Neovim crashed/aborted it might not have created messages. - # test.log itself is used as an indicator to exit non-zero in the Makefile. - if ! test -f message; then - cp -a test.log messages - fi - fi -)} - -main "$@" |