mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
numfmt: fix spelling and formatting issues in tests
This commit is contained in:
parent
af5919e466
commit
84798a520e
1 changed files with 10 additions and 11 deletions
|
@ -536,36 +536,35 @@ fn test_suffix_is_only_applied_to_selected_field() {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_transform_with_suffix_on_input() {
|
fn test_transform_with_suffix_on_input() {
|
||||||
new_ucmd!()
|
new_ucmd!()
|
||||||
.args(&["--suffix=TEST", "--to=si"])
|
.args(&["--suffix=b", "--to=si"])
|
||||||
.pipe_in("2000TEST")
|
.pipe_in("2000b")
|
||||||
.succeeds()
|
.succeeds()
|
||||||
.stdout_only("2.0KTEST\n");
|
.stdout_only("2.0Kb\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_transform_without_suffix_on_input() {
|
fn test_transform_without_suffix_on_input() {
|
||||||
new_ucmd!()
|
new_ucmd!()
|
||||||
.args(&["--suffix=TEST", "--to=si"])
|
.args(&["--suffix=b", "--to=si"])
|
||||||
.pipe_in("2000")
|
.pipe_in("2000")
|
||||||
.succeeds()
|
.succeeds()
|
||||||
.stdout_only("2.0KTEST\n");
|
.stdout_only("2.0Kb\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_transform_with_suffix_and_delimiter() {
|
fn test_transform_with_suffix_and_delimiter() {
|
||||||
new_ucmd!()
|
new_ucmd!()
|
||||||
.args(&["--suffix=mysuffix", "--to=si", "-d=|"])
|
.args(&["--suffix=b", "--to=si", "-d=|"])
|
||||||
.pipe_in("1000mysuffix|2000|3000")
|
.pipe_in("1000b|2000|3000")
|
||||||
.succeeds()
|
.succeeds()
|
||||||
.stdout_only("1.0Kmysuffix|2000|3000\n");
|
.stdout_only("1.0Kb|2000|3000\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_suffix_with_padding() {
|
fn test_suffix_with_padding() {
|
||||||
new_ucmd!()
|
new_ucmd!()
|
||||||
.args(&["--suffix=padme", "--padding=12"])
|
.args(&["--suffix=pad", "--padding=12"])
|
||||||
.pipe_in("1000 2000 3000")
|
.pipe_in("1000 2000 3000")
|
||||||
.succeeds()
|
.succeeds()
|
||||||
.stdout_only(" 1000padme 2000 3000\n");
|
.stdout_only(" 1000pad 2000 3000\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue