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 /tests/lib/test_printfrr.c | |
parent | tools/gcc-plugins: allow ISO C23 `%b` (diff) | |
download | frr-48eee77b51edc9fdedb3a753767a5bdcfcc90c0a.tar.xz frr-48eee77b51edc9fdedb3a753767a5bdcfcc90c0a.zip |
tests: exercise `%b` printfrr format specifier
Added by ISO C23 / N2630, implementation imported from FreeBSD.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'tests/lib/test_printfrr.c')
-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 0ab40b2ec..66699ec7c 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); |