mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Add initial tests for default values
This commit is contained in:
@@ -143,6 +143,7 @@ TEST_PROGS := \
|
||||
stdbuf \
|
||||
sum \
|
||||
tac \
|
||||
tail \
|
||||
test \
|
||||
touch \
|
||||
tr \
|
||||
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
baz
|
||||
foo
|
||||
bar
|
||||
foo
|
||||
bar
|
||||
foo
|
||||
bar
|
||||
foo
|
||||
bar
|
||||
foo
|
||||
bar
|
||||
@@ -0,0 +1,10 @@
|
||||
foo
|
||||
bar
|
||||
foo
|
||||
bar
|
||||
foo
|
||||
bar
|
||||
foo
|
||||
bar
|
||||
foo
|
||||
bar
|
||||
@@ -0,0 +1,10 @@
|
||||
foo
|
||||
bar
|
||||
foo
|
||||
bar
|
||||
foo
|
||||
bar
|
||||
foo
|
||||
bar
|
||||
foo
|
||||
bar
|
||||
@@ -0,0 +1,23 @@
|
||||
#[macro_use]
|
||||
mod common;
|
||||
|
||||
use common::util::*;
|
||||
|
||||
static UTIL_NAME: &'static str = "tail";
|
||||
|
||||
static INPUT: &'static str = "foobar.txt";
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_stdin_default() {
|
||||
let (at, mut ucmd) = testing(UTIL_NAME);
|
||||
let result = ucmd.run_piped_stdin(at.read(INPUT));
|
||||
assert_eq!(result.stdout, at.read("foobar_stdin_default.expected"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_single_default() {
|
||||
let (at, mut ucmd) = testing(UTIL_NAME);
|
||||
let result = ucmd.arg(INPUT).run();
|
||||
assert_eq!(result.stdout, at.read("foobar_single_default.expected"));
|
||||
}
|
||||
Reference in New Issue
Block a user