Commit Graph

243 Commits

Author SHA1 Message Date
Moriyoshi Koizumi
939a5870cf Fixed typo 2002-10-30 11:57:29 +00:00
Moriyoshi Koizumi
a4edf018cb Added a test case for bug #20169 2002-10-30 11:48:51 +00:00
Melvyn Sopacua
066e8aeef6 Add locale for BSDi
# Allthough these characters are used in germany, that doesn't mean, that
# they're not part of the latin-1 character set.
2002-10-29 17:43:08 +00:00
Moriyoshi Koizumi
630a4ff924 Removed dl() stuff 2002-10-29 16:28:12 +00:00
Ilia Alshanetsky
19820c0e83 Added a skip condition for situations where the TZ variable could not be
set (safe_mode).
2002-10-29 15:36:47 +00:00
Wez Furlong
a4a517015e I like my C comments, thanks very much. 2002-10-29 14:36:49 +00:00
Wez Furlong
2d2a375fa6 length of lyrics is not part of the test. 2002-10-29 14:31:54 +00:00
Marcus Boerger
82317945e5 -WS
-Use "//" instead of "/* ... */" comments
#this test fails for me. Very weired...
2002-10-29 14:05:55 +00:00
Melvyn Sopacua
50dced2eea Add FreeBSD locale 2002-10-27 17:07:26 +00:00
Melvyn Sopacua
4d8518e83f Add FreeBSD locale 2002-10-27 17:01:48 +00:00
Ilia Alshanetsky
e12826bc34 Added expected output. 2002-10-26 20:55:48 +00:00
Derick Rethans
758d074822 - Fix typoes 2002-10-26 20:09:15 +00:00
Derick Rethans
77d10050e1 - fix type 2002-10-26 20:07:49 +00:00
Melvyn Sopacua
93fcd7ea5d Test for bug in sprintf
# Doesn't segfault for me, but gives a lot of garbage, so I really don't
# know what the output should be. Results posted to QA
2002-10-26 20:07:26 +00:00
Marcus Boerger
92b63c4be5 remove original version 2002-10-26 16:58:38 +00:00
Marcus Boerger
24fe2a0f2d change to use EXPECTREGEX and rename 2002-10-26 16:56:26 +00:00
Marcus Boerger
0679a9139f split tests 2002-10-26 16:48:03 +00:00
Marcus Boerger
0d68286a95 fine tune 2002-10-26 16:09:50 +00:00
Moriyoshi Koizumi
5a6c529f43 Renamed test cases 2002-10-25 21:39:02 +00:00
Moriyoshi Koizumi
e7cc9d0274 Updated the test cases for htmlentities() 2002-10-25 13:12:31 +00:00
Marcus Boerger
0433e71a76 README.TESTING examples 2002-10-25 10:46:19 +00:00
Marcus Boerger
d5911a2cbb remove unnecessary sections
#becomes an example
2002-10-25 10:28:37 +00:00
Moriyoshi Koizumi
75db2913f1 Added some cases which test if charset determination with
SG(default_charset) works.
2002-10-24 22:21:03 +00:00
Moriyoshi Koizumi
c7c418c25a Added new test cases for htmlentities 2002-10-24 21:11:41 +00:00
Melvyn Sopacua
6695544db2 - Add locale string for FreeBSD
ATTN: Test nog longer skips, but fails. So whatever has changed since 4.2.3
affects BSD systems.
2002-10-24 19:17:11 +00:00
Marcus Boerger
1ff1e6496b use german characters for a test with german locale 2002-10-24 00:49:38 +00:00
Ilia Alshanetsky
2f3cd572fb Added 'skip logic' to the test on platforms where the locale required by
this test is not avaliable.
2002-10-23 23:04:43 +00:00
Andrey Hristov
d9c067ecc7 Test case regarding randomization of shuffle() and str_shuffle().
The code was provided by Adam Trachtenberg : adam trachtenberg com
2002-10-23 19:33:12 +00:00
Marcus Boerger
fa95a4a269 Shorten
# will be used as an example in README.TESTING
2002-10-23 12:47:31 +00:00
Melvyn Sopacua
d6e639a02f test for locale support in strtoupper 2002-10-22 19:39:17 +00:00
Ilia Alshanetsky
6b67dc8dd5 Fixed implode test 2002-10-22 17:17:56 +00:00
foobar
e232b212ba There is no point doing this test. Some systems think root can always execute so this is always true. 2002-10-21 00:30:05 +00:00
Derick Rethans
11961b1311 - Hopefully fix test file problems 2002-10-19 19:17:13 +00:00
Ilia Alshanetsky
04db537d97 Added tests for %e & %E 2002-10-15 12:08:02 +00:00
Ilia Alshanetsky
fed3b964ea Added float printing tests. 2002-10-14 16:31:56 +00:00
Wez Furlong
39f8d4c971 Add a sanity check and more verbose output in the case of an error. 2002-10-14 02:25:51 +00:00
Derick Rethans
8f7f6045b0 - Make the test do what it says 2002-10-12 16:53:13 +00:00
Markus Fischer
f43e4cc93d - Document were the first test came from. 2002-10-11 18:06:15 +00:00
Ilia Alshanetsky
8c6088839b Added test for explode() function. 2002-10-11 15:19:57 +00:00
Derick Rethans
e06550f853 - Fix problem with var_export when objects with numeric indexes were
exported. We now skip those, as there is no way to export valid code for
  it.
2002-10-11 13:49:20 +00:00
Derick Rethans
4da5ec8965 - Add case for bug 19858 2002-10-11 11:03:36 +00:00
Andrey Hristov
0e5ff737f4 Test case for str_shuffle(). 2002-10-09 10:53:27 +00:00
Ilia Alshanetsky
7d19c1b9e5 Added nl2br() test 2002-10-08 23:46:02 +00:00
Ilia Alshanetsky
8c77e13e92 Added test for strrev() function. 2002-10-08 21:51:59 +00:00
Derick Rethans
2005705272 - Skip if the function is not available (in case pcre was not compiled in). 2002-10-08 09:46:31 +00:00
Derick Rethans
5a84ae6489 - Use error_reporting E_ALL 2002-10-08 07:55:02 +00:00
Ilia Alshanetsky
d6775c5c3f Added tests for strstr(), strpos() and substr_count() functions. 2002-10-07 21:07:42 +00:00
Sander Roobol
00a2715eda We're testing stripCslashes() here :) 2002-10-06 19:26:56 +00:00
Sander Roobol
3e222bcbf1 Some more weird tests on Derick's request :) 2002-10-06 19:17:04 +00:00
Sander Roobol
9edfd75a5c Some string tests 2002-10-06 19:12:22 +00:00
Derick Rethans
bd48e0cfe9 - Add new tests for: array_change_key_case, array_chunk and
array_count_values.
2002-10-06 18:42:03 +00:00
Ilia Alshanetsky
12f47fe85a Added expected data to parse_url() test 2002-10-06 16:15:06 +00:00
Sander Roobol
8cf14a42f5 Add testcases for implode() and str_repeat() 2002-10-06 11:26:49 +00:00
Derick Rethans
b007bd0696 - Add parse_url() tests (expect will follow later)url_t.phpt 2002-10-05 20:28:35 +00:00
Wez Furlong
077fe52d8b This seems to resolve the issues with fgets.
I've moved EOF detection into the streams layer; a stream reader
implementation should set stream->eof when it detects EOF.
Fixed test for user streams - it still fails but that is due to an output
buffering bug.
2002-10-05 10:35:13 +00:00
Sean Bright
114dff39ce Add missing ?> 2002-10-04 02:34:15 +00:00
Sascha Schumann
cfaffd2185 overflow check for _php_math_basetozval 2002-10-04 02:20:41 +00:00
Andrey Hristov
83a0f20381 Making strrchr() binary safe.
Test case added.
2002-10-02 18:58:09 +00:00
Ilia Alshanetsky
0454bf2d0d Removed the ceil(-0.5); test. The return value is depedant on system's
libc and even when proper value '-0' is returned, var_dump() converts
it to 0 anyway.
2002-09-29 21:45:54 +00:00
Ilia Alshanetsky
0e7e7ae961 Corrected ceil(-0.5) output value, it is 0 not -0. 2002-09-29 19:21:10 +00:00
Wez Furlong
7694770304 Rename streams functions to fit with naming conventions, adding aliases
for old functions where required.
Make use of recent changes to chunk size and timeout setting code.
2002-09-28 22:14:21 +00:00
Andrey Hristov
7badd563cb Test case for strspn()/strcspn(). 2002-09-25 19:08:38 +00:00
Wez Furlong
9e84b3d5b5 Revise buffer/seek code a little.
Tidy up user streams even more.
Make test case quite aggressive.
2002-09-23 13:22:10 +00:00
Ilia Alshanetsky
fda169417f Added a test script for strip_tags() function. 2002-09-21 17:34:45 +00:00
Andrey Hristov
9980cf5f53 Test case for array_intersect() and array_intersect_assoc() 2002-09-21 14:50:55 +00:00
Wez Furlong
ff7bece5bb Tidy up some user stream code.
Add a small test case (not yet complete).
2002-09-18 10:15:40 +00:00
Andrey Hristov
2b710f7e5c Regression test for array_diff() and array_diff_assoc(). The latter is newly
introduced.
2002-09-11 18:16:11 +00:00
Marcus Boerger
a70640480a Patch from Melvyn Sopacua <msopacua@idg.nl> finally fixes it (bug 19006). 2002-08-21 10:42:55 +00:00
Marcus Boerger
d3d12daec4 add ini setting precision - this does not fix the real problem here 2002-08-21 03:13:33 +00:00
Marcus Boerger
be1e23cbc9 Add var_dump float format test 2002-08-21 01:27:56 +00:00
Marcus Boerger
534a63b5af Add combined base64 and md5 test 2002-08-21 01:26:21 +00:00
Marcus Boerger
9607a482b2 fix array tests
someone must have changed precision in php.ini-dist from 14 to 12
2002-08-21 01:22:02 +00:00
Sander Roobol
47ae4068bb Made unserialize handle floats with an E notation - bug #18654
Patch by Christophe Sollet <csollet@coleebris.com>.
(I'll commit a new var_unserializer.c in a second)
2002-08-19 19:45:46 +00:00
James E. Flemer
9eb1213206 Close pipes to avoid deadlock.
Submitted By: Melvyn Sopacua <msopacua@idg.nl>
2002-08-03 14:54:30 +00:00
foobar
362fc4ee76 Add test for the index resetting. 2002-08-01 16:39:14 +00:00
foobar
ababdff402 Added tests for array_shift/array_pop. 2002-08-01 12:33:02 +00:00
Sander Roobol
ace4a23dfc Fixed stripslashes when magic_quotes_sybase is enabled, and add a test for
add- and stripslashes().
# this time without cvs messing up and aborting, hopefully :)
2002-06-18 11:51:06 +00:00
Sander Roobol
07975157eb Fix stripslashes when magic_quotes_sybase is enabled, and add a test for
add- and stripslashes().
2002-06-18 11:42:21 +00:00
Hartmut Holzgraefe
808dd7dd5f fix for bug #10616 -> mktime() with negative date offsets not working on MacOSX 2002-06-12 15:35:27 +00:00
Wez Furlong
e202ad5c8b Add simple test case for proc_open 2002-05-23 10:46:06 +00:00
Preston L. Bannister
1fdff888ce Remove leading "./" from include filenames as in PHP this defeats include_path. 2002-05-16 21:53:18 +00:00
foobar
2f12941fac - Made all is_*() functions to return only boolean values.
- Killed the "file not found" error for is_link(). (finally..)
2002-05-16 01:07:21 +00:00
foobar
3b1ae7c62a revert last bogus change. There is bug in is_file() 2002-04-30 10:38:06 +00:00
Wez Furlong
840ed90f2b Fix is_file test.
# Is there a good reason for having the actual test in an include file??
2002-04-30 00:26:49 +00:00
Yasuo Ohgaki
de4a0ba58e Add test case for file_exist/is_file 2002-04-28 00:05:43 +00:00
Marcus Boerger
42dc682626 fix testproblem 2002-04-11 06:41:55 +00:00
Hartmut Holzgraefe
954dbb2d35 fix and regression test for Bug #16473 2002-04-07 19:46:45 +00:00
Kirill Maximov
33ed30fce8 (PHP quoted_printable_decode) Fixed CR/LF processing for Windows/OS2
@ Fixed CR/LF processing for Windows/OS2 in quoted_printable_decode (kir)
2002-04-01 17:03:01 +00:00
Wez Furlong
4361807185 add test for file_get_contents 2002-03-28 01:20:28 +00:00
Sander Roobol
9b6a8d2639 Fixed the array-tests. Broke the test up into various smaller tests.
Reduced the test data because it was unmanageable.
# I hope everything is ok :)
2002-03-26 18:17:38 +00:00
Sander Roobol
a15c9a31eb Added tests for pow()'ing with broken exponents and some additional test
for count()'ing arrays.
2002-03-21 14:18:30 +00:00
jim winstead
349936c93e Fix calculation of output buffer size in wordwrap(). (Thanks to Wez.) 2002-03-18 02:00:57 +00:00
foobar
fe7a2440ca - Renamed aggregate.lib.php -> aggregate.lib (.php files are always deleted bycvsclean) 2002-03-10 02:38:06 +00:00
Derick Rethans
39225a22b8 - Fix tests to work with CLI
#- Not totally done, but this makes it a lot better
2002-03-05 09:00:56 +00:00
Andrei Zmievski
513e598d1e Adding object aggregation capability along with tests. 2002-02-21 03:32:42 +00:00
jim winstead
831473d76e Rename finite/isinf/isnan to more standard is_*() names. 2002-01-09 23:59:05 +00:00
Derick Rethans
aee570302f - Fix bug introduced in earlier patch 2002-01-09 16:03:36 +00:00
jim winstead
4fb4c6d4b3 More tweaking of wordwrap() with the cut parameter set. It was being a
little too aggressive and cutting words without breaking at spaces
first. (A couple of tests were incorrect.)
2002-01-05 23:49:58 +00:00
jim winstead
ca15b22212 New memcpy()-based wordwrap() implementation. The simple case
(single-character break, no forced break) appears to be about 60%
faster, and there's simply no comparison for non-simple cases with
non-trivial amounts of text. The old algorithm was O(n^2) (with an
unfortunately large constant factor) because of the use of strncat(),
the new one is O(n). Added some more tests, too.
@ - Made wordwrap() significantly faster. (Jim)
# test case: $t = join('',file('ChangeLog')); $w = wordwrap($t,10,"\n",1);
# new code completes in less than a second. i'm still waiting for the
# old code to finish.
2002-01-05 20:46:43 +00:00
jim winstead
461e105069 Fixed pow(), and added finite(), isinf(), and isnan(). Also fixed
pow() tests.
@- Fixed pow(), and added finite(), isinf(), and isnan(). (Jim)
# Jeroen was on crack, and apparently flunked arithmetic. Names of new
# functions subject to change if people get persnickety about them.
# (They're currently the same as the underlying C library function
# names. Hope nobody forgets to update the tests if they change the
# names.)
# Oh, and pow() uses the new parameter-passing API now.
2002-01-05 03:45:11 +00:00
jim winstead
4b8f435b2a good grief, positive powers of 0 are well-defined. (code fix coming.) 2002-01-05 02:16:16 +00:00
Zak Greant
6823fb1fe7 Surprising how tests can fail when they don't have any supporting data :) Thanks for the catch Jan and Jim 2002-01-05 01:58:44 +00:00
jim winstead
f68b7c5f3e Fixed segfault in wordwrap() when wrapping to zero width and using
multi-character break or trying to force cut (bug #12768, now fails
and issues a warning because forcing a zero-width cut doesn't make
sense). Also converted to new paramater-passing API and avoid making
an extra copy of the return values.
# also added tests.
@- Fixed segfault in wordwrap() when wrapping to zero width and using
@  multi-character break or trying to force cut (bug #12768). (Jim)
2002-01-04 19:48:08 +00:00
Derick Rethans
ae07e93028 - Added test for recursive counting 2001-12-29 21:05:03 +00:00
Derick Rethans
6729156450 - Add test for floor and ceil 2001-12-22 11:52:56 +00:00
Zak Greant
2c9f5d8a91 Modified array_walk, arsort, asort, krsort, ksort, rsort, shuffle, sort,
uasort, uksort and usort.

Corrected prototype comments for all.

Converted to use zend_parse_parameters, except for the u.?sort functions.

Changed return values for failure from implicit NULL to explicit FALSE in
asort(), krsort(), and ksort().

Changed pval to zval in the u.?sort functions.

Added test to help ensure that fixes to code do not change function
behavior. Tests are quite large (~237k) but compress down to ~16k.
Please let me know if this is a problem!
2001-12-22 11:49:56 +00:00
Derick Rethans
d578e05f96 Mail should go to php-dev 2001-12-16 13:04:02 +00:00
Thies C. Arntzen
0fd809a770 improve last patch:
non existant object variables are now serialized as NULL, this saves us from
buffering the serialized data.
2001-12-01 15:17:50 +00:00
Thies C. Arntzen
7ff5198c53 serialized data would be incoorect if __sleep() returned a variable-name
which is non-existant in the object.
submitted by: Bernd Roemer <berndr@bonn.edu>
2001-12-01 15:06:37 +00:00
Rasmus Lerdorf
55d9b2ad9c Fix most of these tests - still think there is a bug in the long->float
conversion stuff somewhere
2001-11-13 13:12:46 +00:00
Rasmus Lerdorf
f78f4364a0 Different operating systems handle the group x bit differently, so
simplify this test to test the user x bit instead
2001-11-13 12:39:21 +00:00
Derick Rethans
6a5bcfef8d - Fix for bugs #9640 and #13789 2001-10-27 17:50:26 +00:00
Jeroen van Wolffelaar
43b3da1396 Make math tests pass, round & co don't work this way, and there was an error
in expected output
2001-10-22 09:44:27 +00:00
foobar
701b1a548e Fixed bug: #12617 2001-10-22 02:35:10 +00:00
Stig Bakken
925ff7f2b2 * remove version_{lt,le,gt,ge,eq} functions, added a third optional
parameter to version_compare doing the same thing
2001-10-11 10:35:59 +00:00
Stig Bakken
89bd184ea0 @Added version_compare() function (Stig) 2001-10-06 23:22:37 +00:00
Edin Kadribasic
26389258bb Made assert test pass on systems with short open tags disabled.
Added .cvsignore
2001-10-06 09:38:29 +00:00
Jeroen van Wolffelaar
a1c2b86701 Fix the pow-test, it now succeeds on my machine 2001-10-05 23:37:08 +00:00
Jeroen van Wolffelaar
5541451085 Add test for array_search and in_array
(should be expanded though)
2001-10-05 22:01:04 +00:00
Thies C. Arntzen
e929389eeb fix strtr() when called with two parameters. this has been broken for some time!
guys, when "optimizing" functions you _shoudl_ write a testcase for the
working function and make _sure_ that it works afterwards!
2001-09-13 10:48:41 +00:00
Stanislav Malyshev
8fd65b9f16 test big numbers too 2001-08-20 14:15:05 +00:00
foobar
d3aff0f6ee make this test work. 2001-08-18 16:47:02 +00:00
Jeroen van Wolffelaar
b3a7b945fa Fix test 2001-08-05 20:27:24 +00:00
Jeroen van Wolffelaar
71a6c03bef Didn't commit the correct trim.phpt, it now passes 2001-08-05 19:06:34 +00:00
Jeroen van Wolffelaar
860be31cae More tests 2001-08-05 18:38:48 +00:00
Jeroen van Wolffelaar
c105f7142f Better abs() testing 2001-08-04 21:40:34 +00:00
Jeroen van Wolffelaar
58ee4e47a4 Fix bug in the tests :-(
There seems to be one real bug in pow(), I'm trying to fix it...
2001-08-04 18:03:29 +00:00
Jeroen van Wolffelaar
0cf60d749e Added tests for pow()
#The tests near LONG_MAX/MIN fail, I know that
2001-08-04 13:20:31 +00:00
Thies C. Arntzen
61822fcd47 @ - assert() now accepts the array(&$obj,"methodname") syntax. (Thies)
+ some cleanups
2001-07-09 10:20:41 +00:00
Thies C. Arntzen
e7b01fc53c added test for assert 2001-07-09 09:08:14 +00:00
Thies C. Arntzen
1be0975dff added test for serialize
changed var.c to use Z_* macros
2001-07-09 09:03:06 +00:00
Sascha Schumann
d6d59a9ee5 1. st_blksize might be different for regular files and symlinks; hence
ignore differences in the twelfth element of the stat() array.

2. The 'test.file' is created by the script, thus the owner of the file
   is the user id executing the script.  A mode of 0654 does not grant
   the owner the right to execute the file and therefore, the correct
   output here is "not executable."
2001-06-21 11:15:38 +00:00
Jason Greene
7f3291ae8c Fix is_executable test. 2001-05-11 02:45:49 +00:00
Derick Rethans
b181237582 - Partial fix for bug #9050, support for "Jan 19 2000" date format 2001-05-06 18:33:49 +00:00
James Moore
7a85ec55f7 Adding microtime() tests 2001-02-04 16:56:59 +00:00
Rui Hirokawa
187828f2f2 moved to ext/iconv. 2001-01-09 15:40:49 +00:00
Zak Greant
bbf41d2116 Adding test for is_scalar(). 2000-12-18 21:24:25 +00:00
Stig Bakken
6e1e78d1c6 @Added iconv() function (using libc or libiconv) (Stig) 2000-12-15 01:01:14 +00:00
Hartmut Holzgraefe
9b1b253548 fgetcsv() will now work correct with empty fields in tab delimited files
# fix for bug #8258 and regression test
2000-12-14 14:18:36 +00:00
Hartmut Holzgraefe
63e6b0b5bf levenshtein() fixed, regression tests added (bug id #6562 and #7368)
# fallback to unoptimized version for 4.0.4 release
2000-12-13 23:26:19 +00:00
Kirill Maximov
023a95ae1c @ quoted_printable_decode() function is made RFC-2045 compliant. (Kir)
This hopefully closes bugs #5321, #7138, #7855.
  Test script for the function is added.
2000-11-17 10:55:37 +00:00
Stig Bakken
1bb90f5805 * all tests should pass now (expect for the interbase stuff that I haven't
had the chance to test)
2000-08-31 22:21:47 +00:00
Stig Bakken
315f4f5658 @PHP 3 regression testing framework re-born (Stig)
Took the old PHP 3 regression testing framework and rewrote it in PHP.
Should work on both Windows and UNIX, however I have not tested it on
Windows.  See tests/README for how to write tests.  Added the PHP 3
tests and converted most of them.
2000-08-27 19:46:06 +00:00