X-Git-Url: https://git.sommitrealweird.co.uk/quagga-debian.git/blobdiff_plain/6d99eb2938e976229cb50d848a1bc491532b54f9..refs/heads/master:/tests/test-commands.c?ds=sidebyside diff --git a/tests/test-commands.c b/tests/test-commands.c index 18b3b50..302f274 100644 --- a/tests/test-commands.c +++ b/tests/test-commands.c @@ -27,6 +27,11 @@ * 02111-1307, USA. */ + /* Example use for testing: + * ./testcommands -e 0 < testcommands.in | \ + * diff -au - testcommands.refout + */ + #define REALLY_NEED_PLAIN_GETOPT 1 #include @@ -91,6 +96,12 @@ static struct cmd_node bgp_vpnv4_node = "%s(config-router-af)# " }; +static struct cmd_node bgp_vpnv6_node = +{ + BGP_VPNV6_NODE, + "%s(config-router-af-vpnv6)# ", +}; + static struct cmd_node bgp_ipv4_node = { BGP_IPV4_NODE, @@ -115,6 +126,18 @@ static struct cmd_node bgp_ipv6m_node = "%s(config-router-af)# " }; +static struct cmd_node bgp_encap_node = +{ + BGP_ENCAP_NODE, + "%s(config-router-af-encap)# ", +}; + +static struct cmd_node bgp_encapv6_node = +{ + BGP_ENCAPV6_NODE, + "%s(config-router-af-encapv6)# ", +}; + static struct cmd_node ospf_node = { OSPF_NODE, @@ -151,6 +174,14 @@ static struct cmd_node keychain_key_node = "%s(config-keychain-key)# " }; +static struct cmd_node link_params_node = +{ + LINK_PARAMS_NODE, + "%s(config-link-params)# ", +}; + + + static int test_callback(struct cmd_element *cmd, struct vty *vty, int argc, const char *argv[]) { @@ -210,10 +241,13 @@ test_init(void) install_node (&rmap_node, NULL); install_node (&zebra_node, NULL); install_node (&bgp_vpnv4_node, NULL); + install_node (&bgp_vpnv6_node, NULL); install_node (&bgp_ipv4_node, NULL); install_node (&bgp_ipv4m_node, NULL); install_node (&bgp_ipv6_node, NULL); install_node (&bgp_ipv6m_node, NULL); + install_node (&bgp_encap_node, NULL); + install_node (&bgp_encapv6_node, NULL); install_node (&ospf_node, NULL); install_node (&ripng_node, NULL); install_node (&ospf6_node, NULL); @@ -222,7 +256,9 @@ test_init(void) install_node (&keychain_key_node, NULL); install_node (&isis_node, NULL); install_node (&vty_node, NULL); - + install_node (&link_params_node, NULL); + //install_node (&zebra_if_defaults_node, NULL); + test_init_cmd(); for (node = 0; node < vector_active(cmdvec); node++)