sharness/test-lib: remove some "cat" followed by |
The pattern "cat FILE | COMMAND" can be simplified to just "COMMAND FILE" when COMMAND accepts files as arguments. License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Christian Couder committed
Feb 3, 2015 at 04:46 UTC
752f54e31361b63425b37c2669dd0d9f2dc247ea
1 file changed
+2
-2
test/sharness/lib/test-lib.sh
+2
-2
@@ -177,13 +177,13 @@ test_launch_ipfs_daemon() {
177
test_expect_success "'ipfs daemon' is ready" '
178
IPFS_PID=$! &&
179
test_wait_output_n_lines_60_sec actual_daemon 2 &&
180
- test_run_repeat_10_sec "cat actual_daemon | grep \"API server listening on $ADDR_API\"" ||
180
+ test_run_repeat_10_sec "grep \"API server listening on $ADDR_API\" actual_daemon" ||
181
fsh cat actual_daemon || fsh cat daemon_err
182
'
183
184
if test "$ADDR_GWAY" != ""; then
185
test_expect_success "'ipfs daemon' output includes Gateway address" '
186
- test_run_repeat_10_sec "cat actual_daemon | grep \"Gateway server listening on $ADDR_GWAY\"" ||
186
+ test_run_repeat_10_sec "grep \"Gateway server listening on $ADDR_GWAY\" actual_daemon" ||
187
fsh cat daemon_err
188
'
189
fi