converted all tests to run-tests.pl
git-svn-id: svn+ssh://svn.lighttpd.net/lighttpd/trunk@56 152afb58-edef-0310-8abb-c4023f1b3aa9
parent
9bca2cdf6f
commit
0df9332f30
@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
deny request for index.html~
|
||||
GET /index.html~ HTTP/1.0
|
||||
|
||||
Status: 403
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pidof php > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "FastCGI PHPinfo"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
PHP_SELF + indexfile
|
||||
GET /indexfile/ HTTP/1.0
|
||||
Host: www.example.org
|
||||
|
||||
Status: 200
|
||||
Content: /indexfile/index.php
|
||||
EOF
|
||||
|
||||
run_test
|
||||
|
@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pidof php > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "FastCGI PHPinfo"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
PHP_SELF + last indexfile
|
||||
GET /indexfile/ HTTP/1.0
|
||||
Host: www.example.org
|
||||
|
||||
Status: 200
|
||||
Content: /indexfile/index.php
|
||||
EOF
|
||||
|
||||
run_test
|
||||
|
@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pidof php > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "FastCGI PHPinfo"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
FastCGI + errorhandler
|
||||
POST /indexfile/abc HTTP/1.0
|
||||
Host: www.example.org
|
||||
Content-Length: 0
|
||||
|
||||
Status: 404
|
||||
Content: /indexfile/return-404.php
|
||||
EOF
|
||||
|
||||
run_test
|
||||
|
@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
CGI + NPH
|
||||
GET /nph-status.pl HTTP/1.0
|
||||
Host: www.example.org
|
||||
|
||||
Status: 200
|
||||
EOF
|
||||
|
||||
run_test
|
||||
|
@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if id weigon > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "userdir"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
userdir for ~weigon + redirect
|
||||
GET /~weigon HTTP/1.0
|
||||
Host: www.example.org
|
||||
|
||||
Status: 301
|
||||
Location: http://www.example.org/~weigon/
|
||||
EOF
|
||||
|
||||
run_test
|
||||
|
@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if id weigon > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "userdir"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
userdir for ~weigon + redirect
|
||||
GET /~weigon HTTP/1.0
|
||||
|
||||
Status: 301
|
||||
Location: http://localhost:2048/~weigon/
|
||||
EOF
|
||||
|
||||
run_test
|
||||
|
@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
if id weigon > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "userdir"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
userdir for ~weigon
|
||||
GET /~weigon/ HTTP/1.0
|
||||
Host: www.example.org
|
||||
|
||||
Status: 200
|
||||
EOF
|
||||
|
||||
run_test
|
||||
|
@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
Check that %00 is decoded correctly
|
||||
GET /%00 HTTP/1.0
|
||||
Foo: foo
|
||||
Foo: foo
|
||||
|
||||
Status: 404
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
Compression - deflate
|
||||
GET /index.html HTTP/1.0
|
||||
Accept-Encoding: deflate
|
||||
|
||||
Status: 200
|
||||
MUST: Vary
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
Compression - deflate
|
||||
GET /index.html HTTP/1.0
|
||||
Accept-Encoding: deflate
|
||||
|
||||
Status: 200
|
||||
Content-Length: 1288
|
||||
MUST: Vary Content-Encoding
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,18 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
Compression - gzip
|
||||
GET /index.html HTTP/1.0
|
||||
Accept-Encoding: gzip
|
||||
|
||||
Status: 200
|
||||
MUST: Vary Content-Encoding
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
Compression - gzip
|
||||
GET /index.txt HTTP/1.0
|
||||
Accept-Encoding: gzip, deflate
|
||||
Host: www.example.org
|
||||
|
||||
Status: 200
|
||||
MIGHT: Content-Encoding Vary
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,4 +1,4 @@
|
||||
EXTRA_DIST=cgi.php cgi.pl dummydir index.html index.txt phpinfo.php \
|
||||
phpself.php redirect.php cgi-pathinfo.pl phphost.php \
|
||||
nph-status.pl
|
||||
SUBDIRS=go indexfile
|
||||
SUBDIRS=go indexfile expire
|
||||
|
@ -0,0 +1 @@
|
||||
EXTRA_DIST=access.txt modification.txt
|
@ -1,25 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pidof php > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "FastCGI PHPinfo"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
FastCGI PHPinfo
|
||||
GET /phpinfo.php HTTP/1.0
|
||||
Host: www.example.org
|
||||
|
||||
Status: 200
|
||||
EOF
|
||||
|
||||
run_test
|
||||
|
@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pidof php > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "FastCGI - missing File"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
FastCGI - missing File
|
||||
GET /phpinfajdhdo.php HTTP/1.1
|
||||
Host: www.example.org
|
||||
|
||||
Status: 404
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,25 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pidof php > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "index-file -> FastCGI"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
index-file -> FastCGI
|
||||
GET /go/ HTTP/1.0
|
||||
Host: www.example.org
|
||||
|
||||
Status: 200
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pidof php > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "Redirect in PHP"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
Redirect in PHP
|
||||
GET /redirect.php HTTP/1.0
|
||||
Host: www.example.org
|
||||
Conntection: close
|
||||
|
||||
Status: 302
|
||||
Location: http://www.example.org:2048/
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pidof php > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "Redirect in PHP"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
PHP_SELF
|
||||
GET /phpself.php HTTP/1.0
|
||||
Host: www.example.org
|
||||
Conntection: close
|
||||
|
||||
Status: 200
|
||||
Content: /phpself.php
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pidof php > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "Redirect in PHP"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
PHP_SELF + PATH_INFO
|
||||
GET /phpself.php/foo HTTP/1.0
|
||||
Host: www.example.org
|
||||
Conntection: close
|
||||
|
||||
Status: 200
|
||||
Content: /phpself.php
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pidof php > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "Redirect in PHP"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
SERVER_NAME + known host, simplevhost
|
||||
GET /phphost.php HTTP/1.0
|
||||
Host: www.example.org
|
||||
Conntection: close
|
||||
|
||||
Status: 200
|
||||
Content: www.example.org
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pidof php > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "Redirect in PHP"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
SERVER_NAME + unknown host, default
|
||||
GET /phphost.php HTTP/1.0
|
||||
Host: xxx.example.org
|
||||
Conntection: close
|
||||
|
||||
Status: 200
|
||||
Content: www.example.org
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pidof php > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "Redirect in PHP"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
SERVER_NAME + \$HTTP["Host"], default
|
||||
GET /phphost.php HTTP/1.0
|
||||
Host: vvv.example.org
|
||||
Conntection: close
|
||||
|
||||
Status: 200
|
||||
Content: www.example.org
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pidof php > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "Redirect in PHP"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
SERVER_NAME + \$HTTP, servername
|
||||
GET /phphost.php HTTP/1.0
|
||||
Host: zzz.example.org
|
||||
Conntection: close
|
||||
|
||||
Status: 200
|
||||
Content: zzz.example.org
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
FastCGI-Auth - ok
|
||||
GET /index.html?ok HTTP/1.0
|
||||
Host: www.example.org
|
||||
Conntection: close
|
||||
|
||||
Status: 200
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
FastCGI-Authorizer - 403
|
||||
GET /index.html?fail HTTP/1.0
|
||||
Host: www.example.org
|
||||
Conntection: close
|
||||
|
||||
Status: 403
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if test -e /home/weigon/Documents/php-4.3.10/sapi/cgi/php > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "FastCGI PHPinfo"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
FastCGI + local-spawning
|
||||
GET /indexfile/index.php HTTP/1.0
|
||||
Host: www.example.org
|
||||
Conntection: close
|
||||
|
||||
Status: 200
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
HEAD request should have no content
|
||||
HEAD /index.html HTTP/1.0
|
||||
|
||||
Status: 200
|
||||
EOF
|
||||
|
||||
run_test_script
|
||||
|
||||
if test x$exitcode = x0; then
|
||||
if test `cat $NAME.out | sed '1,/^.$/d' | wc -l` = 0; then
|
||||
a=a
|
||||
else
|
||||
exitcode=-1
|
||||
fi
|
||||
fi
|
||||
|
||||
run_test_exit
|
@ -1,25 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
large request header
|
||||
GET / HTTP/1.0
|
||||
Hsgfsdjf: asdfhdf
|
||||
hdhd: shdfhfdasd
|
||||
hfhr: jfghsdfg
|
||||
jfuuehdmn: sfdgjfdg
|
||||
jvcbzufdg: sgfdfg
|
||||
hrnvcnd: jfjdfg
|
||||
jfusfdngmd: gfjgfdusdfg
|
||||
nfj: jgfdjdfg
|
||||
jfue: jfdfdg
|
||||
|
||||
Status: 200
|
||||
EOF
|
||||
|
||||
run_test
|
@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pidof php > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "PathInfo"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
PathInfo
|
||||
GET /cgi.php/abc HTTP/1.0
|
||||
|
||||
Status: 200
|
||||
EOF
|
||||
|
||||
run_test
|
||||
|
@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if pidof php > /dev/null; then
|
||||
echo -n
|
||||
else
|
||||
printf "%-40s" "PathInfo"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
test x$srcdir = x && srcdir=.
|
||||
|
||||
. $srcdir/testbase.sh
|
||||
|
||||
prepare_test
|
||||
|
||||
cat > $TMPFILE <<EOF
|
||||
PathInfo on a directory
|
||||
GET /www/abc/def HTTP/1.0
|
||||
|
||||
Status: 404
|
||||
EOF
|
||||
|
||||
run_test
|
||||
|
Loading…
Reference in New Issue