mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
virshtest: Add tests for '--help'
Add test cases for help handling. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
811ce0e13b
commit
6d098a0ced
@ -309,6 +309,9 @@ mymain(void)
|
||||
DO_TEST("#unbalanced; 'quotes\"\necho a # b");
|
||||
DO_TEST("\\# ignored;echo a\n'#also' ignored");
|
||||
|
||||
/* test of the --help option handling */
|
||||
DO_TEST_SCRIPT("help-option", NULL, VIRSH_DEFAULT, "-q");
|
||||
|
||||
/* test of splitting in vshStringToArray */
|
||||
DO_TEST_SCRIPT("echo-split", NULL, VIRSH_DEFAULT, "-q");
|
||||
|
||||
|
4
tests/virshtestdata/help-option.in
Normal file
4
tests/virshtestdata/help-option.in
Normal file
@ -0,0 +1,4 @@
|
||||
help echo
|
||||
echo --help
|
||||
echo --help=data
|
||||
echo --help data
|
64
tests/virshtestdata/help-option.out
Normal file
64
tests/virshtestdata/help-option.out
Normal file
@ -0,0 +1,64 @@
|
||||
NAME
|
||||
echo - echo arguments. Used for internal testing.
|
||||
|
||||
SYNOPSIS
|
||||
echo [--shell] [--xml] [--split] [--err] [--prefix <string>] [<string>]...
|
||||
|
||||
DESCRIPTION
|
||||
Echo back arguments, possibly with quoting. Used for internal testing.
|
||||
|
||||
OPTIONS
|
||||
--shell escape for shell use
|
||||
--xml escape for XML use
|
||||
--split split each argument on ','; ',,' is an escape sequence
|
||||
--err output to stderr
|
||||
--prefix <string> prefix the message
|
||||
[--string] <string>... arguments to echo
|
||||
NAME
|
||||
echo - echo arguments. Used for internal testing.
|
||||
|
||||
SYNOPSIS
|
||||
echo [--shell] [--xml] [--split] [--err] [--prefix <string>] [<string>]...
|
||||
|
||||
DESCRIPTION
|
||||
Echo back arguments, possibly with quoting. Used for internal testing.
|
||||
|
||||
OPTIONS
|
||||
--shell escape for shell use
|
||||
--xml escape for XML use
|
||||
--split split each argument on ','; ',,' is an escape sequence
|
||||
--err output to stderr
|
||||
--prefix <string> prefix the message
|
||||
[--string] <string>... arguments to echo
|
||||
NAME
|
||||
echo - echo arguments. Used for internal testing.
|
||||
|
||||
SYNOPSIS
|
||||
echo [--shell] [--xml] [--split] [--err] [--prefix <string>] [<string>]...
|
||||
|
||||
DESCRIPTION
|
||||
Echo back arguments, possibly with quoting. Used for internal testing.
|
||||
|
||||
OPTIONS
|
||||
--shell escape for shell use
|
||||
--xml escape for XML use
|
||||
--split split each argument on ','; ',,' is an escape sequence
|
||||
--err output to stderr
|
||||
--prefix <string> prefix the message
|
||||
[--string] <string>... arguments to echo
|
||||
NAME
|
||||
echo - echo arguments. Used for internal testing.
|
||||
|
||||
SYNOPSIS
|
||||
echo [--shell] [--xml] [--split] [--err] [--prefix <string>] [<string>]...
|
||||
|
||||
DESCRIPTION
|
||||
Echo back arguments, possibly with quoting. Used for internal testing.
|
||||
|
||||
OPTIONS
|
||||
--shell escape for shell use
|
||||
--xml escape for XML use
|
||||
--split split each argument on ','; ',,' is an escape sequence
|
||||
--err output to stderr
|
||||
--prefix <string> prefix the message
|
||||
[--string] <string>... arguments to echo
|
Loading…
Reference in New Issue
Block a user