From: Andrey Hristov Date: Sat, 12 Mar 2005 12:59:53 +0000 (+0000) Subject: add a test file X-Git-Tag: php-5.0.1b1~827 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cc39b51d2d7acd42bfb72d59b6a1a5d9b420eb05;p=php add a test file --- diff --git a/ext/standard/tests/strings/str_word_count.phpt b/ext/standard/tests/strings/str_word_count.phpt new file mode 100644 index 0000000000..4c9c0780f6 --- /dev/null +++ b/ext/standard/tests/strings/str_word_count.phpt @@ -0,0 +1,70 @@ +--TEST-- +str_word_count() +--FILE-- + +--EXPECTF-- +array(6) { + [0]=> + string(5) "Hello" + [1]=> + string(6) "friend" + [2]=> + string(6) "you're" + [3]=> + string(7) "looking" + [4]=> + string(4) "good" + [5]=> + string(5) "today" +} +array(6) { + [0]=> + string(5) "Hello" + [6]=> + string(6) "friend" + [14]=> + string(6) "you're" + [27]=> + string(7) "looking" + [44]=> + string(4) "good" + [49]=> + string(5) "today" +} +int(6) + +Warning: str_word_count(): The specified format parameter, '3' is invalid. in %s on line 9 +bool(false) + +Warning: str_word_count(): The specified format parameter, '123' is invalid. in %s on line 10 +bool(false) + +Warning: str_word_count(): The specified format parameter, '-1' is invalid. in %s on line 11 +bool(false) + +Warning: str_word_count(): The specified format parameter, '1569325056' is invalid. in %s on line 12 +bool(false) + +Warning: str_word_count(): The specified format parameter, '0' is invalid. in %s on line 13 +bool(false) + +Warning: str_word_count(): The specified format parameter, '0' is invalid. in %s on line 14 +bool(false) +string(55) "Hello friend, you're + looking good today!" \ No newline at end of file