diff options
| author | Russ White <russ@riw.us> | 2023-02-21 08:01:03 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-21 08:01:03 -0500 |
| commit | ba755d35e508c2452e5459bdd7c0dd67a70a88a4 (patch) | |
| tree | adc08f46788b8012240faec23ae7e7271bb0d40d /tests/lib/test_printfrr.c | |
| parent | 39c664c4ea530a9460efa1a78fe669ae56c85f83 (diff) | |
| parent | 616e9f0d9f0458788adf4b30707016c8db383b02 (diff) | |
Merge pull request #12248 from pguibert6WIND/bgpasdot
lib, bgp: add initial support for asdot format
Diffstat (limited to 'tests/lib/test_printfrr.c')
| -rw-r--r-- | tests/lib/test_printfrr.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/lib/test_printfrr.c b/tests/lib/test_printfrr.c index 9cabae8f20..0ab40b2ecd 100644 --- a/tests/lib/test_printfrr.c +++ b/tests/lib/test_printfrr.c @@ -12,6 +12,7 @@ #include "lib/memory.h" #include "lib/prefix.h" #include "lib/nexthop.h" +#include "lib/asn.h" static int errors; @@ -145,6 +146,7 @@ int main(int argc, char **argv) struct in_addr ip; char *p; char buf[256]; + as_t asn; printcmp("%d %u %d %u", 123, 123, -456, -456); printcmp("%lld %llu %lld %llu", 123LL, 123LL, -456LL, -456LL); @@ -392,6 +394,13 @@ int main(int argc, char **argv) printchk("-00:09", "%pTSIm", &ts); printchk("--:--", "%pTVImx", &tv); printchk("--:--", "%pTTImx", &tt); + /* ASN checks */ + asn = 65536; + printchk("1.0", "%pASD", &asn); + asn = 65400; + printchk("65400", "%pASP", &asn); + printchk("0.65400", "%pASE", &asn); + printchk("65400", "%pASD", &asn); return !!errors; } |
