summaryrefslogtreecommitdiffstats
path: root/tests/lib/test_printfrr.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2023-09-03 23:13:55 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2023-09-03 23:34:03 +0200
commit48eee77b51edc9fdedb3a753767a5bdcfcc90c0a (patch)
tree50b6b34ff65b9ecfcf54860ea86b8f46fa5def5a /tests/lib/test_printfrr.c
parenttools/gcc-plugins: allow ISO C23 `%b` (diff)
downloadfrr-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.c3
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);