1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

tail: use same-file crate to get a handle of stdin redirected file

This commit is contained in:
Jan Scheer 2022-08-30 21:42:14 +02:00 committed by Sylvestre Ledru
parent 942928b0ea
commit 74f359bd76
5 changed files with 23 additions and 21 deletions

View file

@ -107,11 +107,7 @@ fn test_stdin_redirect_offset() {
let mut fh = std::fs::File::open(at.plus("k")).unwrap();
fh.seek(SeekFrom::Start(2)).unwrap();
ts.ucmd()
.set_stdin(fh)
.run()
.stdout_is("2\n")
.succeeded();
ts.ucmd().set_stdin(fh).run().stdout_is("2\n").succeeded();
}
#[test]