stty: columns env support and integration testing
This PR takes the commit from @3v1n0 to split it from the rest of his PR to add the feature of reading from the COLUMNS variable to determine how long the lines are in the output. This is because the changes in that PR related to the flags are separate and it might be a while until some upstream changes related to that change are merged.
I added tests that cover that when printing, ideally once we expect the output of the --all command to be matching we should be able to add GNU matching testing to the COLUMNS tests. These integ tests match how the GNU integ tests validate that this env variable is working properly
https://github.com/uutils/coreutils/pull/9432 this is the PR where the COLUMNS support is added from
When reviewing this, an important thing to note is that the COLUMNS environment variable is only used when piping output.
CodSpeed Performance Report
Merging #9490 will not alter performance
Comparing ChrisDryden:columns_env_support (8c9287e) with main (2000af8)
Summary
✅ 127 untouched
⏩ 6 skipped[^skipped]
[^skipped]: 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.
GNU testsuite comparison:
Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)
GNU testsuite comparison:
Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)
GNU testsuite comparison:
Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)
Am so glad that we now have the integ tests running on the CI for this binary, it spotted a bunch of stuff.
GNU testsuite comparison:
Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Moved the libc to a helper function with comments and added some comments to the main wrapped printer class
The only errors are coming from this PR: https://github.com/uutils/coreutils/pull/9471
GNU testsuite comparison:
Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)
GNU testsuite comparison:
Congrats! The gnu test tests/stty/stty is no longer failing!
@sylvestre mind if I get a second review on this one?
GNU testsuite comparison:
Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/stty/stty is no longer failing!