Add test for fancyindex_exact_size off
parent
1e438a694d
commit
6442f26527
|
@ -0,0 +1,9 @@
|
||||||
|
#! /bin/bash
|
||||||
|
cat <<---
|
||||||
|
We test if the output from using "fancyindex_exact_size off" looks sane
|
||||||
|
--
|
||||||
|
EXACT_SIZE="off"
|
||||||
|
nginx_start
|
||||||
|
content=$(fetch)
|
||||||
|
grep -e '[1-9]\.[0-9] KiB' <<< "${content}"
|
||||||
|
grep -E '[0-9]+ B' <<< "${content}"
|
|
@ -6,6 +6,9 @@
|
||||||
# Distributed under terms of the MIT license.
|
# Distributed under terms of the MIT license.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Configuration defaults
|
||||||
|
EXACT_SIZE="on"
|
||||||
|
|
||||||
function nginx_conf_generate () {
|
function nginx_conf_generate () {
|
||||||
if ${DYNAMIC} ; then
|
if ${DYNAMIC} ; then
|
||||||
echo 'load_module modules/ngx_http_fancyindex_module.so;'
|
echo 'load_module modules/ngx_http_fancyindex_module.so;'
|
||||||
|
@ -27,6 +30,7 @@ function nginx_conf_generate () {
|
||||||
location / {
|
location / {
|
||||||
index index.html;
|
index index.html;
|
||||||
fancyindex on;
|
fancyindex on;
|
||||||
|
fancyindex_exact_size ${EXACT_SIZE};
|
||||||
$*
|
$*
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue