Skip to content

Conversation

@karlmcdowall
Copy link
Contributor

Fixes issue #7613
Tail now correctly handles the -v flag when only 1 input file is given.

Fixes issue uutils#7613
Tail now correctly handles the -v flag when only 1 input file is given.
.set_stdin(File::open(at.plus("f")).unwrap())
.arg("-v")
.succeeds()
.stdout_only("==> standard input <==\nfoo");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be clear, I've taken the existing test_stdin_redirect_file and split it into 2 separate tests - one test for the -v flag (which with this PR will now pass) and one test for the -f flag (which still fails, but is being tracked with a separate issue #7614).


settings.verbose =
settings.inputs.len() > 1 && !matches.get_flag(options::verbosity::QUIET);
settings.verbose = (matches.get_flag(options::verbosity::VERBOSE)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This basically reverts part of the change here 9b49f36
The reason this change got past our testing is that the relevant test was disabled at the time.

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/usage_vs_getopt (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@cakebaker cakebaker merged commit f92ee6a into uutils:main Apr 20, 2025
70 checks passed
@cakebaker
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants