1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 11:36:16 +00:00

Merge pull request #5128 from tertsdiepraam/printf-rewrite

`printf` rewrite (with a lot of `seq` changes)
This commit is contained in:
Sylvestre Ledru 2023-11-28 07:52:58 +01:00 committed by GitHub
commit 14a8e8a452
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 1812 additions and 3336 deletions

View file

@ -224,6 +224,11 @@ fn sub_num_int_char_const_in() {
.args(&["ninety seven is %i", "'a"])
.succeeds()
.stdout_only("ninety seven is 97");
new_ucmd!()
.args(&["emoji is %i", "'🙃"])
.succeeds()
.stdout_only("emoji is 128579");
}
#[test]
@ -291,7 +296,16 @@ fn sub_num_float_e_no_round() {
}
#[test]
fn sub_num_float_round() {
fn sub_num_float_round_to_one() {
new_ucmd!()
.args(&["one is %f", "0.9999995"])
.succeeds()
.stdout_only("one is 1.000000");
}
#[test]
#[ignore = "Requires 'long double' precision floats to be used internally"]
fn sub_num_float_round_to_two() {
new_ucmd!()
.args(&["two is %f", "1.9999995"])
.succeeds()
@ -413,6 +427,7 @@ fn sub_float_dec_places() {
}
#[test]
#[ignore = "hexadecimal floats are unimplemented"]
fn sub_float_hex_in() {
new_ucmd!()
.args(&["%f", "0xF1.1F"])