Replace unnecessary calls to echo and cat

Tcl's exec can send data to stdout itself, no need to call cat/echo for
that usually.
This commit is contained in:
Michael Schlenker
2012-04-24 19:33:54 +02:00
committed by antirez
parent e337b26050
commit 7d6bf7956e
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -35,7 +35,7 @@ tags {"aof"} {
set pattern "*Unexpected end of file reading the append only file*"
set retry 10
while {$retry} {
set result [exec cat [dict get $srv stdout] | tail -n1]
set result [exec tail -n1 < [dict get $srv stdout]]
if {[string match $pattern $result]} {
break
}
@@ -59,7 +59,7 @@ tags {"aof"} {
set pattern "*Bad file format reading the append only file*"
set retry 10
while {$retry} {
set result [exec cat [dict get $srv stdout] | tail -n1]
set result [exec tail -n1 < [dict get $srv stdout]]
if {[string match $pattern $result]} {
break
}
@@ -81,7 +81,7 @@ tags {"aof"} {
}
test "Short read: Utility should be able to fix the AOF" {
set result [exec echo y | src/redis-check-aof --fix $aof_path]
set result [exec src/redis-check-aof --fix $aof_path << "y\n"]
assert_match "*Successfully truncated AOF*" $result
}