mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
tail: fix stdin redirect (#3842)
This fixes a bug where calling `tail - < file.txt` would result in invoking `unbounded_tail()`. However, it is a stdin redirect to a seekable regular file and therefore `bounded_tail` should be invoked as if `tail file.txt` had been called.
This commit is contained in:
parent
e28301e969
commit
92c3f60440
2 changed files with 5 additions and 4 deletions
|
@ -76,6 +76,7 @@ fn test_stdin_redirect_file() {
|
|||
.set_stdin(std::fs::File::open(at.plus("f")).unwrap())
|
||||
.arg("-v")
|
||||
.run()
|
||||
.no_stderr()
|
||||
.stdout_is("==> standard input <==\nfoo")
|
||||
.succeeded();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue