mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Merge pull request #7556 from drinkcat/parse-bigdecimal
uucore: format: num_parser: Use ExtendedBigDecimal
This commit is contained in:
commit
ace92dcca1
5 changed files with 522 additions and 260 deletions
|
@ -992,6 +992,16 @@ fn float_flag_position_space_padding() {
|
|||
.stdout_only(" +1.0");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn float_large_precision() {
|
||||
// Note: This does not match GNU coreutils output (0.100000000000000000001355252716 on x86),
|
||||
// as we parse and format using ExtendedBigDecimal, which provides arbitrary precision.
|
||||
new_ucmd!()
|
||||
.args(&["%.30f", "0.1"])
|
||||
.succeeds()
|
||||
.stdout_only("0.100000000000000000000000000000");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn float_non_finite_space_padding() {
|
||||
new_ucmd!()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue