ctdb-server: Use find_public_ip_vnn() in a couple of extra places
[samba4-gss.git] / ctdb / tests / UNIT / cunit / cmdline_test_001.sh
blobe95900087ec79de6c0126555f6f3697a094beccf
1 #!/bin/sh
3 . "${TEST_SCRIPTS_DIR}/unit.sh"
5 ok_null
6 unit_test cmdline_test 1
8 ok <<EOF
9 Command 'nofunc' has no implementation function
10 Command 'nohelp' has no help msg
11 Command 'really really long command with lots of words' is too long (85)
12 Command 'longhelp' help too long (90)
13 EOF
14 unit_test cmdline_test 2
16 ok <<EOF
17 Option has no long name
18 Option 'debug' has unsupported type
19 Option 'debug' has invalid arg
20 EOF
21 unit_test cmdline_test 3
23 ok <<EOF
24 Usage: test4 [<options>] <command> [<args>]
26 Help Options:
27 -h, --help Show this help message
29 Options:
30 -c, --count=INT Option help of length thirty.
31 -v, --value=Value help of length 23 Short description
33 Commands:
34 A really really long command <a long arguments message> This is a really long help message
35 short command <short arg msg> short msg for short command
36 Usage: test4 [-h] [-h|--help] [-c|--count=INT]
37 [-v|--value=Value help of length 23] <command> [<args>]
39 short command <short arg msg> short msg for short command
40 EOF
41 unit_test cmdline_test 4
43 ok <<EOF
44 Usage: test5 [<options>] <command> [<args>]
46 Help Options:
47 -h, --help Show this help message
49 Action Commands:
50 action one action one help
51 action two action two help
52 Usage: test5 [<options>] <command> [<args>]
54 Help Options:
55 -h, --help Show this help message
57 Action Commands:
58 action one action one help
59 action two action two help
60 Usage: test5 [<options>] <command> [<args>]
62 Help Options:
63 -h, --help Show this help message
65 Action Commands:
66 action one action one help
67 action two action two help
68 EOF
69 unit_test cmdline_test 5
71 ok <<EOF
72 arg1
73 EOF
74 unit_test cmdline_test 6
76 ok <<EOF
77 Usage: test7 [<options>] <command> [<args>]
79 Help Options:
80 -h, --help Show this help message
82 Basic Commands:
83 cmd1 command one help
84 cmd2 command two help
86 Advanced Commands:
87 cmd3 command three help
88 cmd4 command four help
90 Ultimate Commands:
91 cmd5 command five help
92 cmd6 command six help
94 one
95 three
96 six
97 EOF
98 unit_test cmdline_test 7