From: Steve Seear Date: Wed, 19 Mar 2008 18:06:22 +0000 (+0000) Subject: Adding language tests. X-Git-Tag: RELEASE_2_0_0a1~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da3c0d3904d75090e205390dfea38416dfc6ed53;p=php Adding language tests. --- diff --git a/tests/lang/empty_variation.phpt b/tests/lang/empty_variation.phpt new file mode 100644 index 0000000000..8e940dae52 --- /dev/null +++ b/tests/lang/empty_variation.phpt @@ -0,0 +1,14 @@ +--TEST-- +empty() on array elements +--FILE-- +'0'); +var_dump(empty($a['empty'])); +var_dump(empty($a[0])); +$b='0'; +var_dump(empty($b)); +?> +--EXPECT-- +bool(true) +bool(true) +bool(true) diff --git a/tests/lang/inc_throw.inc b/tests/lang/inc_throw.inc new file mode 100644 index 0000000000..1f032f7e70 --- /dev/null +++ b/tests/lang/inc_throw.inc @@ -0,0 +1,5 @@ + diff --git a/tests/lang/include_files/echo.inc b/tests/lang/include_files/echo.inc new file mode 100644 index 0000000000..60714f6e4f --- /dev/null +++ b/tests/lang/include_files/echo.inc @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/tests/lang/include_files/eval.inc b/tests/lang/include_files/eval.inc new file mode 100644 index 0000000000..16da86295d --- /dev/null +++ b/tests/lang/include_files/eval.inc @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/tests/lang/include_files/function.inc b/tests/lang/include_files/function.inc new file mode 100644 index 0000000000..528f46c564 --- /dev/null +++ b/tests/lang/include_files/function.inc @@ -0,0 +1,3 @@ + diff --git a/tests/lang/include_variation1.phpt b/tests/lang/include_variation1.phpt new file mode 100644 index 0000000000..cf99ba9d37 --- /dev/null +++ b/tests/lang/include_variation1.phpt @@ -0,0 +1,8 @@ +--TEST-- +include() a file from the current script directory +--FILE-- + +--EXPECT-- +Included! diff --git a/tests/lang/include_variation2.phpt b/tests/lang/include_variation2.phpt new file mode 100644 index 0000000000..051ed7157c --- /dev/null +++ b/tests/lang/include_variation2.phpt @@ -0,0 +1,9 @@ +--TEST-- +Including a file in the current script directory from an included function +--FILE-- + +--EXPECT-- +Included! diff --git a/tests/lang/include_variation3.phpt b/tests/lang/include_variation3.phpt new file mode 100644 index 0000000000..1fa80c5ab9 --- /dev/null +++ b/tests/lang/include_variation3.phpt @@ -0,0 +1,8 @@ +--TEST-- +Including a file in the current script directory from eval'd code +--FILE-- + +--EXPECT-- +Included! \ No newline at end of file diff --git a/tests/lang/throw_variation_001.phpt b/tests/lang/throw_variation_001.phpt new file mode 100644 index 0000000000..d942a87930 --- /dev/null +++ b/tests/lang/throw_variation_001.phpt @@ -0,0 +1,14 @@ +--TEST-- +Catching an exception thrown from an included file +--FILE-- + +--EXPECT-- +caught exception