mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
refactor(uniq): Move to clap + add a test (#1626)
This commit is contained in:
parent
7bbb4c98e8
commit
41ba5ed913
4 changed files with 151 additions and 100 deletions
|
@ -1,6 +1,7 @@
|
|||
use crate::common::util::*;
|
||||
|
||||
static INPUT: &'static str = "sorted.txt";
|
||||
static OUTPUT: &'static str = "sorted-output.txt";
|
||||
static SKIP_CHARS: &'static str = "skip-chars.txt";
|
||||
static SKIP_FIELDS: &'static str = "skip-fields.txt";
|
||||
static SORTED_ZERO_TERMINATED: &'static str = "sorted-zero-terminated.txt";
|
||||
|
@ -21,6 +22,15 @@ fn test_single_default() {
|
|||
.stdout_is_fixture("sorted-simple.expected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_single_default_output() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
let expected = at.read("sorted-simple.expected");
|
||||
ucmd.args(&[INPUT, OUTPUT]).run();
|
||||
let found = at.read(OUTPUT);
|
||||
assert_eq!(found, expected);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_stdin_counts() {
|
||||
new_ucmd!()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue