Added test for show_dotfiles

pull/83/head
Joshua Shaffer 2020-05-20 11:14:11 -04:00 committed by Adrian Perez
parent 7444208a36
commit 42e21c9153
2 changed files with 21 additions and 0 deletions

21
t/07-show_dotfiles.test Normal file
View File

@ -0,0 +1,21 @@
#! /bin/bash
cat <<---
Test the option to show dotfiles.
--
# Turn it on.
nginx_start 'fancyindex_show_dotfiles on;'
on_content=$(fetch /show_dotfiles/)
nginx_stop
if [ $(grep '.okay' <<< "${on_content}") -ne 0 ] ; then
exit 1
fi
# Turn it off.
nginx_start
off_content=$(fetch /show_dotfiles/)
nginx_stop
if [ $(grep '.okay' <<< "${on_content}") -eq 0] ; then
exit 1
fi
exit 0

0
t/show_dotfiles/.okay Normal file
View File