Samuel Tardieu
5dfeca9ff2
format: %c prints the first character of a string
2024-01-09 00:13:54 +01:00
Terts Diepraam
0822511fdc
test/printf: ignoring rounding up to 2
...
This is a limitation of the current implementation, which should ultimately use "long double" precision instead of f64.
2023-11-21 16:49:20 +01:00
Terts Diepraam
6d2698b802
Merge branch 'main' into printf-rewrite
2023-11-20 13:53:11 +01:00
Terts Diepraam
ce18e0ab97
printf: ignore hexadecimal floats test
...
This can be un-ignored when it is implemented
2023-11-17 14:47:41 +01:00
Terts Diepraam
fef84f7203
printf: add emoji character test
2023-11-17 14:47:08 +01:00
Terts Diepraam
955640aac8
printf: fix and test float formatting
2023-11-17 14:46:38 +01:00
ALXD
3cdb0966ae
printf: add a test for %x with invalid value
2023-11-15 17:51:43 +01:00
Zhuoxun Yang
fb414ed917
tests/printf: support %q
2023-11-09 10:18:27 +08:00
Sylvestre Ledru
bfca6bf70f
Add license headers on all files
2023-08-21 10:49:27 +02:00
Daniel Hofstetter
6988eb7ec6
tests: expand wildcard imports
2023-03-20 15:32:35 +01:00
Hanif Ariffin
2e60dce11a
printf: Default left-justify integer conversion to 1 width
...
When using left-justify with integer conversion (like `printf '%-o'`),
default the minimum width to 1.
Closes: https://github.com/uutils/coreutils/issues/3050
Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com>
2022-05-01 20:00:09 +02:00
Eli Youngs
a0bd88b51b
Add comments and an additional test
2022-03-20 00:44:09 -07:00
Eli Youngs
565af8237b
Fix formatting
2022-03-11 23:43:59 +01:00
Eli Youngs
e23219289a
Simplify test cases
2022-03-11 23:43:59 +01:00
Eli Youngs
2afa9cd1a0
printf - Update %g formatting to match GNU
2022-03-11 23:43:59 +01:00
Nick Donald
a74ffac19e
printf: fix printf sci notation round up
2022-03-07 07:01:21 +01:00
Eli Youngs
162f85773e
printf: Support leading zeroes with %0n formatting
2022-02-05 00:43:09 -08:00
Hanif Ariffin
793d3dd97c
test_printf: add test for additional escape (\c)
...
Using this escaped character will cause `printf` to stop generating characters.
For instance,
```rust
hbina@akarin ~/g/uutils (hbina-add-test-for-additional-escape)> cargo run --quiet -- printf "%s\c%s" a b
a⏎
```
Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com>
2022-02-04 18:47:23 +08:00
Roy Ivy III
3f35e0a421
refactor ~ cargo make format
2021-05-31 08:23:58 -05:00
Roy Ivy III
4e20dedf58
tests ~ refactor/polish spelling (comments, names, and exceptions)
2021-05-31 08:23:57 -05:00
Roy Ivy III
de0375f909
tests ~ reorganize tests
2020-06-01 18:30:04 -05:00