From c4dd7a1a684490673e25aaf4fabec5df138854c4 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Thu, 14 Mar 2013 05:42:27 +0000 Subject: Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2. --- sapi/tests/test001.phpt | 16 +++++++++++ sapi/tests/test002.phpt | 22 +++++++++++++++ sapi/tests/test003.phpt | 21 ++++++++++++++ sapi/tests/test004.phpt | 26 ++++++++++++++++++ sapi/tests/test005.phpt | 27 ++++++++++++++++++ sapi/tests/test006.phpt | 73 +++++++++++++++++++++++++++++++++++++++++++++++++ sapi/tests/test007.phpt | 46 +++++++++++++++++++++++++++++++ 7 files changed, 231 insertions(+) create mode 100644 sapi/tests/test001.phpt create mode 100644 sapi/tests/test002.phpt create mode 100644 sapi/tests/test003.phpt create mode 100644 sapi/tests/test004.phpt create mode 100644 sapi/tests/test005.phpt create mode 100644 sapi/tests/test006.phpt create mode 100644 sapi/tests/test007.phpt (limited to 'sapi/tests') diff --git a/sapi/tests/test001.phpt b/sapi/tests/test001.phpt new file mode 100644 index 0000000..a964393 --- /dev/null +++ b/sapi/tests/test001.phpt @@ -0,0 +1,16 @@ +--TEST-- +IIS style CGI missing SCRIPT_FILENAME +--DESCRIPTION-- +This would be similar to what IIS produces for a simple query. +--ENV-- +return << +--EXPECT-- +HELLO \ No newline at end of file diff --git a/sapi/tests/test002.phpt b/sapi/tests/test002.phpt new file mode 100644 index 0000000..42ade3d --- /dev/null +++ b/sapi/tests/test002.phpt @@ -0,0 +1,22 @@ +--TEST-- +Apache style CGI +--DESCRIPTION-- +Apache likes to set SCRIPT_FILENAME to the php executable +if you use ScriptAlias configurations, and the proper +path is in PATH_TRANSLATED. SCRIPT_NAME in this is faked, +but that is ok, Apache sets SCRIPT_NAME to the ScriptAlias +of the executable. +--ENV-- +return <<conf['TEST_PHP_EXECUTABLE'] +END; +--FILE-- + +--EXPECT-- +HELLO \ No newline at end of file diff --git a/sapi/tests/test003.phpt b/sapi/tests/test003.phpt new file mode 100644 index 0000000..5cabe66 --- /dev/null +++ b/sapi/tests/test003.phpt @@ -0,0 +1,21 @@ +--TEST-- +IIS style CGI missing SCRIPT_FILENAME, has PATH_INFO +--DESCRIPTION-- +This would be similar to what IIS produces for a simple query +that also has PATH_INFO. +--REQUEST-- +return << +--EXPECT-- +/path/info \ No newline at end of file diff --git a/sapi/tests/test004.phpt b/sapi/tests/test004.phpt new file mode 100644 index 0000000..ef43774 --- /dev/null +++ b/sapi/tests/test004.phpt @@ -0,0 +1,26 @@ +--TEST-- +Apache style CGI with PATH_INFO +--DESCRIPTION-- +Apache likes to set SCRIPT_FILENAME to the php executable +if you use ScriptAlias configurations, and the proper +path is in PATH_TRANSLATED. SCRIPT_NAME in this is faked, +but that is ok, Apache sets SCRIPT_NAME to the ScriptAlias +of the executable. +--REQUEST-- +return <<conf['TEST_PHP_EXECUTABLE'] +END; +--FILE-- + +--EXPECT-- +/path/info \ No newline at end of file diff --git a/sapi/tests/test005.phpt b/sapi/tests/test005.phpt new file mode 100644 index 0000000..7415b66 --- /dev/null +++ b/sapi/tests/test005.phpt @@ -0,0 +1,27 @@ +--TEST-- +QUERY_STRING Security Bug +--DESCRIPTION-- +This bug was present in PHP 4.3.0 only. +A failure should print HELLO. +--REQUEST-- +return << +--EXPECTHEADERS-- +Status: 404 +--EXPECT-- +No input file specified. \ No newline at end of file diff --git a/sapi/tests/test006.phpt b/sapi/tests/test006.phpt new file mode 100644 index 0000000..45e3781 --- /dev/null +++ b/sapi/tests/test006.phpt @@ -0,0 +1,73 @@ +--TEST-- +Multipart Form POST Data +--HEADERS-- +return << +-----------------------------240723202011929-- + +--FILE-- + +--EXPECTF-- +Array +( + [entry] => entry box + [password] => password box + [radio1] => test 1 + [checkbox1] => test 1 + [choices] => Choice 2 +) +Array +( + [file] => Array + ( + [name] => info.php + [type] => application/octet-stream + [tmp_name] => %s + [error] => 0 + [size] => 21 + ) + +) diff --git a/sapi/tests/test007.phpt b/sapi/tests/test007.phpt new file mode 100644 index 0000000..8c50e4b --- /dev/null +++ b/sapi/tests/test007.phpt @@ -0,0 +1,46 @@ +--TEST-- +Multipart Form POST Data, incorrect content length +--HEADERS-- +return << +-----------------------------240723202011929-- + +--FILE-- + +--EXPECT-- -- cgit v1.2.1