mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
parent
9f5ce04229
commit
3d0a377e26
4 changed files with 18 additions and 0 deletions
|
@ -437,6 +437,8 @@ void builtin_printf_state_t::print_direc(const wchar_t *start, size_t length, wc
|
||||||
// Create a copy of the % directive, with an intmax_t-wide width modifier substituted for any
|
// Create a copy of the % directive, with an intmax_t-wide width modifier substituted for any
|
||||||
// existing integer length modifier.
|
// existing integer length modifier.
|
||||||
switch (conversion) {
|
switch (conversion) {
|
||||||
|
case L'x':
|
||||||
|
case L'X':
|
||||||
case L'd':
|
case L'd':
|
||||||
case L'i':
|
case L'i':
|
||||||
case L'u': {
|
case L'u': {
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
2,34: value not completely converted
|
2,34: value not completely converted
|
||||||
|
0xABCDEF12345678901: Result too large
|
||||||
|
|
|
@ -61,3 +61,12 @@ else
|
||||||
echo '3,450000e+00'
|
echo '3,450000e+00'
|
||||||
echo '4,560000e+00'
|
echo '4,560000e+00'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Verify long long ints are handled correctly. See issue #3352.
|
||||||
|
printf 'long hex1 %x\n' 498216206234
|
||||||
|
printf 'long hex2 %X\n' 498216206234
|
||||||
|
printf 'long hex3 %X\n' 0xABCDEF1234567890
|
||||||
|
printf 'long hex4 %X\n' 0xABCDEF12345678901
|
||||||
|
printf 'long decimal %d\n' 498216206594
|
||||||
|
printf 'long signed %d\n' -498216206595
|
||||||
|
printf 'long signed to unsigned %u\n' -498216206596
|
||||||
|
|
|
@ -18,3 +18,9 @@ a
|
||||||
1.230000e+00
|
1.230000e+00
|
||||||
3,450000e+00
|
3,450000e+00
|
||||||
4,560000e+00
|
4,560000e+00
|
||||||
|
long hex1 73ffffff9a
|
||||||
|
long hex2 73FFFFFF9A
|
||||||
|
long hex3 ABCDEF1234567890
|
||||||
|
long hex4 long decimal 498216206594
|
||||||
|
long signed -498216206595
|
||||||
|
long signed to unsigned 18446743575493345020
|
||||||
|
|
Loading…
Reference in a new issue