mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
tests/sort: simplify input to helper
This commit is contained in:
parent
6b129887d6
commit
fb0e6a9dee
1 changed files with 9 additions and 9 deletions
|
@ -8,45 +8,45 @@ static UTIL_NAME: &'static str = "sort";
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_numeric_floats_and_ints() {
|
fn test_numeric_floats_and_ints() {
|
||||||
test_helper("numeric_floats_and_ints", &String::from("-n"));
|
test_helper("numeric_floats_and_ints", "-n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_numeric_floats() {
|
fn test_numeric_floats() {
|
||||||
test_helper("numeric_floats", &String::from("-n"));
|
test_helper("numeric_floats", "-n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_numeric_unfixed_floats() {
|
fn test_numeric_unfixed_floats() {
|
||||||
test_helper("numeric_unfixed_floats", &String::from("-n"));
|
test_helper("numeric_unfixed_floats", "-n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_numeric_fixed_floats() {
|
fn test_numeric_fixed_floats() {
|
||||||
test_helper("numeric_fixed_floats", &String::from("-n"));
|
test_helper("numeric_fixed_floats", "-n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_numeric_unsorted_ints() {
|
fn test_numeric_unsorted_ints() {
|
||||||
test_helper("numeric_unsorted_ints", &String::from("-n"));
|
test_helper("numeric_unsorted_ints", "-n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_human_block_sizes() {
|
fn test_human_block_sizes() {
|
||||||
test_helper("human_block_sizes", &String::from("-h"));
|
test_helper("human_block_sizes", "-h");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_month_default() {
|
fn test_month_default() {
|
||||||
test_helper("month_default", &String::from("-M"));
|
test_helper("month_default", "-M");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_default_unsorted_ints() {
|
fn test_default_unsorted_ints() {
|
||||||
test_helper("default_unsorted_ints", &String::from(""));
|
test_helper("default_unsorted_ints", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
fn test_helper(file_name: &str, args: &String) {
|
fn test_helper(file_name: &str, args: &str) {
|
||||||
let (at, mut ucmd) = testing(UTIL_NAME);
|
let (at, mut ucmd) = testing(UTIL_NAME);
|
||||||
ucmd.arg(args);
|
ucmd.arg(args);
|
||||||
let out = ucmd.arg(format!("{}{}", file_name, ".txt")).run().stdout;
|
let out = ucmd.arg(format!("{}{}", file_name, ".txt")).run().stdout;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue