mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Merge pull request #1285 from arsdragonfly/master
numfmt: add suffixes and fix negative numbers
This commit is contained in:
commit
35b1e47a63
2 changed files with 130 additions and 107 deletions
|
@ -106,3 +106,17 @@ fn test_header_default() {
|
|||
.run()
|
||||
.stdout_is("header\n1000\n1100000\n100000000");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_negative() {
|
||||
new_ucmd!()
|
||||
.args(&["--from=si"])
|
||||
.pipe_in("-1000\n-1.1M\n-0.1G")
|
||||
.run()
|
||||
.stdout_is("-1000\n-1100000\n-100000000");
|
||||
new_ucmd!()
|
||||
.args(&["--to=iec-i"])
|
||||
.pipe_in("-1024\n-1153434\n-107374182")
|
||||
.run()
|
||||
.stdout_is("-1.0Ki\n-1.1Mi\n-102.4Mi");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue