| # Tests for nginx ssi module, waited subrequests. |
| ############################################################################### |
| BEGIN { use FindBin; chdir($FindBin::Bin); } |
| ############################################################################### |
| my $t = Test::Nginx->new()->has(qw/http ssi/)->plan(2); |
| $t->write_file_expand('nginx.conf', <<'EOF'); |
| $t->write_file('index.html', 'x<!--#include virtual="/first.html" -->' . |
| 'x<!--#include virtual="/second.html" -->x'); |
| $t->write_file('first.html', 'FIRST'); |
| $t->write_file('second.html', |
| '<!--#include virtual="/waited.html" wait="yes"-->xSECOND'); |
| $t->write_file('waited.html', 'WAITED'); |
| ############################################################################### |
| like(http_get('/'), qr/^xFIRSTxWAITEDxSECONDx$/m, 'waited non-active'); |
| like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); |
| ############################################################################### |