From: Raghubansh Kumar Date: Fri, 6 Jul 2007 18:28:33 +0000 (+0000) Subject: Fix and smaller testcases for is_executable_variation.phpt, is_readable_variation... X-Git-Tag: BEFORE_IMPORT_OF_MYSQLND~308 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=343f87658b9cc945aebe2a2907d3cda91a7a91b8;p=php Fix and smaller testcases for is_executable_variation.phpt, is_readable_variation.phpt & is_writable_variation.phpt --- diff --git a/ext/standard/tests/file/is_executable_variation1.phpt b/ext/standard/tests/file/is_executable_variation1.phpt new file mode 100644 index 0000000000..7126de6e62 --- /dev/null +++ b/ext/standard/tests/file/is_executable_variation1.phpt @@ -0,0 +1,111 @@ +--TEST-- +Test is_executable() function: usage variations - diff. path notations +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing is_executable(): usage variations *** +-- Iteration 1 -- +bool(false) +-- Iteration 2 -- +bool(false) +-- Iteration 3 -- +bool(false) +-- Iteration 4 -- +bool(false) +-- Iteration 5 -- +bool(false) +-- Iteration 6 -- +bool(true) +-- Iteration 7 -- +bool(true) +-- Iteration 8 -- +bool(false) +-- Iteration 9 -- +bool(true) +-- Iteration 10 -- +bool(true) +Done +--UEXPECTF-- +*** Testing is_executable(): usage variations *** +-- Iteration 1 -- +bool(false) +-- Iteration 2 -- +bool(false) +-- Iteration 3 -- +bool(false) +-- Iteration 4 -- +bool(false) +-- Iteration 5 -- +bool(false) +-- Iteration 6 -- +bool(true) +-- Iteration 7 -- +bool(true) +-- Iteration 8 -- +bool(false) +-- Iteration 9 -- +bool(true) +-- Iteration 10 -- +bool(true) +Done \ No newline at end of file diff --git a/ext/standard/tests/file/is_executable_variation2.phpt b/ext/standard/tests/file/is_executable_variation2.phpt new file mode 100644 index 0000000000..fd619a75ca --- /dev/null +++ b/ext/standard/tests/file/is_executable_variation2.phpt @@ -0,0 +1,128 @@ +--TEST-- +Test is_executable() function: usage variations - file/dir with diff. perms +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing is_executable(): usage variations *** + +*** Testing is_executable() on directory without execute permission *** +bool(false) + +*** Testing miscelleneous input for is_executable() function *** +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +-- Iteration 5 -- +bool(false) +-- Iteration 6 -- +bool(true) +-- Iteration 7 -- +bool(true) +-- Iteration 8 -- +bool(true) +-- Iteration 9 -- +bool(false) +-- Iteration 10 -- +bool(true) +Done +--UEXPECTF-- +*** Testing is_executable(): usage variations *** + +*** Testing is_executable() on directory without execute permission *** +bool(false) + +*** Testing miscelleneous input for is_executable() function *** +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +-- Iteration 5 -- +bool(false) +-- Iteration 6 -- +bool(true) +-- Iteration 7 -- +bool(true) +-- Iteration 8 -- +bool(true) +-- Iteration 9 -- +bool(false) +-- Iteration 10 -- +bool(true) +Done diff --git a/ext/standard/tests/file/is_executable_variation3.phpt b/ext/standard/tests/file/is_executable_variation3.phpt new file mode 100644 index 0000000000..6d98f19f42 --- /dev/null +++ b/ext/standard/tests/file/is_executable_variation3.phpt @@ -0,0 +1,71 @@ +--TEST-- +Test is_executable() function: usage variations - invalid file names +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing is_executable(): usage variations *** + +*** Testing is_executable() on invalid files *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) + +Warning: is_executable() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL +bool(false) +Done +--UEXPECTF-- +*** Testing is_executable(): usage variations *** + +*** Testing is_executable() on invalid files *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) + +Warning: is_executable() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL +bool(false) +Done diff --git a/ext/standard/tests/file/is_readable_variation1.phpt b/ext/standard/tests/file/is_readable_variation1.phpt new file mode 100644 index 0000000000..a22651c746 --- /dev/null +++ b/ext/standard/tests/file/is_readable_variation1.phpt @@ -0,0 +1,116 @@ +--TEST-- +Test is_readable() function: usage variations - diff. file notations +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing is_readable(): usage variations *** +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(%s) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +-- Iteration 5 -- +bool(false) +-- Iteration 6 -- +bool(false) +-- Iteration 7 -- +bool(true) +-- Iteration 8 -- +bool(true) +-- Iteration 9 -- +bool(true) +-- Iteration 10 -- +bool(true) +-- Iteration 11 -- +bool(true) +Done +--UEXPECTF-- +*** Testing is_readable(): usage variations *** +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(%s) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +-- Iteration 5 -- +bool(false) +-- Iteration 6 -- +bool(false) +-- Iteration 7 -- +bool(true) +-- Iteration 8 -- +bool(true) +-- Iteration 9 -- +bool(true) +-- Iteration 10 -- +bool(true) +-- Iteration 11 -- +bool(true) +Done \ No newline at end of file diff --git a/ext/standard/tests/file/is_readable_variation2.phpt b/ext/standard/tests/file/is_readable_variation2.phpt new file mode 100644 index 0000000000..5de18e35a6 --- /dev/null +++ b/ext/standard/tests/file/is_readable_variation2.phpt @@ -0,0 +1,128 @@ +--TEST-- +Test is_readable() function: usage variations - file/dir with diff. perms +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing is_readable(): usage variations *** + +*** Testing is_readable() on directory without read permission *** +bool(false) + +*** Testing miscelleneous input for is_readable() function *** +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +-- Iteration 5 -- +bool(false) +-- Iteration 6 -- +bool(true) +-- Iteration 7 -- +bool(true) +-- Iteration 8 -- +bool(true) +-- Iteration 9 -- +bool(true) +-- Iteration 10 -- +bool(true) +Done +--UEXPECTF-- +*** Testing is_readable(): usage variations *** + +*** Testing is_readable() on directory without read permission *** +bool(false) + +*** Testing miscelleneous input for is_readable() function *** +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +-- Iteration 5 -- +bool(false) +-- Iteration 6 -- +bool(true) +-- Iteration 7 -- +bool(true) +-- Iteration 8 -- +bool(true) +-- Iteration 9 -- +bool(true) +-- Iteration 10 -- +bool(true) +Done \ No newline at end of file diff --git a/ext/standard/tests/file/is_readable_variation3.phpt b/ext/standard/tests/file/is_readable_variation3.phpt new file mode 100644 index 0000000000..acb9bfc43c --- /dev/null +++ b/ext/standard/tests/file/is_readable_variation3.phpt @@ -0,0 +1,71 @@ +--TEST-- +Test is_readable() function: usage variations - invalid file names +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing is_readable(): usage variations *** + +*** Testing is_readable() on miscelleneous filenames *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) + +Warning: is_readable() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL +bool(false) +Done +--UEXPECTF-- +*** Testing is_readable(): usage variations *** + +*** Testing is_readable() on miscelleneous filenames *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) + +Warning: is_readable() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL +bool(false) +Done diff --git a/ext/standard/tests/file/is_writable_variation1.phpt b/ext/standard/tests/file/is_writable_variation1.phpt new file mode 100644 index 0000000000..93849d3864 --- /dev/null +++ b/ext/standard/tests/file/is_writable_variation1.phpt @@ -0,0 +1,139 @@ +--TEST-- +Test is_writable() and its alias is_writeable() function: usage variations - diff. path notations +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing is_writable(): usage variations *** +-- Iteration 1 -- +bool(true) +bool(true) +-- Iteration 2 -- +bool(%s) +bool(%s) +-- Iteration 3 -- +bool(true) +bool(true) +-- Iteration 4 -- +bool(true) +bool(true) +-- Iteration 5 -- +bool(false) +bool(false) +-- Iteration 6 -- +bool(false) +bool(false) +-- Iteration 7 -- +bool(true) +bool(true) +-- Iteration 8 -- +bool(true) +bool(true) +-- Iteration 9 -- +bool(true) +bool(true) +-- Iteration 10 -- +bool(true) +bool(true) +-- Iteration 11 -- +bool(true) +bool(true) +Done +--UEXPECTF-- +*** Testing is_writable(): usage variations *** +-- Iteration 1 -- +bool(true) +bool(true) +-- Iteration 2 -- +bool(%s) +bool(%s) +-- Iteration 3 -- +bool(true) +bool(true) +-- Iteration 4 -- +bool(true) +bool(true) +-- Iteration 5 -- +bool(false) +bool(false) +-- Iteration 6 -- +bool(false) +bool(false) +-- Iteration 7 -- +bool(true) +bool(true) +-- Iteration 8 -- +bool(true) +bool(true) +-- Iteration 9 -- +bool(true) +bool(true) +-- Iteration 10 -- +bool(true) +bool(true) +-- Iteration 11 -- +bool(true) +bool(true) +Done diff --git a/ext/standard/tests/file/is_writable_variation2.phpt b/ext/standard/tests/file/is_writable_variation2.phpt new file mode 100644 index 0000000000..7e59b04631 --- /dev/null +++ b/ext/standard/tests/file/is_writable_variation2.phpt @@ -0,0 +1,155 @@ +--TEST-- +Test is_writable() and its alias is_writeable() function: usage variations - file/dir with diff. perms +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +*** Testing is_writable(): usage variations *** + +*** Testing is_writable() on directory without write permission *** +bool(false) +bool(false) + +*** Testing miscelleneous input for is_writable() function *** +-- Iteration 1 -- +bool(true) +bool(true) +-- Iteration 2 -- +bool(true) +bool(true) +-- Iteration 3 -- +bool(true) +bool(true) +-- Iteration 4 -- +bool(false) +bool(false) +-- Iteration 5 -- +bool(true) +bool(true) +-- Iteration 6 -- +bool(true) +bool(true) +-- Iteration 7 -- +bool(false) +bool(false) +-- Iteration 8 -- +bool(true) +bool(true) +-- Iteration 9 -- +bool(false) +bool(false) +-- Iteration 10 -- +bool(false) +bool(false) +Done +--UEXPECTF-- +*** Testing is_writable(): usage variations *** + +*** Testing is_writable() on directory without write permission *** +bool(false) +bool(false) + +*** Testing miscelleneous input for is_writable() function *** +-- Iteration 1 -- +bool(true) +bool(true) +-- Iteration 2 -- +bool(true) +bool(true) +-- Iteration 3 -- +bool(true) +bool(true) +-- Iteration 4 -- +bool(false) +bool(false) +-- Iteration 5 -- +bool(true) +bool(true) +-- Iteration 6 -- +bool(true) +bool(true) +-- Iteration 7 -- +bool(false) +bool(false) +-- Iteration 8 -- +bool(true) +bool(true) +-- Iteration 9 -- +bool(false) +bool(false) +-- Iteration 10 -- +bool(false) +bool(false) +Done diff --git a/ext/standard/tests/file/is_writable_variation3.phpt b/ext/standard/tests/file/is_writable_variation3.phpt new file mode 100644 index 0000000000..f8ba85542e --- /dev/null +++ b/ext/standard/tests/file/is_writable_variation3.phpt @@ -0,0 +1,91 @@ +--TEST-- +Test is_writable() and its alias is_writeable() function: usage variations - invalid file names +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +*** Testing is_writable(): usage variations *** + +*** Testing is_writable() with invalid filenames *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) + +Warning: is_writable() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL + +Warning: is_writeable() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL +bool(false) +bool(false) +Done +--UEXPECTF-- +*** Testing is_writable(): usage variations *** + +*** Testing is_writable() with invalid filenames *** +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) +bool(false) + +Warning: is_writable() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL + +Warning: is_writeable() expects parameter 1 to be string (Unicode or binary), array given in %s on line %d +NULL +bool(false) +bool(false) +Done