summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2010-08-25 14:08:32 +0200
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-08-25 14:08:32 +0200
commitf9b252613bcdaf81183a1ed2fb12d1a9feabc183 (patch)
treea5b5e760476841704150b0c9d00e9e9d88c02772 /tests
parentae77016e572bc5ed48574c3a173c4cda27c5e0d9 (diff)
downloadredis-f9b252613bcdaf81183a1ed2fb12d1a9feabc183.tar.gz
Comments in redis-cli tests
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/redis-cli.tcl3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/integration/redis-cli.tcl b/tests/integration/redis-cli.tcl
index 4f180dafb..a0df2ea11 100644
--- a/tests/integration/redis-cli.tcl
+++ b/tests/integration/redis-cli.tcl
@@ -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]