#!/bin/sh

set -eu

REQUIRED_CMDLINE="-c examples/blacklist.conf"
. regression.inc

HOST="localhost"
CODE=500

WPATH="/index.php"
NAME="blacklist pattern *.php"
do_request

WPATH="/this/directory/not/exists/foo.php"
NAME="blacklist pattern *.php"
do_request

WPATH="/honeypot/"
NAME="blacklist directory /honeypot/"
do_request

CODE=404
WPATH="/this/directory/not/exists/honeypot/this/directory/not/exists/"
NAME="blacklist directory /honeypot/"
do_request

CODE=200
WPATH="/index.html"
NAME="no blacklist"
do_request

echo "All tests passed"
