David Lamparter | db93eec | 2015-05-05 11:04:59 +0200 | [diff] [blame] | 1 | /* |
| 2 | * CLI/command dummy handling tester |
| 3 | * |
| 4 | * Copyright (C) 2015 by David Lamparter, |
| 5 | * for Open Source Routing / NetDEF, Inc. |
| 6 | * |
| 7 | * Quagga is free software; you can redistribute it and/or modify it |
| 8 | * under the terms of the GNU General Public License as published by the |
| 9 | * Free Software Foundation; either version 2, or (at your option) any |
| 10 | * later version. |
| 11 | * |
| 12 | * Quagga is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with Quagga; see the file COPYING. If not, write to the Free |
| 19 | * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 20 | * 02111-1307, USA. |
| 21 | */ |
| 22 | |
| 23 | #include "common-cli.h" |
| 24 | |
| 25 | DUMMY_DEFUN(cmd0, "arg ipv4 A.B.C.D"); |
| 26 | DUMMY_DEFUN(cmd1, "arg ipv4m A.B.C.D/M"); |
| 27 | DUMMY_DEFUN(cmd2, "arg ipv6 X:X::X:X"); |
| 28 | DUMMY_DEFUN(cmd3, "arg ipv6m X:X::X:X/M"); |
| 29 | DUMMY_DEFUN(cmd4, "arg range <5-15>"); |
| 30 | DUMMY_DEFUN(cmd5, "pat a ( a|b)"); |
| 31 | DUMMY_DEFUN(cmd6, "pat b (a|)"); |
| 32 | DUMMY_DEFUN(cmd7, "pat c (a | b|c) A.B.C.D"); |
| 33 | DUMMY_DEFUN(cmd8, "pat d { foo A.B.C.D|bar X:X::X:X| baz }"); |
| 34 | DUMMY_DEFUN(cmd9, "pat e [ WORD ]"); |
| 35 | DUMMY_DEFUN(cmd10, "pat f [key]"); |
| 36 | DUMMY_DEFUN(cmd11, "alt a WORD"); |
| 37 | DUMMY_DEFUN(cmd12, "alt a A.B.C.D"); |
| 38 | DUMMY_DEFUN(cmd13, "alt a X:X::X:X"); |
| 39 | |
| 40 | void test_init(void) |
| 41 | { |
| 42 | install_element (ENABLE_NODE, &cmd0_cmd); |
| 43 | install_element (ENABLE_NODE, &cmd1_cmd); |
| 44 | install_element (ENABLE_NODE, &cmd2_cmd); |
| 45 | install_element (ENABLE_NODE, &cmd3_cmd); |
| 46 | install_element (ENABLE_NODE, &cmd4_cmd); |
| 47 | install_element (ENABLE_NODE, &cmd5_cmd); |
| 48 | install_element (ENABLE_NODE, &cmd6_cmd); |
| 49 | install_element (ENABLE_NODE, &cmd7_cmd); |
| 50 | install_element (ENABLE_NODE, &cmd8_cmd); |
| 51 | install_element (ENABLE_NODE, &cmd9_cmd); |
| 52 | install_element (ENABLE_NODE, &cmd10_cmd); |
| 53 | install_element (ENABLE_NODE, &cmd11_cmd); |
| 54 | install_element (ENABLE_NODE, &cmd12_cmd); |
| 55 | install_element (ENABLE_NODE, &cmd13_cmd); |
| 56 | } |