Add test case

pull/65/head
Adrian Perez de Castro 2016-12-07 20:22:35 +02:00
parent 57ff1a2a89
commit b1182f7758
No known key found for this signature in database
GPG Key ID: 91C559DBE4C9123B
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
#! /bin/bash
cat <<---
Bug #61: Listing a directory with an empty file crashes Nginx
https://github.com/aperezdc/ngx-fancyindex/issues/61
--
# Prepare an empty directory with an empty file
mkdir -p "${TESTDIR}/bug61"
touch "${TESTDIR}/bug61/bug61.txt"
nginx_start 'fancyindex_exact_size off;'
content=$(fetch /bug61/)
test -n "${content}" || fail "Empty response"
echo "Response:"
echo "${content}"
nginx_is_running || fail "Nginx died"