You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pr: test_merge_non_utf8_input_filename is failing #16147
thread 'test_pr::test_merge_non_utf8_input_filename' (45205) panicked at tests/by-util/test_pr.rs:1437:10:assertion failed: `(left == right)`Diff < left / right > :<left right>left right
I investigated the failure and found that the expected output in the test was incorrect.
The test expected both columns to be padded to 35 characters:
format!("{:<35}\t{:<35}\n","left","right")
However, pr intentionally does not pad the last cell of a merged row. This is also documented in get_line_for_printing():
// Like GNU pr, the last cell of a row is not padded, so the// line has no trailing spaces.
I verified this by inspecting the formatter and comparing the output with a valid UTF-8 filename. Both produce the same output, so the non-UTF-8 filename is not the cause of this particular failure.
I updated the test expectation to:
format!("{:<35}\t{}\n","left","right")
The previously failing test now passes when run with ignored tests enabled.
Activity
Martell0x1 commentedon Nov 3, 2026
investigating
Martell0x1 commentedon Nov 3, 2026
I investigated the failure and found that the expected output in the test was incorrect.
The test expected both columns to be padded to 35 characters:
However,
printentionally does not pad the last cell of a merged row. This is also documented inget_line_for_printing():I verified this by inspecting the formatter and comparing the output with a valid UTF-8 filename. Both produce the same output, so the non-UTF-8 filename is not the cause of this particular failure.
I updated the test expectation to:
The previously failing test now passes when run with ignored tests enabled.
I'll open a PR with this test correction.