event_machine: factor out async.callback handling
[rainbows.git] / t / t0023-sendfile-byte-range.sh
blob81183c7df64b11f5ad90304b548a796c5af571ce
1 #!/bin/sh
2 . ./test-lib.sh
3 test -r random_blob || die "random_blob required, run with 'make $0'"
4 case $RUBY_ENGINE in
5 ruby) ;;
6 *)
7 t_info "skipping $T since it can't load the sendfile gem, yet"
8 exit 0
9 ;;
10 esac
12 case $model in
13 EventMachine|NeverBlock)
14 t_info "skipping $T since it's not compatible with $model"
15 exit 0
17 *) ;;
18 esac
20 t_plan 13 "sendfile byte range response for $model"
22 t_begin "setup and startup" && {
23 rtmpfiles out err
24 rainbows_setup $model
25 echo 'require "sendfile"' >> $unicorn_config
26 echo 'def (::IO).copy_stream(*x); abort "NO"; end' >> $unicorn_config
28 # can't load Rack::Lint here since it clobbers body#to_path
29 rainbows -E none -D large-file-response.ru -c $unicorn_config
30 rainbows_wait_start
33 . ./byte-range-common.sh