Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
b1099773
Unverified
Commit
b1099773
authored
Jun 15, 2021
by
Binbin
Committed by
GitHub
Jun 15, 2021
Browse files
Fix XINFO help for unexpected options. (#9075)
Small cleanup and consistency.
parent
096c5fd5
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/t_stream.c
View file @
b1099773
...
@@ -3459,6 +3459,11 @@ void xinfoCommand(client *c) {
...
@@ -3459,6 +3459,11 @@ void xinfoCommand(client *c) {
/* HELP is special. Handle it ASAP. */
/* HELP is special. Handle it ASAP. */
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"HELP"
))
{
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"HELP"
))
{
if
(
c
->
argc
!=
2
)
{
addReplySubcommandSyntaxError
(
c
);
return
;
}
const
char
*
help
[]
=
{
const
char
*
help
[]
=
{
"CONSUMERS <key> <groupname>"
,
"CONSUMERS <key> <groupname>"
,
" Show consumers of <groupname>."
,
" Show consumers of <groupname>."
,
...
...
tests/unit/type/stream.tcl
View file @
b1099773
...
@@ -714,4 +714,9 @@ start_server {tags {"stream"}} {
...
@@ -714,4 +714,9 @@ start_server {tags {"stream"}} {
catch
{
r XGROUP help xxx
}
e
catch
{
r XGROUP help xxx
}
e
assert_match
"*Unknown subcommand or wrong number of arguments*"
$e
assert_match
"*Unknown subcommand or wrong number of arguments*"
$e
}
}
test
{
XINFO HELP should not have unexpected options
}
{
catch
{
r XINFO help xxx
}
e
assert_match
"*Unknown subcommand or wrong number of arguments*"
$e
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment