Skip to content

Commit

Permalink
try to satisfy shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli committed Dec 7, 2023
1 parent 3d5f60e commit d6abcaf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: shellcheck --color=always --shell=bash --exclude=SC2086,SC2059,SC2046,SC2235,SC2002,SC2206,SC2068,SC2207 *.sh activate
- run: shellcheck --color=always --shell=bash --exclude=SC2086,SC2059,SC2046,SC2235,SC2002,SC2206,SC2068,SC2207,SC2013 *.sh activate

test:
runs-on: ubuntu-latest
Expand Down
15 changes: 8 additions & 7 deletions doctest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,7 @@ for file in "${files[@]}"; do
done
done

ntotal=$(ls -1 tmp/doctest/*/*.jou | wc -l)
if [ $ntotal == 0 ]; then
echo "*** Error: no doctests found ***" >&2
exit 1
fi
echo "Running $ntotal doctests..."
ntotal=0
nfail=0

cd tmp/doctest
Expand All @@ -76,10 +71,16 @@ for file in */*.jou; do
if diff --text -u --color=always <(generate_expected_output test.jou | tr -d '\r') <( "$jou" test.jou 2>&1 || true | tr -d '\r'); then
echo " ok"
else
((nfail++)) || true
((nfail++))
fi
((ntotal++))
done

if [ $ntotal == 0 ]; then
echo "*** Error: no doctests found ***" >&2
exit 1
fi

echo ""
echo ""

Expand Down

0 comments on commit d6abcaf

Please sign in to comment.