From: Josie Messa Date: Mon, 17 Mar 2008 09:52:02 +0000 (+0000) Subject: - new tests for ctype functions X-Git-Tag: BEFORE_NEW_PARAMETER_PARSE~574 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5cd721058b6d1b405130cc689c17602fbd4787d;p=php - new tests for ctype functions --- diff --git a/ext/ctype/tests/ctype_alnum_basic.phpt b/ext/ctype/tests/ctype_alnum_basic.phpt new file mode 100644 index 0000000000..32da928c25 --- /dev/null +++ b/ext/ctype/tests/ctype_alnum_basic.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test ctype_alnum() function : basic functionality +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_alnum() : basic functionality *** +bool(true) +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_alnum_error.phpt b/ext/ctype/tests/ctype_alnum_error.phpt new file mode 100644 index 0000000000..9ced2d7c78 --- /dev/null +++ b/ext/ctype/tests/ctype_alnum_error.phpt @@ -0,0 +1,43 @@ +--TEST-- +Test ctype_alnum() function : error conditions - Incorrect number of args +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_alnum() : error conditions *** + +-- Testing ctype_alnum() function with Zero arguments -- + +Warning: ctype_alnum() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +-- Testing ctype_alnum() function with more than expected no. of arguments -- + +Warning: ctype_alnum() expects exactly 1 parameter, 2 given in %s on line %d +NULL +===DONE=== diff --git a/ext/ctype/tests/ctype_alnum_variation1.phpt b/ext/ctype/tests/ctype_alnum_variation1.phpt new file mode 100644 index 0000000000..3f67307483 --- /dev/null +++ b/ext/ctype/tests/ctype_alnum_variation1.phpt @@ -0,0 +1,177 @@ +--TEST-- +Test ctype_alnum() function : usage variations - Different data types as $c arg +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_alnum() : usage variations *** + +-- Iteration 1 -- +bool(false) + +-- Iteration 2 -- +bool(false) + +-- Iteration 3 -- +bool(true) + +-- Iteration 4 -- +bool(false) + +-- Iteration 5 -- +bool(false) + +-- Iteration 6 -- +bool(false) + +-- Iteration 7 -- +bool(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(false) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(true) + +-- Iteration 20 -- +bool(true) + +-- Iteration 21 -- +bool(true) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_alnum_variation2.phpt b/ext/ctype/tests/ctype_alnum_variation2.phpt new file mode 100644 index 0000000000..c360e676cf --- /dev/null +++ b/ext/ctype/tests/ctype_alnum_variation2.phpt @@ -0,0 +1,92 @@ +--TEST-- +Test ctype_alnum() function : usage variations - different integers +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_alnum() : usage variations *** +character code 48 is alpha numeric +character code 49 is alpha numeric +character code 50 is alpha numeric +character code 51 is alpha numeric +character code 52 is alpha numeric +character code 53 is alpha numeric +character code 54 is alpha numeric +character code 55 is alpha numeric +character code 56 is alpha numeric +character code 57 is alpha numeric +character code 65 is alpha numeric +character code 66 is alpha numeric +character code 67 is alpha numeric +character code 68 is alpha numeric +character code 69 is alpha numeric +character code 70 is alpha numeric +character code 71 is alpha numeric +character code 72 is alpha numeric +character code 73 is alpha numeric +character code 74 is alpha numeric +character code 75 is alpha numeric +character code 76 is alpha numeric +character code 77 is alpha numeric +character code 78 is alpha numeric +character code 79 is alpha numeric +character code 80 is alpha numeric +character code 81 is alpha numeric +character code 82 is alpha numeric +character code 83 is alpha numeric +character code 84 is alpha numeric +character code 85 is alpha numeric +character code 86 is alpha numeric +character code 87 is alpha numeric +character code 88 is alpha numeric +character code 89 is alpha numeric +character code 90 is alpha numeric +character code 97 is alpha numeric +character code 98 is alpha numeric +character code 99 is alpha numeric +character code 100 is alpha numeric +character code 101 is alpha numeric +character code 102 is alpha numeric +character code 103 is alpha numeric +character code 104 is alpha numeric +character code 105 is alpha numeric +character code 106 is alpha numeric +character code 107 is alpha numeric +character code 108 is alpha numeric +character code 109 is alpha numeric +character code 110 is alpha numeric +character code 111 is alpha numeric +character code 112 is alpha numeric +character code 113 is alpha numeric +character code 114 is alpha numeric +character code 115 is alpha numeric +character code 116 is alpha numeric +character code 117 is alpha numeric +character code 118 is alpha numeric +character code 119 is alpha numeric +character code 120 is alpha numeric +character code 121 is alpha numeric +character code 122 is alpha numeric +===DONE=== diff --git a/ext/ctype/tests/ctype_alnum_variation3.phpt b/ext/ctype/tests/ctype_alnum_variation3.phpt new file mode 100644 index 0000000000..ee0a74836d --- /dev/null +++ b/ext/ctype/tests/ctype_alnum_variation3.phpt @@ -0,0 +1,127 @@ +--TEST-- +Test ctype_alnum() function : usage variations - different string values +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_alnum() : usage variations *** + +-- Iteration 1 -- +bool(false) + +-- Iteration 2 -- +bool(false) + +-- Iteration 3 -- +bool(false) + +-- Iteration 4 -- +bool(false) + +-- Iteration 5 -- +bool(true) + +-- Iteration 6 -- +bool(true) + +-- Iteration 7 -- +bool(true) + +-- Iteration 8 -- +bool(true) + +-- Iteration 9 -- +bool(true) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(true) + +-- Iteration 12 -- +bool(true) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(true) + +-- Iteration 16 -- +bool(true) + +-- Iteration 17 -- +bool(true) + +-- Iteration 18 -- +bool(true) + +-- Iteration 19 -- +bool(false) + +-- Iteration 20 -- +bool(false) + +-- Iteration 21 -- +bool(false) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_alnum_variation4.phpt b/ext/ctype/tests/ctype_alnum_variation4.phpt new file mode 100644 index 0000000000..d56c925c75 --- /dev/null +++ b/ext/ctype/tests/ctype_alnum_variation4.phpt @@ -0,0 +1,62 @@ +--TEST-- +Test ctype_alnum() function : usage variations - octal and hexadecimal values +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_alnum() : usage variations *** + +-- Octal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) + +-- Hexadecimal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +===DONE=== diff --git a/ext/ctype/tests/ctype_alpha_basic.phpt b/ext/ctype/tests/ctype_alpha_basic.phpt new file mode 100644 index 0000000000..c467bf8f66 --- /dev/null +++ b/ext/ctype/tests/ctype_alpha_basic.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test ctype_alpha() function : basic functionality +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_alpha() : basic functionality *** +bool(true) +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_alpha_error.phpt b/ext/ctype/tests/ctype_alpha_error.phpt new file mode 100644 index 0000000000..18c2edb525 --- /dev/null +++ b/ext/ctype/tests/ctype_alpha_error.phpt @@ -0,0 +1,39 @@ +--TEST-- +Test ctype_alpha() function : error conditions - Incorrect number of arguments +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_alpha() : error conditions *** + +-- Testing ctype_alpha() function with Zero arguments -- + +Warning: ctype_alpha() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +-- Testing ctype_alpha() function with more than expected no. of arguments -- + +Warning: ctype_alpha() expects exactly 1 parameter, 2 given in %s on line %d +NULL +===DONE=== diff --git a/ext/ctype/tests/ctype_alpha_variation1.phpt b/ext/ctype/tests/ctype_alpha_variation1.phpt new file mode 100644 index 0000000000..98c64a16e3 --- /dev/null +++ b/ext/ctype/tests/ctype_alpha_variation1.phpt @@ -0,0 +1,177 @@ +--TEST-- +Test ctype_alpha() function : usage variations - different data types as $c arg +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_alpha() : 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(false) + +-- Iteration 7 -- +bool(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(false) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(true) + +-- Iteration 20 -- +bool(true) + +-- Iteration 21 -- +bool(true) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_alpha_variation2.phpt b/ext/ctype/tests/ctype_alpha_variation2.phpt new file mode 100644 index 0000000000..ea3afc2be1 --- /dev/null +++ b/ext/ctype/tests/ctype_alpha_variation2.phpt @@ -0,0 +1,82 @@ +--TEST-- +Test ctype_alpha() function : usage variations - different integers +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_alpha() : usage variations *** +character code 65 is alphabetic +character code 66 is alphabetic +character code 67 is alphabetic +character code 68 is alphabetic +character code 69 is alphabetic +character code 70 is alphabetic +character code 71 is alphabetic +character code 72 is alphabetic +character code 73 is alphabetic +character code 74 is alphabetic +character code 75 is alphabetic +character code 76 is alphabetic +character code 77 is alphabetic +character code 78 is alphabetic +character code 79 is alphabetic +character code 80 is alphabetic +character code 81 is alphabetic +character code 82 is alphabetic +character code 83 is alphabetic +character code 84 is alphabetic +character code 85 is alphabetic +character code 86 is alphabetic +character code 87 is alphabetic +character code 88 is alphabetic +character code 89 is alphabetic +character code 90 is alphabetic +character code 97 is alphabetic +character code 98 is alphabetic +character code 99 is alphabetic +character code 100 is alphabetic +character code 101 is alphabetic +character code 102 is alphabetic +character code 103 is alphabetic +character code 104 is alphabetic +character code 105 is alphabetic +character code 106 is alphabetic +character code 107 is alphabetic +character code 108 is alphabetic +character code 109 is alphabetic +character code 110 is alphabetic +character code 111 is alphabetic +character code 112 is alphabetic +character code 113 is alphabetic +character code 114 is alphabetic +character code 115 is alphabetic +character code 116 is alphabetic +character code 117 is alphabetic +character code 118 is alphabetic +character code 119 is alphabetic +character code 120 is alphabetic +character code 121 is alphabetic +character code 122 is alphabetic +===DONE=== diff --git a/ext/ctype/tests/ctype_alpha_variation3.phpt b/ext/ctype/tests/ctype_alpha_variation3.phpt new file mode 100644 index 0000000000..3eed897954 --- /dev/null +++ b/ext/ctype/tests/ctype_alpha_variation3.phpt @@ -0,0 +1,128 @@ +--TEST-- +Test ctype_alpha() function : usage variations - different strings +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_alpha() : usage variations *** + +-- Iteration 1 -- +bool(false) + +-- Iteration 2 -- +bool(false) + +-- Iteration 3 -- +bool(false) + +-- Iteration 4 -- +bool(false) + +-- Iteration 5 -- +bool(true) + +-- Iteration 6 -- +bool(true) + +-- Iteration 7 -- +bool(true) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(true) + +-- Iteration 16 -- +bool(true) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(false) + +-- Iteration 20 -- +bool(false) + +-- Iteration 21 -- +bool(false) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_alpha_variation4.phpt b/ext/ctype/tests/ctype_alpha_variation4.phpt new file mode 100644 index 0000000000..cf091a7b1b --- /dev/null +++ b/ext/ctype/tests/ctype_alpha_variation4.phpt @@ -0,0 +1,62 @@ +--TEST-- +Test ctype_alpha() function : usage variations - Octal and hexadecimal values +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_alpha() : usage variations *** + +-- Octal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) + +-- Hexadecimal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +===DONE=== diff --git a/ext/ctype/tests/ctype_cntrl_basic.phpt b/ext/ctype/tests/ctype_cntrl_basic.phpt new file mode 100644 index 0000000000..5bd977b060 --- /dev/null +++ b/ext/ctype/tests/ctype_cntrl_basic.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test ctype_cntrl() function : basic functionality +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_cntrl() : basic functionality *** +bool(true) +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_cntrl_error.phpt b/ext/ctype/tests/ctype_cntrl_error.phpt new file mode 100644 index 0000000000..d089e6edf5 --- /dev/null +++ b/ext/ctype/tests/ctype_cntrl_error.phpt @@ -0,0 +1,39 @@ +--TEST-- +Test ctype_cntrl() function : error conditions - Incorrect number of args +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_cntrl() : error conditions *** + +-- Testing ctype_cntrl() function with Zero arguments -- + +Warning: ctype_cntrl() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +-- Testing ctype_cntrl() function with more than expected no. of arguments -- + +Warning: ctype_cntrl() expects exactly 1 parameter, 2 given in %s on line %d +NULL +===DONE=== diff --git a/ext/ctype/tests/ctype_cntrl_variation1.phpt b/ext/ctype/tests/ctype_cntrl_variation1.phpt new file mode 100644 index 0000000000..0740d0def7 --- /dev/null +++ b/ext/ctype/tests/ctype_cntrl_variation1.phpt @@ -0,0 +1,178 @@ +--TEST-- +Test ctype_cntrl() function : usage variations - Different data types as $c arg +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_cntrl() : usage variations *** + +-- Iteration 1 -- +bool(true) + +-- Iteration 2 -- +bool(true) + +-- Iteration 3 -- +bool(false) + +-- Iteration 4 -- +bool(false) + +-- Iteration 5 -- +bool(false) + +-- Iteration 6 -- +bool(false) + +-- Iteration 7 -- +bool(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(false) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(true) + +-- Iteration 20 -- +bool(true) + +-- Iteration 21 -- +bool(true) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_cntrl_variation2.phpt b/ext/ctype/tests/ctype_cntrl_variation2.phpt new file mode 100644 index 0000000000..a9deaab587 --- /dev/null +++ b/ext/ctype/tests/ctype_cntrl_variation2.phpt @@ -0,0 +1,63 @@ +--TEST-- +Test ctype_cntrl() function : usage variations - different integers +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_cntrl() : usage variations *** +character code 0 is control character +character code 1 is control character +character code 2 is control character +character code 3 is control character +character code 4 is control character +character code 5 is control character +character code 6 is control character +character code 7 is control character +character code 8 is control character +character code 9 is control character +character code 10 is control character +character code 11 is control character +character code 12 is control character +character code 13 is control character +character code 14 is control character +character code 15 is control character +character code 16 is control character +character code 17 is control character +character code 18 is control character +character code 19 is control character +character code 20 is control character +character code 21 is control character +character code 22 is control character +character code 23 is control character +character code 24 is control character +character code 25 is control character +character code 26 is control character +character code 27 is control character +character code 28 is control character +character code 29 is control character +character code 30 is control character +character code 31 is control character +character code 127 is control character +===DONE=== diff --git a/ext/ctype/tests/ctype_cntrl_variation3.phpt b/ext/ctype/tests/ctype_cntrl_variation3.phpt new file mode 100644 index 0000000000..6528c1c0a6 --- /dev/null +++ b/ext/ctype/tests/ctype_cntrl_variation3.phpt @@ -0,0 +1,156 @@ +--TEST-- +Test ctype_cntrl() function : usage variations - Different strings +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_cntrl() : 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(false) + +-- Iteration 7 -- +bool(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(true) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(false) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(false) + +-- Iteration 20 -- +bool(false) + +-- Iteration 21 -- +bool(false) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(true) + +-- Iteration 25 -- +bool(true) + +-- Iteration 26 -- +bool(true) + +-- Iteration 27 -- +bool(false) + +-- Iteration 28 -- +bool(false) + +-- Iteration 29 -- +bool(false) + +-- Iteration 30 -- +bool(true) +===DONE=== diff --git a/ext/ctype/tests/ctype_cntrl_variation4.phpt b/ext/ctype/tests/ctype_cntrl_variation4.phpt new file mode 100644 index 0000000000..38f622d465 --- /dev/null +++ b/ext/ctype/tests/ctype_cntrl_variation4.phpt @@ -0,0 +1,61 @@ +--TEST-- +Test ctype_cntrl() function : usage variations - Octal and hexadecimal values +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_cntrl() : usage variations *** + +-- Octal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) + +-- Hexadecimal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +===DONE=== diff --git a/ext/ctype/tests/ctype_digit_basic.phpt b/ext/ctype/tests/ctype_digit_basic.phpt new file mode 100644 index 0000000000..e39208cca4 --- /dev/null +++ b/ext/ctype/tests/ctype_digit_basic.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test ctype_digit() function : basic functionality +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_digit() : basic functionality *** +bool(true) +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_digit_error.phpt b/ext/ctype/tests/ctype_digit_error.phpt new file mode 100644 index 0000000000..7f911eba6e --- /dev/null +++ b/ext/ctype/tests/ctype_digit_error.phpt @@ -0,0 +1,39 @@ +--TEST-- +Test ctype_digit() function : error conditions - incorrect number of arguments +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_digit() : error conditions *** + +-- Testing ctype_digit() function with Zero arguments -- + +Warning: ctype_digit() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +-- Testing ctype_digit() function with more than expected no. of arguments -- + +Warning: ctype_digit() expects exactly 1 parameter, 2 given in %s on line %d +NULL +===DONE=== diff --git a/ext/ctype/tests/ctype_digit_variation1.phpt b/ext/ctype/tests/ctype_digit_variation1.phpt new file mode 100644 index 0000000000..626dcee6c0 --- /dev/null +++ b/ext/ctype/tests/ctype_digit_variation1.phpt @@ -0,0 +1,177 @@ +--TEST-- +Test ctype_digit() function : usage variations - different data types as $c arg +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_digit() : usage variations *** + +-- Iteration 1 -- +bool(false) + +-- Iteration 2 -- +bool(false) + +-- Iteration 3 -- +bool(true) + +-- Iteration 4 -- +bool(false) + +-- Iteration 5 -- +bool(false) + +-- Iteration 6 -- +bool(false) + +-- Iteration 7 -- +bool(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(false) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(true) + +-- Iteration 20 -- +bool(true) + +-- Iteration 21 -- +bool(true) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_digit_variation2.phpt b/ext/ctype/tests/ctype_digit_variation2.phpt new file mode 100644 index 0000000000..e7b9115711 --- /dev/null +++ b/ext/ctype/tests/ctype_digit_variation2.phpt @@ -0,0 +1,40 @@ +--TEST-- +Test ctype_digit() function : usage variations - different integers +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_digit() : usage variations *** +character code 48 is a numeric digit +character code 49 is a numeric digit +character code 50 is a numeric digit +character code 51 is a numeric digit +character code 52 is a numeric digit +character code 53 is a numeric digit +character code 54 is a numeric digit +character code 55 is a numeric digit +character code 56 is a numeric digit +character code 57 is a numeric digit +===DONE=== diff --git a/ext/ctype/tests/ctype_digit_variation3.phpt b/ext/ctype/tests/ctype_digit_variation3.phpt new file mode 100644 index 0000000000..4746166a76 --- /dev/null +++ b/ext/ctype/tests/ctype_digit_variation3.phpt @@ -0,0 +1,158 @@ +--TEST-- +Test ctype_digit() function : usage variations - different strings +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_digit() : 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(false) + +-- Iteration 7 -- +bool(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(true) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(true) + +-- Iteration 15 -- +bool(true) + +-- Iteration 16 -- +bool(true) + +-- Iteration 17 -- +bool(true) + +-- Iteration 18 -- +bool(true) + +-- Iteration 19 -- +bool(true) + +-- Iteration 20 -- +bool(true) + +-- Iteration 21 -- +bool(true) + +-- Iteration 22 -- +bool(true) + +-- Iteration 23 -- +bool(true) + +-- Iteration 24 -- +bool(true) + +-- Iteration 25 -- +bool(false) + +-- Iteration 26 -- +bool(false) + +-- Iteration 27 -- +bool(false) + +-- Iteration 28 -- +bool(false) + +-- Iteration 29 -- +bool(false) + +-- Iteration 30 -- +bool(false) + +-- Iteration 31 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_digit_variation4.phpt b/ext/ctype/tests/ctype_digit_variation4.phpt new file mode 100644 index 0000000000..852bba32e8 --- /dev/null +++ b/ext/ctype/tests/ctype_digit_variation4.phpt @@ -0,0 +1,62 @@ +--TEST-- +Test ctype_digit() function : usage variations - octal and hexadecimal values +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_digit() : usage variations *** + +-- Octal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) + +-- Hexadecimal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +===DONE=== diff --git a/ext/ctype/tests/ctype_graph_basic.phpt b/ext/ctype/tests/ctype_graph_basic.phpt new file mode 100644 index 0000000000..bf789fbead --- /dev/null +++ b/ext/ctype/tests/ctype_graph_basic.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test ctype_graph() function : basic functionality +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_graph() : basic functionality *** +bool(true) +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_graph_error.phpt b/ext/ctype/tests/ctype_graph_error.phpt new file mode 100644 index 0000000000..7cd94fc26b --- /dev/null +++ b/ext/ctype/tests/ctype_graph_error.phpt @@ -0,0 +1,39 @@ +--TEST-- +Test ctype_graph() function : error conditions - incorrect number of arguments +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_graph() : error conditions *** + +-- Testing ctype_graph() function with Zero arguments -- + +Warning: ctype_graph() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +-- Testing ctype_graph() function with more than expected no. of arguments -- + +Warning: ctype_graph() expects exactly 1 parameter, 2 given in %s on line %d +NULL +===DONE=== diff --git a/ext/ctype/tests/ctype_graph_variation1.phpt b/ext/ctype/tests/ctype_graph_variation1.phpt new file mode 100644 index 0000000000..ee6e95bd30 --- /dev/null +++ b/ext/ctype/tests/ctype_graph_variation1.phpt @@ -0,0 +1,177 @@ +--TEST-- +Test ctype_graph() function : usage variations - different data types as $c arg +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_graph() : usage variations *** + +-- Iteration 1 -- +bool(false) + +-- Iteration 2 -- +bool(false) + +-- Iteration 3 -- +bool(true) + +-- Iteration 4 -- +bool(true) + +-- Iteration 5 -- +bool(false) + +-- Iteration 6 -- +bool(false) + +-- Iteration 7 -- +bool(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(false) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(true) + +-- Iteration 20 -- +bool(true) + +-- Iteration 21 -- +bool(true) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_graph_variation2.phpt b/ext/ctype/tests/ctype_graph_variation2.phpt new file mode 100644 index 0000000000..6ab56c75e4 --- /dev/null +++ b/ext/ctype/tests/ctype_graph_variation2.phpt @@ -0,0 +1,124 @@ +--TEST-- +Test ctype_graph() function : usage variations - different integers +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_graph() : usage variations *** +character code 33 is a printable character +character code 34 is a printable character +character code 35 is a printable character +character code 36 is a printable character +character code 37 is a printable character +character code 38 is a printable character +character code 39 is a printable character +character code 40 is a printable character +character code 41 is a printable character +character code 42 is a printable character +character code 43 is a printable character +character code 44 is a printable character +character code 45 is a printable character +character code 46 is a printable character +character code 47 is a printable character +character code 48 is a printable character +character code 49 is a printable character +character code 50 is a printable character +character code 51 is a printable character +character code 52 is a printable character +character code 53 is a printable character +character code 54 is a printable character +character code 55 is a printable character +character code 56 is a printable character +character code 57 is a printable character +character code 58 is a printable character +character code 59 is a printable character +character code 60 is a printable character +character code 61 is a printable character +character code 62 is a printable character +character code 63 is a printable character +character code 64 is a printable character +character code 65 is a printable character +character code 66 is a printable character +character code 67 is a printable character +character code 68 is a printable character +character code 69 is a printable character +character code 70 is a printable character +character code 71 is a printable character +character code 72 is a printable character +character code 73 is a printable character +character code 74 is a printable character +character code 75 is a printable character +character code 76 is a printable character +character code 77 is a printable character +character code 78 is a printable character +character code 79 is a printable character +character code 80 is a printable character +character code 81 is a printable character +character code 82 is a printable character +character code 83 is a printable character +character code 84 is a printable character +character code 85 is a printable character +character code 86 is a printable character +character code 87 is a printable character +character code 88 is a printable character +character code 89 is a printable character +character code 90 is a printable character +character code 91 is a printable character +character code 92 is a printable character +character code 93 is a printable character +character code 94 is a printable character +character code 95 is a printable character +character code 96 is a printable character +character code 97 is a printable character +character code 98 is a printable character +character code 99 is a printable character +character code 100 is a printable character +character code 101 is a printable character +character code 102 is a printable character +character code 103 is a printable character +character code 104 is a printable character +character code 105 is a printable character +character code 106 is a printable character +character code 107 is a printable character +character code 108 is a printable character +character code 109 is a printable character +character code 110 is a printable character +character code 111 is a printable character +character code 112 is a printable character +character code 113 is a printable character +character code 114 is a printable character +character code 115 is a printable character +character code 116 is a printable character +character code 117 is a printable character +character code 118 is a printable character +character code 119 is a printable character +character code 120 is a printable character +character code 121 is a printable character +character code 122 is a printable character +character code 123 is a printable character +character code 124 is a printable character +character code 125 is a printable character +character code 126 is a printable character +===DONE=== diff --git a/ext/ctype/tests/ctype_graph_variation3.phpt b/ext/ctype/tests/ctype_graph_variation3.phpt new file mode 100644 index 0000000000..7843a058f5 --- /dev/null +++ b/ext/ctype/tests/ctype_graph_variation3.phpt @@ -0,0 +1,146 @@ +--TEST-- +Test ctype_graph() function : usage variations - different strings +--FILE-- +.?/", +/*25*/ "\"ABC\"", + "String\twith\ttabs", + "Sample string with newline\n", +/*28*/ "123 ABC XYZ", +); + +$iterator = 1; +foreach($values as $value) { + echo "\n-- Iteration $iterator --\n"; + var_dump( ctype_graph($value) ); + $iterator++; +}; + +setlocale(LC_CTYPE, $orig); +?> +===DONE=== +--EXPECTF-- +*** Testing ctype_graph() : usage variations *** + +-- Iteration 1 -- +bool(false) + +-- Iteration 2 -- +bool(false) + +-- Iteration 3 -- +bool(false) + +-- Iteration 4 -- +bool(false) + +-- Iteration 5 -- +bool(true) + +-- Iteration 6 -- +bool(true) + +-- Iteration 7 -- +bool(true) + +-- Iteration 8 -- +bool(true) + +-- Iteration 9 -- +bool(true) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(true) + +-- Iteration 12 -- +bool(true) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(true) + +-- Iteration 15 -- +bool(true) + +-- Iteration 16 -- +bool(true) + +-- Iteration 17 -- +bool(true) + +-- Iteration 18 -- +bool(true) + +-- Iteration 19 -- +bool(false) + +-- Iteration 20 -- +bool(false) + +-- Iteration 21 -- +bool(false) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(true) + +-- Iteration 25 -- +bool(true) + +-- Iteration 26 -- +bool(false) + +-- Iteration 27 -- +bool(false) + +-- Iteration 28 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_graph_variation4.phpt b/ext/ctype/tests/ctype_graph_variation4.phpt new file mode 100644 index 0000000000..0a504324c7 --- /dev/null +++ b/ext/ctype/tests/ctype_graph_variation4.phpt @@ -0,0 +1,62 @@ +--TEST-- +Test ctype_graph() function : usage variations - octal and hexadecimal values +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_graph() : usage variations *** + +-- Octal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) + +-- Hexadecimal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +===DONE=== diff --git a/ext/ctype/tests/ctype_lower_basic.phpt b/ext/ctype/tests/ctype_lower_basic.phpt new file mode 100644 index 0000000000..f9c8540481 --- /dev/null +++ b/ext/ctype/tests/ctype_lower_basic.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test ctype_lower() function : basic functionality +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_lower() : basic functionality *** +bool(true) +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_lower_error.phpt b/ext/ctype/tests/ctype_lower_error.phpt new file mode 100644 index 0000000000..141d02c6e2 --- /dev/null +++ b/ext/ctype/tests/ctype_lower_error.phpt @@ -0,0 +1,39 @@ +--TEST-- +Test ctype_lower() function : error conditions - incorrect number of args +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_lower() : error conditions *** + +-- Testing ctype_lower() function with Zero arguments -- + +Warning: ctype_lower() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +-- Testing ctype_lower() function with more than expected no. of arguments -- + +Warning: ctype_lower() expects exactly 1 parameter, 2 given in %s on line %d +NULL +===DONE=== diff --git a/ext/ctype/tests/ctype_lower_variation1.phpt b/ext/ctype/tests/ctype_lower_variation1.phpt new file mode 100644 index 0000000000..60288c3d99 --- /dev/null +++ b/ext/ctype/tests/ctype_lower_variation1.phpt @@ -0,0 +1,177 @@ +--TEST-- +Test ctype_lower() function : usage variations - different data types as $c arg +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_lower() : 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(false) + +-- Iteration 7 -- +bool(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(false) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(true) + +-- Iteration 20 -- +bool(true) + +-- Iteration 21 -- +bool(true) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_lower_variation2.phpt b/ext/ctype/tests/ctype_lower_variation2.phpt new file mode 100644 index 0000000000..99a3ad775e --- /dev/null +++ b/ext/ctype/tests/ctype_lower_variation2.phpt @@ -0,0 +1,56 @@ +--TEST-- +Test ctype_lower() function : usage variations - different integers +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_lower() : usage variations *** +character code 97 is a lower case character +character code 98 is a lower case character +character code 99 is a lower case character +character code 100 is a lower case character +character code 101 is a lower case character +character code 102 is a lower case character +character code 103 is a lower case character +character code 104 is a lower case character +character code 105 is a lower case character +character code 106 is a lower case character +character code 107 is a lower case character +character code 108 is a lower case character +character code 109 is a lower case character +character code 110 is a lower case character +character code 111 is a lower case character +character code 112 is a lower case character +character code 113 is a lower case character +character code 114 is a lower case character +character code 115 is a lower case character +character code 116 is a lower case character +character code 117 is a lower case character +character code 118 is a lower case character +character code 119 is a lower case character +character code 120 is a lower case character +character code 121 is a lower case character +character code 122 is a lower case character +===DONE=== diff --git a/ext/ctype/tests/ctype_lower_variation3.phpt b/ext/ctype/tests/ctype_lower_variation3.phpt new file mode 100644 index 0000000000..73d6fcd60d --- /dev/null +++ b/ext/ctype/tests/ctype_lower_variation3.phpt @@ -0,0 +1,138 @@ +--TEST-- +Test ctype_lower() function : usage variations - different strings +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_lower() : usage variations *** + +-- Iteration 1 -- +bool(false) + +-- Iteration 2 -- +bool(false) + +-- Iteration 3 -- +bool(false) + +-- Iteration 4 -- +bool(false) + +-- Iteration 5 -- +bool(true) + +-- Iteration 6 -- +bool(false) + +-- Iteration 7 -- +bool(true) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(false) + +-- Iteration 16 -- +bool(true) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(false) + +-- Iteration 20 -- +bool(false) + +-- Iteration 21 -- +bool(false) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- +bool(false) + +-- Iteration 26 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_lower_variation4.phpt b/ext/ctype/tests/ctype_lower_variation4.phpt new file mode 100644 index 0000000000..30a68a3af2 --- /dev/null +++ b/ext/ctype/tests/ctype_lower_variation4.phpt @@ -0,0 +1,62 @@ +--TEST-- +Test ctype_lower() function : usage variations - octal and hexadecimal values +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_lower() : usage variations *** + +-- Octal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) + +-- Hexadecimal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +===DONE=== diff --git a/ext/ctype/tests/ctype_print_basic.phpt b/ext/ctype/tests/ctype_print_basic.phpt new file mode 100644 index 0000000000..5d01f5abd6 --- /dev/null +++ b/ext/ctype/tests/ctype_print_basic.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test ctype_print() function : basic functionality +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_print() : basic functionality *** +bool(true) +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_print_error.phpt b/ext/ctype/tests/ctype_print_error.phpt new file mode 100644 index 0000000000..243d2f8022 --- /dev/null +++ b/ext/ctype/tests/ctype_print_error.phpt @@ -0,0 +1,39 @@ +--TEST-- +Test ctype_print() function : error conditions - incorrect number of args +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_print() : error conditions *** + +-- Testing ctype_print() function with Zero arguments -- + +Warning: ctype_print() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +-- Testing ctype_print() function with more than expected no. of arguments -- + +Warning: ctype_print() expects exactly 1 parameter, 2 given in %s on line %d +NULL +===DONE=== diff --git a/ext/ctype/tests/ctype_print_variation1.phpt b/ext/ctype/tests/ctype_print_variation1.phpt new file mode 100644 index 0000000000..c121dd723e --- /dev/null +++ b/ext/ctype/tests/ctype_print_variation1.phpt @@ -0,0 +1,177 @@ +--TEST-- +Test ctype_print() function : usage variations - different data types as $c arg +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_print() : usage variations *** + +-- Iteration 1 -- +bool(false) + +-- Iteration 2 -- +bool(false) + +-- Iteration 3 -- +bool(true) + +-- Iteration 4 -- +bool(true) + +-- Iteration 5 -- +bool(false) + +-- Iteration 6 -- +bool(false) + +-- Iteration 7 -- +bool(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(false) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(true) + +-- Iteration 20 -- +bool(true) + +-- Iteration 21 -- +bool(true) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_print_variation2.phpt b/ext/ctype/tests/ctype_print_variation2.phpt new file mode 100644 index 0000000000..ac492b8825 --- /dev/null +++ b/ext/ctype/tests/ctype_print_variation2.phpt @@ -0,0 +1,125 @@ +--TEST-- +Test ctype_print() function : usage variations - different integers +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_print() : usage variations *** +character code 32 is a printable character +character code 33 is a printable character +character code 34 is a printable character +character code 35 is a printable character +character code 36 is a printable character +character code 37 is a printable character +character code 38 is a printable character +character code 39 is a printable character +character code 40 is a printable character +character code 41 is a printable character +character code 42 is a printable character +character code 43 is a printable character +character code 44 is a printable character +character code 45 is a printable character +character code 46 is a printable character +character code 47 is a printable character +character code 48 is a printable character +character code 49 is a printable character +character code 50 is a printable character +character code 51 is a printable character +character code 52 is a printable character +character code 53 is a printable character +character code 54 is a printable character +character code 55 is a printable character +character code 56 is a printable character +character code 57 is a printable character +character code 58 is a printable character +character code 59 is a printable character +character code 60 is a printable character +character code 61 is a printable character +character code 62 is a printable character +character code 63 is a printable character +character code 64 is a printable character +character code 65 is a printable character +character code 66 is a printable character +character code 67 is a printable character +character code 68 is a printable character +character code 69 is a printable character +character code 70 is a printable character +character code 71 is a printable character +character code 72 is a printable character +character code 73 is a printable character +character code 74 is a printable character +character code 75 is a printable character +character code 76 is a printable character +character code 77 is a printable character +character code 78 is a printable character +character code 79 is a printable character +character code 80 is a printable character +character code 81 is a printable character +character code 82 is a printable character +character code 83 is a printable character +character code 84 is a printable character +character code 85 is a printable character +character code 86 is a printable character +character code 87 is a printable character +character code 88 is a printable character +character code 89 is a printable character +character code 90 is a printable character +character code 91 is a printable character +character code 92 is a printable character +character code 93 is a printable character +character code 94 is a printable character +character code 95 is a printable character +character code 96 is a printable character +character code 97 is a printable character +character code 98 is a printable character +character code 99 is a printable character +character code 100 is a printable character +character code 101 is a printable character +character code 102 is a printable character +character code 103 is a printable character +character code 104 is a printable character +character code 105 is a printable character +character code 106 is a printable character +character code 107 is a printable character +character code 108 is a printable character +character code 109 is a printable character +character code 110 is a printable character +character code 111 is a printable character +character code 112 is a printable character +character code 113 is a printable character +character code 114 is a printable character +character code 115 is a printable character +character code 116 is a printable character +character code 117 is a printable character +character code 118 is a printable character +character code 119 is a printable character +character code 120 is a printable character +character code 121 is a printable character +character code 122 is a printable character +character code 123 is a printable character +character code 124 is a printable character +character code 125 is a printable character +character code 126 is a printable character +===DONE=== diff --git a/ext/ctype/tests/ctype_print_variation3.phpt b/ext/ctype/tests/ctype_print_variation3.phpt new file mode 100644 index 0000000000..0231a3db2a --- /dev/null +++ b/ext/ctype/tests/ctype_print_variation3.phpt @@ -0,0 +1,126 @@ +--TEST-- +Test ctype_print() function : usage variations - different strings +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_print() : usage variations *** + +-- Iteration 1 -- +bool(true) + +-- Iteration 2 -- +bool(true) + +-- Iteration 3 -- +bool(false) + +-- Iteration 4 -- +bool(true) + +-- Iteration 5 -- +bool(true) + +-- Iteration 6 -- +bool(true) + +-- Iteration 7 -- +bool(true) + +-- Iteration 8 -- +bool(true) + +-- Iteration 9 -- +bool(true) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(true) + +-- Iteration 12 -- +bool(true) + +-- Iteration 13 -- +bool(true) + +-- Iteration 14 -- +bool(true) + +-- Iteration 15 -- +bool(true) + +-- Iteration 16 -- +bool(true) + +-- Iteration 17 -- +bool(true) + +-- Iteration 18 -- +bool(true) + +-- Iteration 19 -- +bool(false) + +-- Iteration 20 -- +bool(true) + +-- Iteration 21 -- +bool(false) + +-- Iteration 22 -- +bool(true) + +-- Iteration 23 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_print_variation4.phpt b/ext/ctype/tests/ctype_print_variation4.phpt new file mode 100644 index 0000000000..b8e643582b --- /dev/null +++ b/ext/ctype/tests/ctype_print_variation4.phpt @@ -0,0 +1,61 @@ +--TEST-- +Test ctype_print() function : usage variations - octal and hexadecimal values +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_print() : usage variations *** + +-- Octal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) + +-- Hexadecimal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +===DONE=== diff --git a/ext/ctype/tests/ctype_punct_basic.phpt b/ext/ctype/tests/ctype_punct_basic.phpt new file mode 100644 index 0000000000..d1f6f4601a --- /dev/null +++ b/ext/ctype/tests/ctype_punct_basic.phpt @@ -0,0 +1,28 @@ +--TEST-- +Test ctype_punct() function : basic functionality +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_punct() : basic functionality *** +bool(true) +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_punct_error.phpt b/ext/ctype/tests/ctype_punct_error.phpt new file mode 100644 index 0000000000..ec4aff71df --- /dev/null +++ b/ext/ctype/tests/ctype_punct_error.phpt @@ -0,0 +1,44 @@ +--TEST-- +Test ctype_punct() function : error conditions - incorrect number of args +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_punct() : error conditions *** + +-- Testing ctype_punct() function with Zero arguments -- + +Warning: ctype_punct() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +-- Testing ctype_punct() function with more than expected no. of arguments -- + +Warning: ctype_punct() expects exactly 1 parameter, 2 given in %s on line %d +NULL +===DONE=== diff --git a/ext/ctype/tests/ctype_punct_variation1.phpt b/ext/ctype/tests/ctype_punct_variation1.phpt new file mode 100644 index 0000000000..2bdfd709c0 --- /dev/null +++ b/ext/ctype/tests/ctype_punct_variation1.phpt @@ -0,0 +1,178 @@ +--TEST-- +Test ctype_punct() function : usage variations - different data types as $c argument +--FILE-- +"; + } +} + +// heredoc string +$heredoc = << +===DONE=== +--EXPECTF-- +*** Testing ctype_punct() : 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(false) + +-- Iteration 7 -- +bool(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(false) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(true) + +-- Iteration 20 -- +bool(true) + +-- Iteration 21 -- +bool(true) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_punct_variation2.phpt b/ext/ctype/tests/ctype_punct_variation2.phpt new file mode 100644 index 0000000000..cc04753e64 --- /dev/null +++ b/ext/ctype/tests/ctype_punct_variation2.phpt @@ -0,0 +1,63 @@ +--TEST-- +Test ctype_punct() function : usage variations - different integers +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_punct() : usage variations *** +character code 33 is punctuation +character code 34 is punctuation +character code 35 is punctuation +character code 36 is punctuation +character code 37 is punctuation +character code 38 is punctuation +character code 39 is punctuation +character code 40 is punctuation +character code 41 is punctuation +character code 42 is punctuation +character code 43 is punctuation +character code 44 is punctuation +character code 45 is punctuation +character code 46 is punctuation +character code 47 is punctuation +character code 58 is punctuation +character code 59 is punctuation +character code 60 is punctuation +character code 61 is punctuation +character code 62 is punctuation +character code 63 is punctuation +character code 64 is punctuation +character code 91 is punctuation +character code 92 is punctuation +character code 93 is punctuation +character code 94 is punctuation +character code 95 is punctuation +character code 96 is punctuation +character code 123 is punctuation +character code 124 is punctuation +character code 125 is punctuation +character code 126 is punctuation +===DONE=== diff --git a/ext/ctype/tests/ctype_punct_variation3.phpt b/ext/ctype/tests/ctype_punct_variation3.phpt new file mode 100644 index 0000000000..5282a291b7 --- /dev/null +++ b/ext/ctype/tests/ctype_punct_variation3.phpt @@ -0,0 +1,138 @@ +--TEST-- +Test ctype_punct() function : usage variations - different punctuation +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_punct() : 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(false) + +-- Iteration 7 -- +bool(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(true) + +-- Iteration 15 -- +bool(false) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(false) + +-- Iteration 20 -- +bool(false) + +-- Iteration 21 -- +bool(false) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- +bool(true) + +-- Iteration 26 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_punct_variation4.phpt b/ext/ctype/tests/ctype_punct_variation4.phpt new file mode 100644 index 0000000000..40ef656cb1 --- /dev/null +++ b/ext/ctype/tests/ctype_punct_variation4.phpt @@ -0,0 +1,63 @@ +--TEST-- +Test ctype_punct() function : usage variations - Octal and Hexadecimal values +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_punct() : usage variations *** + +-- Octal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) + +-- Hexadecimal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +===DONE=== diff --git a/ext/ctype/tests/ctype_space_basic.phpt b/ext/ctype/tests/ctype_space_basic.phpt new file mode 100644 index 0000000000..8f2cbe91b4 --- /dev/null +++ b/ext/ctype/tests/ctype_space_basic.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test ctype_space() function : basic functionality +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_space() : basic functionality *** +bool(true) +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_space_error.phpt b/ext/ctype/tests/ctype_space_error.phpt new file mode 100644 index 0000000000..e4cd4f4f46 --- /dev/null +++ b/ext/ctype/tests/ctype_space_error.phpt @@ -0,0 +1,43 @@ +--TEST-- +Test ctype_space() function : error conditions - Incorrect number of args +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_space() : error conditions *** + +-- Testing ctype_space() function with Zero arguments -- + +Warning: ctype_space() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +-- Testing ctype_space() function with more than expected no. of arguments -- + +Warning: ctype_space() expects exactly 1 parameter, 2 given in %s on line %d +NULL +===DONE=== diff --git a/ext/ctype/tests/ctype_space_variation1.phpt b/ext/ctype/tests/ctype_space_variation1.phpt new file mode 100644 index 0000000000..be1cb2406b --- /dev/null +++ b/ext/ctype/tests/ctype_space_variation1.phpt @@ -0,0 +1,177 @@ +--TEST-- +Test ctype_space() function : usage variations - different data types as $c argument +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_space() : 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(false) + +-- Iteration 7 -- +bool(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(false) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(true) + +-- Iteration 20 -- +bool(true) + +-- Iteration 21 -- +bool(true) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_space_variation2.phpt b/ext/ctype/tests/ctype_space_variation2.phpt new file mode 100644 index 0000000000..8eadc23594 --- /dev/null +++ b/ext/ctype/tests/ctype_space_variation2.phpt @@ -0,0 +1,35 @@ +--TEST-- +Test ctype_space() function : usage variations - different integers +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_space() : usage variations *** +character code 9 is a space character +character code 10 is a space character +character code 11 is a space character +character code 12 is a space character +character code 13 is a space character +character code 32 is a space character +===DONE=== diff --git a/ext/ctype/tests/ctype_space_variation3.phpt b/ext/ctype/tests/ctype_space_variation3.phpt new file mode 100644 index 0000000000..21aa866c9c --- /dev/null +++ b/ext/ctype/tests/ctype_space_variation3.phpt @@ -0,0 +1,138 @@ +--TEST-- +Test ctype_space() function : usage variations - different strings +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_space() : usage variations *** + +-- Iteration 1 -- +bool(false) + +-- Iteration 2 -- +bool(false) + +-- Iteration 3 -- +bool(false) + +-- Iteration 4 -- +bool(true) + +-- Iteration 5 -- +bool(false) + +-- Iteration 6 -- +bool(false) + +-- Iteration 7 -- +bool(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(true) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(false) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(false) + +-- Iteration 20 -- +bool(false) + +-- Iteration 21 -- +bool(false) + +-- Iteration 22 -- +bool(true) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- +bool(true) + +-- Iteration 26 -- +bool(true) +===DONE=== diff --git a/ext/ctype/tests/ctype_space_variation4.phpt b/ext/ctype/tests/ctype_space_variation4.phpt new file mode 100644 index 0000000000..3eed45a456 --- /dev/null +++ b/ext/ctype/tests/ctype_space_variation4.phpt @@ -0,0 +1,69 @@ +--TEST-- +Test ctype_space() function : usage variations - octal and hexadecimal values +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_space() : usage variations *** + +-- Octal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +-- Iteration 5 -- +bool(true) +-- Iteration 6 -- +bool(true) + +-- Hexadecimal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +-- Iteration 5 -- +bool(true) +-- Iteration 6 -- +bool(true) +===DONE=== diff --git a/ext/ctype/tests/ctype_upper_basic.phpt b/ext/ctype/tests/ctype_upper_basic.phpt new file mode 100644 index 0000000000..55f91151a8 --- /dev/null +++ b/ext/ctype/tests/ctype_upper_basic.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test ctype_upper() function : basic functionality +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_upper() : basic functionality *** +bool(true) +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_upper_error.phpt b/ext/ctype/tests/ctype_upper_error.phpt new file mode 100644 index 0000000000..185e63d9ed --- /dev/null +++ b/ext/ctype/tests/ctype_upper_error.phpt @@ -0,0 +1,39 @@ +--TEST-- +Test ctype_upper() function : error conditions - incorrect number of args +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_upper() : error conditions *** + +-- Testing ctype_upper() function with Zero arguments -- + +Warning: ctype_upper() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +-- Testing ctype_upper() function with more than expected no. of arguments -- + +Warning: ctype_upper() expects exactly 1 parameter, 2 given in %s on line %d +NULL +===DONE=== diff --git a/ext/ctype/tests/ctype_upper_variation1.phpt b/ext/ctype/tests/ctype_upper_variation1.phpt new file mode 100644 index 0000000000..f7dd079217 --- /dev/null +++ b/ext/ctype/tests/ctype_upper_variation1.phpt @@ -0,0 +1,177 @@ +--TEST-- +Test ctype_upper() function : usage variations - different data types +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_upper() : 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(false) + +-- Iteration 7 -- +bool(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(false) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(true) + +-- Iteration 20 -- +bool(true) + +-- Iteration 21 -- +bool(true) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_upper_variation2.phpt b/ext/ctype/tests/ctype_upper_variation2.phpt new file mode 100644 index 0000000000..03ec85806a --- /dev/null +++ b/ext/ctype/tests/ctype_upper_variation2.phpt @@ -0,0 +1,55 @@ +--TEST-- +Test ctype_upper() function : usage variations - different integers +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_upper() : usage variations *** +character code 65 is a uppercase character +character code 66 is a uppercase character +character code 67 is a uppercase character +character code 68 is a uppercase character +character code 69 is a uppercase character +character code 70 is a uppercase character +character code 71 is a uppercase character +character code 72 is a uppercase character +character code 73 is a uppercase character +character code 74 is a uppercase character +character code 75 is a uppercase character +character code 76 is a uppercase character +character code 77 is a uppercase character +character code 78 is a uppercase character +character code 79 is a uppercase character +character code 80 is a uppercase character +character code 81 is a uppercase character +character code 82 is a uppercase character +character code 83 is a uppercase character +character code 84 is a uppercase character +character code 85 is a uppercase character +character code 86 is a uppercase character +character code 87 is a uppercase character +character code 88 is a uppercase character +character code 89 is a uppercase character +character code 90 is a uppercase character +===DONE=== diff --git a/ext/ctype/tests/ctype_upper_variation3.phpt b/ext/ctype/tests/ctype_upper_variation3.phpt new file mode 100644 index 0000000000..db57ed5f9b --- /dev/null +++ b/ext/ctype/tests/ctype_upper_variation3.phpt @@ -0,0 +1,137 @@ +--TEST-- +Test ctype_upper() function : usage variations - different strings +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_upper() : 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(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(true) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(false) + +-- Iteration 20 -- +bool(false) + +-- Iteration 21 -- +bool(false) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- +bool(false) + +-- Iteration 26 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_upper_variation4.phpt b/ext/ctype/tests/ctype_upper_variation4.phpt new file mode 100644 index 0000000000..723c4d0a81 --- /dev/null +++ b/ext/ctype/tests/ctype_upper_variation4.phpt @@ -0,0 +1,61 @@ +--TEST-- +Test ctype_upper() function : usage variations - octal and hexadecimal values +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_upper() : usage variations *** + +-- Octal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) + +-- Hexadecimal Values -- +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(true) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(true) +===DONE=== diff --git a/ext/ctype/tests/ctype_xdigit_basic.phpt b/ext/ctype/tests/ctype_xdigit_basic.phpt new file mode 100644 index 0000000000..58cc5b2e0a --- /dev/null +++ b/ext/ctype/tests/ctype_xdigit_basic.phpt @@ -0,0 +1,26 @@ +--TEST-- +Test ctype_xdigit() function : basic functionality +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_xdigit() : basic functionality *** +bool(true) +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_xdigit_error.phpt b/ext/ctype/tests/ctype_xdigit_error.phpt new file mode 100644 index 0000000000..06ee733415 --- /dev/null +++ b/ext/ctype/tests/ctype_xdigit_error.phpt @@ -0,0 +1,39 @@ +--TEST-- +Test ctype_xdigit() function : error conditions - Incorrect number of args +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_xdigit() : error conditions *** + +-- Testing ctype_xdigit() function with Zero arguments -- + +Warning: ctype_xdigit() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +-- Testing ctype_xdigit() function with more than expected no. of arguments -- + +Warning: ctype_xdigit() expects exactly 1 parameter, 2 given in %s on line %d +NULL +===DONE=== diff --git a/ext/ctype/tests/ctype_xdigit_variation1.phpt b/ext/ctype/tests/ctype_xdigit_variation1.phpt new file mode 100644 index 0000000000..adde77bbd7 --- /dev/null +++ b/ext/ctype/tests/ctype_xdigit_variation1.phpt @@ -0,0 +1,177 @@ +--TEST-- +Test ctype_xdigit() function : usage variations - different data typse as $c arg +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_xdigit() : usage variations *** + +-- Iteration 1 -- +bool(false) + +-- Iteration 2 -- +bool(false) + +-- Iteration 3 -- +bool(true) + +-- Iteration 4 -- +bool(false) + +-- Iteration 5 -- +bool(false) + +-- Iteration 6 -- +bool(false) + +-- Iteration 7 -- +bool(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- +bool(false) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(false) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- +bool(true) + +-- Iteration 20 -- +bool(true) + +-- Iteration 21 -- +bool(true) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_xdigit_variation2.phpt b/ext/ctype/tests/ctype_xdigit_variation2.phpt new file mode 100644 index 0000000000..92f9aba0c0 --- /dev/null +++ b/ext/ctype/tests/ctype_xdigit_variation2.phpt @@ -0,0 +1,52 @@ +--TEST-- +Test ctype_xdigit() function : usage variations - different integers +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_xdigit() : usage variations *** +character code 48 is a hexadecimal 'digit' +character code 49 is a hexadecimal 'digit' +character code 50 is a hexadecimal 'digit' +character code 51 is a hexadecimal 'digit' +character code 52 is a hexadecimal 'digit' +character code 53 is a hexadecimal 'digit' +character code 54 is a hexadecimal 'digit' +character code 55 is a hexadecimal 'digit' +character code 56 is a hexadecimal 'digit' +character code 57 is a hexadecimal 'digit' +character code 65 is a hexadecimal 'digit' +character code 66 is a hexadecimal 'digit' +character code 67 is a hexadecimal 'digit' +character code 68 is a hexadecimal 'digit' +character code 69 is a hexadecimal 'digit' +character code 70 is a hexadecimal 'digit' +character code 97 is a hexadecimal 'digit' +character code 98 is a hexadecimal 'digit' +character code 99 is a hexadecimal 'digit' +character code 100 is a hexadecimal 'digit' +character code 101 is a hexadecimal 'digit' +character code 102 is a hexadecimal 'digit' +===DONE=== diff --git a/ext/ctype/tests/ctype_xdigit_variation3.phpt b/ext/ctype/tests/ctype_xdigit_variation3.phpt new file mode 100644 index 0000000000..35e8407fcc --- /dev/null +++ b/ext/ctype/tests/ctype_xdigit_variation3.phpt @@ -0,0 +1,138 @@ +--TEST-- +Test ctype_xdigit() function : usage variations - Different strings +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_xdigit() : usage variations *** + +-- Iteration 1 -- +bool(false) + +-- Iteration 2 -- +bool(false) + +-- Iteration 3 -- +bool(false) + +-- Iteration 4 -- +bool(false) + +-- Iteration 5 -- +bool(true) + +-- Iteration 6 -- +bool(false) + +-- Iteration 7 -- +bool(false) + +-- Iteration 8 -- +bool(false) + +-- Iteration 9 -- +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(true) + +-- Iteration 12 -- +bool(true) + +-- Iteration 13 -- +bool(false) + +-- Iteration 14 -- +bool(false) + +-- Iteration 15 -- +bool(true) + +-- Iteration 16 -- +bool(true) + +-- Iteration 17 -- +bool(true) + +-- Iteration 18 -- +bool(true) + +-- Iteration 19 -- +bool(false) + +-- Iteration 20 -- +bool(false) + +-- Iteration 21 -- +bool(false) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(true) + +-- Iteration 25 -- +bool(false) + +-- Iteration 26 -- +bool(false) +===DONE=== diff --git a/ext/ctype/tests/ctype_xdigit_variation4.phpt b/ext/ctype/tests/ctype_xdigit_variation4.phpt new file mode 100644 index 0000000000..68e03cb889 --- /dev/null +++ b/ext/ctype/tests/ctype_xdigit_variation4.phpt @@ -0,0 +1,81 @@ +--TEST-- +Test ctype_xdigit() function : usage variations - heaxadecimal and octal values +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing ctype_xdigit() : usage variations *** + +-- Octal values -- +'Incorrect' Integers: +bool(false) +bool(false) +bool(false) +bool(false) +'Correct' Integers: +bool(true) +bool(true) +bool(true) +bool(true) + +-- Hexadecimal values -- +'Incorrect' Integers: +bool(false) +bool(false) +bool(false) +bool(false) +'Correct' Integers: +bool(true) +bool(true) +bool(true) +bool(true) +===DONE===