diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-02-09 09:38:37 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-09 09:38:37 -0500 |
| commit | 9c3a235e8a8bbfc0c4465bb26bf36981bd387899 (patch) | |
| tree | d8e32ef1321154cd766b5ba38d291bde45ed512f /tests/lib/cli/test_cli.c | |
| parent | bae44e4b7653f91408044764d206d2415fc38d9f (diff) | |
| parent | a4b74d05fca0ff19c04cc2fef432d5fde9469c45 (diff) | |
Merge pull request #164 from opensourcerouting/pytest2
Rework test runners to use pytest
Diffstat (limited to 'tests/lib/cli/test_cli.c')
| -rw-r--r-- | tests/lib/cli/test_cli.c | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/lib/cli/test_cli.c b/tests/lib/cli/test_cli.c new file mode 100644 index 0000000000..1a316022e2 --- /dev/null +++ b/tests/lib/cli/test_cli.c @@ -0,0 +1,56 @@ +/* + * CLI/command dummy handling tester + * + * Copyright (C) 2015 by David Lamparter, + * for Open Source Routing / NetDEF, Inc. + * + * Quagga is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * Quagga is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Quagga; see the file COPYING. If not, write to the Free + * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ + +#include <zebra.h> + +#include "common_cli.h" + +DUMMY_DEFUN(cmd0, "arg ipv4 A.B.C.D"); +DUMMY_DEFUN(cmd1, "arg ipv4m A.B.C.D/M"); +DUMMY_DEFUN(cmd2, "arg ipv6 X:X::X:X"); +DUMMY_DEFUN(cmd3, "arg ipv6m X:X::X:X/M"); +DUMMY_DEFUN(cmd4, "arg range (5-15)"); +DUMMY_DEFUN(cmd5, "pat a < a|b>"); +DUMMY_DEFUN(cmd7, "pat c <a | b|c> A.B.C.D"); +DUMMY_DEFUN(cmd8, "pat d { foo A.B.C.D|bar X:X::X:X| baz }"); +DUMMY_DEFUN(cmd9, "pat e [ WORD ]"); +DUMMY_DEFUN(cmd10, "pat f [key]"); +DUMMY_DEFUN(cmd11, "alt a WORD"); +DUMMY_DEFUN(cmd12, "alt a A.B.C.D"); +DUMMY_DEFUN(cmd13, "alt a X:X::X:X"); + +void test_init(void) +{ + install_element (ENABLE_NODE, &cmd0_cmd); + install_element (ENABLE_NODE, &cmd1_cmd); + install_element (ENABLE_NODE, &cmd2_cmd); + install_element (ENABLE_NODE, &cmd3_cmd); + install_element (ENABLE_NODE, &cmd4_cmd); + install_element (ENABLE_NODE, &cmd5_cmd); + install_element (ENABLE_NODE, &cmd7_cmd); + install_element (ENABLE_NODE, &cmd8_cmd); + install_element (ENABLE_NODE, &cmd9_cmd); + install_element (ENABLE_NODE, &cmd10_cmd); + install_element (ENABLE_NODE, &cmd11_cmd); + install_element (ENABLE_NODE, &cmd12_cmd); + install_element (ENABLE_NODE, &cmd13_cmd); +} |
