test_setup()
{
    request=$'/\r\n'

    # These are the only file types that we can/should test, because
    # everything else depends on file(1).

    echo hello >"$docroot"/query_foo.dcgi
    echo hello >"$docroot"/somefile
    echo hello >"$docroot"/somefile.dcgi
    mkdir "$docroot"/subdir

    chmod +x "$docroot"/query_foo.dcgi
    chmod +x "$docroot"/somefile.dcgi
}

test_set_assumptions()
{
    echo 0 >"$work"/exitcode.expected
    touch "$work"/stderr.expected

    (
        printf '7query_foo.dcgi\t/query_foo.dcgi\tlocalhost\t70\r\n'
        printf '0somefile\t/somefile\tlocalhost\t70\r\n'
        printf '1somefile.dcgi\t/somefile.dcgi\tlocalhost\t70\r\n'
        printf '1subdir\t/subdir\tlocalhost\t70\r\n'
    ) >"$work"/stdout.expected
}
