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
f9b25261
Commit
f9b25261
authored
Aug 25, 2010
by
Pieter Noordhuis
Browse files
Comments in redis-cli tests
parent
ae77016e
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/integration/redis-cli.tcl
View file @
f9b25261
...
...
@@ -28,6 +28,7 @@ start_server {tags {"cli"}} {
flush $fd
}
# Helpers to run tests in interactive mode
proc run_command
{
fd cmd
}
{
write_cli $fd $cmd
set lines
[
split
[
read_cli $fd
]
"
\n
"
]
...
...
@@ -43,6 +44,7 @@ start_server {tags {"cli"}} {
unset ::env
(
FAKETTY
)
}
# Helpers to run tests where stdout is not a tty
proc run_nontty_cli
{
args
}
{
set fd
[
open
[
format
"|src/redis-cli -p %d -n 9
$args
"
[
srv port
]]
"r"
]
fconfigure $fd -buffering none
...
...
@@ -56,6 +58,7 @@ start_server {tags {"cli"}} {
test
"Non-interactive non-TTY CLI:
$name
"
$code
}
# Helpers to run tests where stdout is a tty
proc run_tty_cli
{
args
}
{
set ::env
(
FAKETTY
)
1
set resp
[
run_nontty_cli
{*}
$args
]
...
...
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