cvs: php-src /ext/standard/tests/strings ltrim.phpt rtrim.phpt str_pad.phpt strcasecmp.phpt strcmp.phpt strlen.phpt substr_compare.phpt ucfirst1.phpt
| From: | Antony Dovgal | Date: | Fri, 20 Apr 2007 21:37:31 +0000 |
| Subject: | cvs: php-src /ext/standard/tests/strings ltrim.phpt rtrim.phpt str_pad.phpt strcasecmp.phpt strcmp.phpt strlen.phpt substr_compare.phpt ucfirst1.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-44016@lists.php.net to get a copy of this message | ||
tony2001 Fri Apr 20 21:37:31 2007 UTC
Modified files:
/php-src/ext/standard/tests/strings ltrim.phpt rtrim.phpt
str_pad.phpt strcasecmp.phpt
strcmp.phpt strlen.phpt
substr_compare.phpt
ucfirst1.phpt
Log:
fix tests
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/ltrim.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/strings/ltrim.phpt
diff -u php-src/ext/standard/tests/strings/ltrim.phpt:1.2
php-src/ext/standard/tests/strings/ltrim.phpt:1.3
--- php-src/ext/standard/tests/strings/ltrim.phpt:1.2 Tue Apr 17 11:55:39 2007
+++ php-src/ext/standard/tests/strings/ltrim.phpt Fri Apr 20 21:37:31 2007
@@ -71,3 +71,31 @@
string(0) ""
Done
+--UEXPECTF--
+Warning: ltrim() expects at least 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: ltrim() expects at most 2 parameters, 3 given in %s on line %d
+NULL
+
+*** Testing with heredoc string ***
+unicode(17) "ng heredoc string"
+
+*** Testing Normal Behaviour ***
+unicode(10) "ltrim test"
+unicode(13) " ltrim test"
+unicode(18) " ltrim test"
+unicode(18) " ltrim test"
+unicode(10) "ltrim test"
+unicode(11) " ltrim test"
+unicode(10) "ltrim test"
+unicode(10) "ltrim test"
+unicode(10) "ltrim test"
+
+*** Testing for scalar argument ***
+unicode(5) "12345"
+
+*** Testing for NULL argument ***
+unicode(0) ""
+
+Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/rtrim.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/strings/rtrim.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/str_pad.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/strings/str_pad.phpt
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strcasecmp.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/standard/tests/strings/strcasecmp.phpt
diff -u php-src/ext/standard/tests/strings/strcasecmp.phpt:1.3
php-src/ext/standard/tests/strings/strcasecmp.phpt:1.4
--- php-src/ext/standard/tests/strings/strcasecmp.phpt:1.3 Fri Mar 16 23:18:01 2007
+++ php-src/ext/standard/tests/strings/strcasecmp.phpt Fri Apr 20 21:37:31 2007
@@ -1,5 +1,5 @@
--TEST--
-"strcasecmp()" function // Compares two strings in case-insensitive manner
+strcasecmp() tests
--INI--
precision = 12
--FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strcmp.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/standard/tests/strings/strcmp.phpt
diff -u php-src/ext/standard/tests/strings/strcmp.phpt:1.3
php-src/ext/standard/tests/strings/strcmp.phpt:1.4
--- php-src/ext/standard/tests/strings/strcmp.phpt:1.3 Fri Mar 16 23:18:01 2007
+++ php-src/ext/standard/tests/strings/strcmp.phpt Fri Apr 20 21:37:31 2007
@@ -1,5 +1,5 @@
--TEST--
-"strcmp()" function // Compares two strings in case-sensitive manner
+strcmp() tests
--INI--
precision = 12
--FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strlen.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/strings/strlen.phpt
diff -u php-src/ext/standard/tests/strings/strlen.phpt:1.1
php-src/ext/standard/tests/strings/strlen.phpt:1.2
--- php-src/ext/standard/tests/strings/strlen.phpt:1.1 Fri Mar 16 12:55:38 2007
+++ php-src/ext/standard/tests/strings/strlen.phpt Fri Apr 20 21:37:31 2007
@@ -1,5 +1,5 @@
--TEST--
-strlen() function // returns the length of a given string
+strlen() tests
--INI--
precision = 12
--FILE--
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/substr_compare.phpt?r1=1.5&r2=1.6&diff_format=u
Index: php-src/ext/standard/tests/strings/substr_compare.phpt
diff -u php-src/ext/standard/tests/strings/substr_compare.phpt:1.5
php-src/ext/standard/tests/strings/substr_compare.phpt:1.6
--- php-src/ext/standard/tests/strings/substr_compare.phpt:1.5 Fri Dec 22 01:20:24 2006
+++ php-src/ext/standard/tests/strings/substr_compare.phpt Fri Apr 20 21:37:31 2007
@@ -1,5 +1,5 @@
--TEST--
-substr_compare()
+substr_compare() tests
--FILE--
<?php
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/ucfirst1.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/strings/ucfirst1.phpt
diff -u php-src/ext/standard/tests/strings/ucfirst1.phpt:1.1
php-src/ext/standard/tests/strings/ucfirst1.phpt:1.2
--- php-src/ext/standard/tests/strings/ucfirst1.phpt:1.1 Wed Mar 28 09:54:31 2007
+++ php-src/ext/standard/tests/strings/ucfirst1.phpt Fri Apr 20 21:37:31 2007
@@ -1,5 +1,5 @@
--TEST--
-"ucfirst()" function
+ucfirst() function
--FILE--
<?php
/* Make a string's first character uppercase */
@@ -212,3 +212,85 @@
Warning: Wrong parameter count for ucfirst() in %s on line %d
Done
+--UEXPECTF--
+#### Basic and Various operations ####
+
+Notice: Use of undefined constant string - assumed 'string' in %s on line %d
+unicode(16) "Testing ucfirst."
+unicode(17) "1.testing ucfirst"
+unicode(11) "HELLO wORLD"
+unicode(11) "HELLO wORLD"
+unicode(1) "+unicode(1) "+unicode(2) "+unicode(4) "Abcd"
+unicode(3) "Xyz"
+unicode(6) "String"
+unicode(2) "-3"
+unicode(2) "-3"
+unicode(6) "-3.344"
+unicode(6) "-3.344"
+unicode(0) ""
+unicode(4) "NULL"
+unicode(1) "0"
+unicode(1) "0"
+unicode(1) "1"
+unicode(4) "TRUE"
+unicode(1) "1"
+unicode(1) "1"
+unicode(8) "1.234444"
+unicode(0) ""
+unicode(5) "FALSE"
+unicode(1) " "
+unicode(5) " "
+unicode(1) "B"
+unicode(2) "\t"
+unicode(1) " "
+unicode(2) "12"
+unicode(8) "12twelve"
+
+#### Testing Miscelleneous inputs ####
+--- Testing arrays ---
+Notice: Array to string conversion in %s on line %d
+unicode(5) "Array"
+
+--- Testing objects ---
+unicode(12) "Hello, world"
+
+--- Testing Resources ---
+unicode(6) "Stream"
+unicode(1) "0"
+
+--- Testing a longer and heredoc string ---
+unicode(639) "Abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
+abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
+abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
+abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
+abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
+abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
+abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789
+@#$%^&**&^%$#@!~:())))((((&&&**%$###@@@!!!~~~~@###$%^&*
+abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789"
+
+--- Testing a heredoc null string ---
+unicode(0) ""
+
+--- Testing simple and complex syntax strings ---
+unicode(5) "World"
+unicode(7) "World'S"
+
+Notice: Undefined variable: strS in %s on line %d
+unicode(0) ""
+unicode(6) "WorldS"
+unicode(6) "WorldS"
+
+--- Nested ucfirst() ---
+unicode(5) "Hello"
+
+#### error conditions ####
+Warning: Wrong parameter count for ucfirst() in %s on line %d
+
+Warning: Wrong parameter count for ucfirst() in %s on line %d
+
+Warning: Wrong parameter count for ucfirst() in %s on line %d
+Done