mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
tail: test -f with no files
This commit is contained in:
parent
79d281394f
commit
abb9501894
2 changed files with 22 additions and 1 deletions
10
tests/fixtures/tail/follow_stdin.expected
vendored
Normal file
10
tests/fixtures/tail/follow_stdin.expected
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
dos
|
||||
tres
|
||||
quattro
|
||||
cinco
|
||||
seis
|
||||
siette
|
||||
ocho
|
||||
nueve
|
||||
diez
|
||||
once
|
|
@ -2,7 +2,7 @@ extern crate uu_tail;
|
|||
|
||||
use common::util::*;
|
||||
use std::char::from_digit;
|
||||
use std::io::{Read, Write};
|
||||
use std::io::Write;
|
||||
use uu_tail::parse_size;
|
||||
|
||||
static UTIL_NAME: &'static str = "tail";
|
||||
|
@ -77,6 +77,17 @@ fn test_follow_multiple() {
|
|||
child.kill().unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_follow_stdin() {
|
||||
let (at, mut ucmd) = testing(UTIL_NAME);
|
||||
let mut child = ucmd.arg("-f").pipe_in(at.read(FOOBAR_TXT)).run_no_wait();
|
||||
|
||||
let expected = at.read("follow_stdin.expected");
|
||||
assert_eq!(read_size(&mut child, expected.len()), expected);
|
||||
|
||||
child.kill().unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_single_big_args() {
|
||||
const FILE: &'static str = "single_big_args.txt";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue