mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
runnvim.sh: lint (shellcheck) (#10851)
This commit is contained in:
parent
b12b01a828
commit
b069a20910
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
main() {(
|
main() {(
|
||||||
local separator="================================================================================"
|
local separator="================================================================================"
|
||||||
@ -16,13 +16,15 @@ main() {(
|
|||||||
export NVIM_TEST_ARGC=$#
|
export NVIM_TEST_ARGC=$#
|
||||||
local arg
|
local arg
|
||||||
local i=0
|
local i=0
|
||||||
|
# shellcheck disable=SC2034 # (unused "arg", used in "eval").
|
||||||
for arg ; do
|
for arg ; do
|
||||||
eval "export NVIM_TEST_ARG$i=\"\$arg\""
|
eval "export NVIM_TEST_ARG$i=\"\$arg\""
|
||||||
i=$(( i+1 ))
|
i=$(( i+1 ))
|
||||||
done
|
done
|
||||||
|
|
||||||
export CI_DIR="$root/ci"
|
export CI_DIR="$root/ci"
|
||||||
export BUILD_DIR="$(dirname "$nvim_prg")/.."
|
BUILD_DIR="$(dirname "$nvim_prg")/.."
|
||||||
|
export BUILD_DIR
|
||||||
export FAILED=0
|
export FAILED=0
|
||||||
|
|
||||||
. "$CI_DIR/common/suite.sh"
|
. "$CI_DIR/common/suite.sh"
|
||||||
@ -38,22 +40,26 @@ main() {(
|
|||||||
then
|
then
|
||||||
fail "$test_name" F "Nvim exited with non-zero code"
|
fail "$test_name" F "Nvim exited with non-zero code"
|
||||||
fi
|
fi
|
||||||
echo "Stdout of :terminal runner" >> "$tlog"
|
{
|
||||||
echo "$separator" >> "$tlog"
|
echo "Stdout of :terminal runner"
|
||||||
cat "out-$tlog" >> "$tlog"
|
echo "$separator"
|
||||||
echo "$separator" >> "$tlog"
|
cat "out-$tlog"
|
||||||
echo "Stderr of :terminal runner" >> "$tlog"
|
echo "$separator"
|
||||||
echo "$separator" >> "$tlog"
|
echo "Stderr of :terminal runner"
|
||||||
cat "err-$tlog" >> "$tlog"
|
echo "$separator"
|
||||||
echo "$separator" >> "$tlog"
|
cat "err-$tlog"
|
||||||
|
echo "$separator"
|
||||||
|
} >> "$tlog"
|
||||||
if test "$oldesttest" = 1 ; then
|
if test "$oldesttest" = 1 ; then
|
||||||
if ! diff -q test.out "$test_name.ok" > /dev/null 2>&1 ; then
|
if ! diff -q test.out "$test_name.ok" > /dev/null 2>&1 ; then
|
||||||
if test -f test.out ; then
|
if test -f test.out ; then
|
||||||
fail "$test_name" F "Oldest test .out file differs from .ok file"
|
fail "$test_name" F "Oldest test .out file differs from .ok file"
|
||||||
echo "Diff between test.out and $test_name.ok" >> "$tlog"
|
{
|
||||||
echo "$separator" >> "$tlog"
|
echo "Diff between test.out and $test_name.ok"
|
||||||
diff -a test.out "$test_name.ok" >> "$tlog"
|
echo "$separator"
|
||||||
echo "$separator" >> "$tlog"
|
diff -a test.out "$test_name.ok"
|
||||||
|
echo "$separator"
|
||||||
|
} >> "$tlog"
|
||||||
else
|
else
|
||||||
echo "No output in test.out" >> "$tlog"
|
echo "No output in test.out" >> "$tlog"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user