Fix order of arguments to assert_equal

This commit is contained in:
Sven van Heugten 2026-03-06 17:26:19 +01:00
parent 057686a6b9
commit 05fe8f56df
No known key found for this signature in database
GPG key ID: D612F88666F4F660

View file

@ -192,7 +192,7 @@ setup() {
-e '/^index /d' \ -e '/^index /d' \
"$BATS_TEST_TMPDIR/diff_expected")" "$BATS_TEST_TMPDIR/diff_expected")"
output_normalized="$(printf '%s\n' "$output" | recountdiff | sed -e '/^index /d')" output_normalized="$(printf '%s\n' "$output" | recountdiff | sed -e '/^index /d')"
assert_equal "$expected" "$output_normalized" assert_equal "$output_normalized" "$expected"
} }
@test "keeps matching change with an extra added line" { @test "keeps matching change with an extra added line" {
@ -224,7 +224,7 @@ setup() {
-e '/^index /d' \ -e '/^index /d' \
"$BATS_TEST_TMPDIR/diff_expected")" "$BATS_TEST_TMPDIR/diff_expected")"
output_normalized="$(printf '%s\n' "$output" | recountdiff | sed -e '/^index /d')" output_normalized="$(printf '%s\n' "$output" | recountdiff | sed -e '/^index /d')"
assert_equal "$expected" "$output_normalized" assert_equal "$output_normalized" "$expected"
} }
@test "ignores leading and trailing blank lines for comparison" { @test "ignores leading and trailing blank lines for comparison" {
@ -270,7 +270,7 @@ setup() {
-e '/^index /d' \ -e '/^index /d' \
"$BATS_TEST_TMPDIR/diff_expected")" "$BATS_TEST_TMPDIR/diff_expected")"
output_normalized="$(printf '%s\n' "$output" | sed -e '/^index /d')" output_normalized="$(printf '%s\n' "$output" | sed -e '/^index /d')"
assert_equal "$expected" "$output_normalized" assert_equal "$output_normalized" "$expected"
} }
@test "drops hunk when all pairs become context" { @test "drops hunk when all pairs become context" {