1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-11-13 11:04:27 -05:00

Ruby: add specs for method KernAux.sprintf

This commit is contained in:
Alex Kotov 2022-05-23 22:17:04 +03:00
parent bfab5fcf71
commit 7d2d364644
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -445,3 +445,30 @@
args: [['%.20X', 305_441_741]]
- result: '000000000000EDCB5433'
args: [['%.20X', 3_989_525_555]]
# padding #020
- result: '00000000000000001024'
args: [['%#020d', 1024]]
- result: '-0000000000000001024'
args: [['%#020d', -1024]]
- result: '00000000000000001024'
args: [['%#020i', 1024]]
- result: '-0000000000000001024'
args: [['%#020i', -1024]]
- result: '00000000000000001024'
args: [['%#020u', 1024]]
- result: '00000000004294966272'
args: [['%#020u', 4_294_966_272]]
- result: '00000000000000000777'
args: [['%#020o', 511]]
- result: '00000000037777777001'
args: [['%#020o', 4_294_966_785]]
- result: '0x00000000001234abcd'
args: [['%#020x', 305_441_741]]
- result: '0x0000000000edcb5433'
args: [['%#020x', 3_989_525_555]]
- result: '0X00000000001234ABCD'
args: [['%#020X', 305_441_741]]
- result: '0X0000000000EDCB5433'
args: [['%#020X', 3_989_525_555]]