mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
tests/tail: Rename INPUT
to FOOBAR_TXT
as there are more than one inputs
This commit is contained in:
parent
0bc05e2dcf
commit
9a5209a7a4
1 changed files with 5 additions and 5 deletions
|
@ -7,19 +7,19 @@ use common::util::*;
|
||||||
|
|
||||||
static UTIL_NAME: &'static str = "tail";
|
static UTIL_NAME: &'static str = "tail";
|
||||||
|
|
||||||
static INPUT: &'static str = "foobar.txt";
|
static FOOBAR_TXT: &'static str = "foobar.txt";
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_stdin_default() {
|
fn test_stdin_default() {
|
||||||
let (at, mut ucmd) = testing(UTIL_NAME);
|
let (at, mut ucmd) = testing(UTIL_NAME);
|
||||||
let result = ucmd.run_piped_stdin(at.read(INPUT));
|
let result = ucmd.run_piped_stdin(at.read(FOOBAR_TXT));
|
||||||
assert_eq!(result.stdout, at.read("foobar_stdin_default.expected"));
|
assert_eq!(result.stdout, at.read("foobar_stdin_default.expected"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_single_default() {
|
fn test_single_default() {
|
||||||
let (at, mut ucmd) = testing(UTIL_NAME);
|
let (at, mut ucmd) = testing(UTIL_NAME);
|
||||||
let result = ucmd.arg(INPUT).run();
|
let result = ucmd.arg(FOOBAR_TXT).run();
|
||||||
assert_eq!(result.stdout, at.read("foobar_single_default.expected"));
|
assert_eq!(result.stdout, at.read("foobar_single_default.expected"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,14 +51,14 @@ fn test_single_big_args() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_bytes_single() {
|
fn test_bytes_single() {
|
||||||
let (at, mut ucmd) = testing(UTIL_NAME);
|
let (at, mut ucmd) = testing(UTIL_NAME);
|
||||||
let result = ucmd.arg("-c").arg("10").arg(INPUT).run();
|
let result = ucmd.arg("-c").arg("10").arg(FOOBAR_TXT).run();
|
||||||
assert_eq!(result.stdout, at.read("foobar_bytes_single.expected"));
|
assert_eq!(result.stdout, at.read("foobar_bytes_single.expected"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_bytes_stdin() {
|
fn test_bytes_stdin() {
|
||||||
let (at, mut ucmd) = testing(UTIL_NAME);
|
let (at, mut ucmd) = testing(UTIL_NAME);
|
||||||
let result = ucmd.arg("-c").arg("13").run_piped_stdin(at.read(INPUT));
|
let result = ucmd.arg("-c").arg("13").run_piped_stdin(at.read(FOOBAR_TXT));
|
||||||
assert_eq!(result.stdout, at.read("foobar_bytes_stdin.expected"));
|
assert_eq!(result.stdout, at.read("foobar_bytes_stdin.expected"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue