about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t9001-sendfile-to-path.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/t/t9001-sendfile-to-path.sh b/t/t9001-sendfile-to-path.sh
index aa75f22..88b9c34 100755
--- a/t/t9001-sendfile-to-path.sh
+++ b/t/t9001-sendfile-to-path.sh
@@ -4,25 +4,26 @@
 t_plan 7 "Sendfile middleware test for $model"
 
 t_begin "configure and start" && {
-        rtmpfiles curl_out curl_err
+        rtmpfiles curl_err
         rainbows_setup
 
         # do not allow default middleware to be loaded since it may
         # kill body#to_path
         rainbows -E none -D t9001.ru -c $unicorn_config
         rainbows_wait_start
+        random_blob_sha1=$(rsha1 < random_blob)
 }
 
 t_begin "hit with curl" && {
-        curl -sSfv http://$listen/ > $curl_out 2> $curl_err
+        sha1=$(curl -sSfv http://$listen/ 2> $curl_err | rsha1)
 }
 
 t_begin "kill server" && {
         kill $rainbows_pid
 }
 
-t_begin "file matches source" && {
-        cmp $curl_out random_blob
+t_begin "SHA1 matches source" && {
+        test x$random_blob_sha1 = x$sha1
 }
 
 t_begin "no errors in Rainbows! stderr" && {