Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
362a18e2
Commit
362a18e2
authored
Apr 03, 2018
by
2012-wangjiaqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add redis ut
parent
1046f5cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
brpc_redis_unittest.cpp
test/brpc_redis_unittest.cpp
+15
-0
No files found.
test/brpc_redis_unittest.cpp
View file @
362a18e2
...
...
@@ -429,6 +429,21 @@ TEST_F(RedisTest, cmd_format) {
ASSERT_STREQ
(
"*5
\r\n
$4
\r\n
mset
\r\n
$1
\r\n
b
\r\n
$0
\r\n\r\n
$1
\r\n
c
\r\n
$3
\r\n
ccc
\r\n
"
,
request
.
_buf
.
to_string
().
c_str
());
request
.
Clear
();
request
.
AddCommand
(
"get ''key value"
);
// == get key value
ASSERT_STREQ
(
"*3
\r\n
$3
\r\n
get
\r\n
$3
\r\n
key
\r\n
$5
\r\n
value
\r\n
"
,
request
.
_buf
.
to_string
().
c_str
());
request
.
Clear
();
request
.
AddCommand
(
"get key'' value"
);
// == get key value
ASSERT_STREQ
(
"*3
\r\n
$3
\r\n
get
\r\n
$3
\r\n
key
\r\n
$5
\r\n
value
\r\n
"
,
request
.
_buf
.
to_string
().
c_str
());
request
.
Clear
();
request
.
AddCommand
(
"get 'ext'key value "
);
// == get extkey value
ASSERT_STREQ
(
"*3
\r\n
$3
\r\n
get
\r\n
$6
\r\n
extkey
\r\n
$5
\r\n
value
\r\n
"
,
request
.
_buf
.
to_string
().
c_str
());
request
.
Clear
();
request
.
AddCommand
(
" get key'ext' value "
);
// == get keyext value
ASSERT_STREQ
(
"*3
\r\n
$3
\r\n
get
\r\n
$6
\r\n
keyext
\r\n
$5
\r\n
value
\r\n
"
,
request
.
_buf
.
to_string
().
c_str
());
request
.
Clear
();
}
}
//namespace
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