1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #7623 from drinkcat/parse-bigdecimal-smallfixes

uucore: format: Collection of small parser fixes
This commit is contained in:
Dorian Péron 2025-04-01 12:36:28 +02:00 committed by GitHub
commit 17d81bb9a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 337 additions and 104 deletions

View file

@ -675,6 +675,19 @@ fn test_overflow() {
new_ucmd!()
.args(&["%d", "36893488147419103232"])
.fails_with_code(1)
.stdout_is("9223372036854775807")
.stderr_is("printf: '36893488147419103232': Numerical result out of range\n");
new_ucmd!()
.args(&["%d", "-36893488147419103232"])
.fails_with_code(1)
.stdout_is("-9223372036854775808")
.stderr_is("printf: '-36893488147419103232': Numerical result out of range\n");
new_ucmd!()
.args(&["%u", "36893488147419103232"])
.fails_with_code(1)
.stdout_is("18446744073709551615")
.stderr_is("printf: '36893488147419103232': Numerical result out of range\n");
}