diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2023-09-03 23:13:55 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2023-09-03 23:34:03 +0200 |
| commit | 48eee77b51edc9fdedb3a753767a5bdcfcc90c0a (patch) | |
| tree | 50b6b34ff65b9ecfcf54860ea86b8f46fa5def5a | |
| parent | f9ba355aa840b30f6dd4a845b1d7fb747b302a49 (diff) | |
tests: exercise `%b` printfrr format specifier
Added by ISO C23 / N2630, implementation imported from FreeBSD.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
| -rw-r--r-- | tests/lib/test_printfrr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/lib/test_printfrr.c b/tests/lib/test_printfrr.c index 0ab40b2ecd..66699ec7c0 100644 --- a/tests/lib/test_printfrr.c +++ b/tests/lib/test_printfrr.c @@ -166,6 +166,9 @@ int main(int argc, char **argv) printchk("-77385308584349683 18369358765125201933 feed1278cafef00d", "%Ld %Lu %Lx", ui64, ui64, ui64); + FMT_NSTD(printchk("11110000000011111010010111000011", "%b", 0xf00fa5c3)); + FMT_NSTD(printchk("0b01011010", "%#010b", 0x5a)); + inet_aton("192.168.1.2", &ip); printchk("192.168.1.2", "%pI4", &ip); printchk(" 192.168.1.2", "%20pI4", &ip); |
