From: andy wharmby Date: Sun, 18 Jan 2009 23:11:06 +0000 (+0000) Subject: Port similar_text test to 5.2. Tested on Windows, Linux and Linux 64 bit X-Git-Tag: php-5.2.9RC1~89 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8d1e2fdfdaf7bc7702ade59de02791143cee30b8;p=php Port similar_text test to 5.2. Tested on Windows, Linux and Linux 64 bit --- diff --git a/ext/standard/tests/strings/similar_text_basic.phpt b/ext/standard/tests/strings/similar_text_basic.phpt new file mode 100644 index 0000000000..cf2044b4c8 --- /dev/null +++ b/ext/standard/tests/strings/similar_text_basic.phpt @@ -0,0 +1,44 @@ +--TEST-- +similar_text(), basic tests +--CREDITS-- +Mats Lindh +#Testfest php.no +--INI-- +precision=14 +--FILE-- + +===DONE=== +--EXPECTF-- +-- Basic calls with just two strings -- +int(3) +int(0) +int(1) +int(7) + +-- Same calls with precentage return variable specified -- +float(54.545454545455) +float(0) +float(18.181818181818) +float(51.851851851852) +===DONE=== diff --git a/ext/standard/tests/strings/similar_text_error.phpt b/ext/standard/tests/strings/similar_text_error.phpt new file mode 100644 index 0000000000..a6e3a4674c --- /dev/null +++ b/ext/standard/tests/strings/similar_text_error.phpt @@ -0,0 +1,29 @@ +--TEST-- +similar_text(), error tests for missing parameters +--CREDITS-- +Mats Lindh +#Testfest php.no +--FILE-- + +===DONE=== +--EXPECTF-- +-- Testing similar_text() function with more than expected no. of arguments -- + +Warning: Wrong parameter count for similar_text() in %s on line %d + +-- Testing similar_text() function with less than expected no. of arguments -- + +Warning: Wrong parameter count for similar_text() in %s on line %d +===DONE===