From: Carlos Maniero <carlos@maniero.me>
To: ~johnnyrichard/olang-devel@lists.sr.ht
Cc: Carlos Maniero <carlos@maniero.me>
Subject: [PATCH olang] tests: fix diff error output
Date: Wed, 25 Sep 2024 18:39:16 +0000 (UTC) [thread overview]
Message-ID: <20240925183905.339748-1-carlos@maniero.me> (raw)
When passing the expected file instead of the actual file as first
argument on the diff, it provides a more clear output. Given that the
application returned a new line that the test was not expecting it was
returning the follow output:
- new line (in red)
When it is easier to understand the error when it shows as:
+ new line (in green)
Signed-off-by: Carlos Maniero <carlos@maniero.me>
---
tests/olc/run.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/olc/run.sh b/tests/olc/run.sh
index 529f0f5..503f960 100755
--- a/tests/olc/run.sh
+++ b/tests/olc/run.sh
@@ -108,7 +108,7 @@ diff_output() {
fi
print_failed "match failed"
- diff "$actual_file" "$expected_file" -u --color
+ diff "$expected_file" "$actual_file" -u --color
exit 1
}
base-commit: 75cfabf7da32ae460c6ecb4d4a705f4705fc2c86
--
2.34.1
next reply other threads:[~2024-09-25 18:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-25 18:39 Carlos Maniero [this message]
2024-09-25 18:39 ` [olang/patches/.build.yml] build success builds.sr.ht
2024-09-25 21:28 ` [PATCH olang] tests: fix diff error output Johnny Richard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240925183905.339748-1-carlos@maniero.me \
--to=carlos@maniero.me \
--cc=~johnnyrichard/olang-devel@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.johnnyrichard.com/olang.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox