Skip to content

Commit

Permalink
doctest: Do not pass newline to "base64 -d" (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli authored Feb 20, 2024
1 parent d6bcde3 commit 1d420e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doctest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ nfail=0

cd tmp/doctest
for file in */*.jou; do
# print file and line number, as in "doc/foo.md:123: "
echo -n "$(basename "$(dirname "$file")" | base64 -d):$(basename "$file" | cut -d'.' -f1): "
# Print file and line number, as in "doc/foo.md:123: "
# Newline is deleted to avoid warning on NetBSD 9.3, see issue #500
echo -n "$(basename "$(dirname "$file")" | tr -d '\n' | base64 -d):$(basename "$file" | cut -d'.' -f1): "

cp "$file" test.jou
if $DIFF --text -u $diff_color <(generate_expected_output test.jou | tr -d '\r') <( ("$jou" test.jou 2>&1 || true) | tr -d '\r'); then
Expand Down

0 comments on commit 1d420e2

Please sign in to comment.