1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 15:38:49 +02:00
Commit Graph

70 Commits

Author SHA1 Message Date
Peter Kokot b746e69887 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:32:30 +02:00
Peter Kokot 782352c54a Trim trailing whitespace in *.phpt 2018-10-14 19:45:12 +02:00
Gabriel Caruso 1461f8ef0d Remove superfluous SKIPIF sections of always available functions 2018-07-29 15:42:19 -03:00
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
chance garcia d3c593a585 add test for strptime(): return false on failure
Closes https://github.com/php/php-src/pull/2583
2017-06-18 12:28:50 -04:00
Remi Collet 018b9445da Fix failed test with recent glibc
In recent version of strptime glibc upstream has fixed a discrepancy between
documentation and actual behaviour by skipping over the sequence that would match %Z.
See http://repo.or.cz/w/glibc.git/commitdiff/ddc7e412ab252e7360a4357664beb3b5d9c4f42b

So when %Z is used in format
glibc <= 2.18 returns the GMT as unparsed
glibc >= 2.19 returns empty string

Removing %Z from tested format gives the same behavior with all version.
2013-11-13 13:19:10 +01:00
Xinchen Hui 45e938ec34 Remove executable permission on phpt 2012-10-10 10:31:53 +08:00
Xinchen Hui e081c55fb5 Merge branch 'PHP-5.3' into PHP-5.4 2012-10-10 10:31:31 +08:00
Xinchen Hui 610c7fbe7b Remove executable permission on phpt 2012-10-10 10:27:49 +08:00
Ilia Alshanetsky 9c886ea553 Fixed bug #60222 (time_nanosleep() does validate input params). 2012-03-12 16:53:07 +00:00
Ilia Alshanetsky 4cccba09e0 Fixed bug #60222 (time_nanosleep() does validate input params). 2012-03-12 16:53:07 +00:00
Stanislav Malyshev c268811b01 fix strptime tests for mac 2011-08-31 07:34:07 +00:00
andy wharmby 7c7dd8b712 Basic tests for strftime(). Tested on Windows (all tests skip), Linux and Liinux 64 bit 2009-06-18 21:14:15 +00:00
Scott MacVicar b4707a5e02 Some more tests that needed fixed. 2009-01-10 00:51:04 +00:00
Pierre Joye a9b8b3698b - MFH: use date.timezone ini setting instead of ENV 2008-08-21 18:33:21 +00:00
Dmitry Stogov b2785c3d4c Fixed tests (win32) 2007-04-18 14:51:29 +00:00
Antony Dovgal 806d9fe71b tm_yday may be 0 2006-08-24 11:27:20 +00:00
Ilia Alshanetsky 2a41a50216 Fixed bug #38524 (strptime() does not initialize the internal date storage
structure).
2006-08-20 18:20:07 +00:00
Ilia Alshanetsky cce5e8c9ea Updated tests to use [] instead of {} 2005-11-16 15:13:20 +00:00
Derick Rethans d3c83378eb - Move mktime/gmmktime related tests from ext/standard to ext/date. 2005-07-03 14:36:59 +00:00
Derick Rethans ed02f202f0 - Fixed bug #30096 (gmmktime does not return the corrent time).
- Re-implemented mktime and gmmktime with new date time library.
- Added testcase for bug #30096, updated test cases for E_STRICT warning of
  is_dst parameter usage for mktime/gmmktime.
2005-07-03 14:27:31 +00:00
Derick Rethans e155585e6e - Reimplemented date and gmdate with new timelib code.
- Removed old date/gmdate implementations.
- Moved date() related testcases to ext/date/tests.
- Implemented bug #33452.
- Fixed testcase for bug #27719 - there is no timezone called "EST5DST".
2005-06-30 21:38:06 +00:00
Derick Rethans b7ea5dc5f4 - Move strtotime() related testcases to ext/date/tests. 2005-06-16 17:35:08 +00:00
Derick Rethans 4fb4cac65c - Add my new timelib and ext/date. For now only strtotime() makes use of this. 2005-06-14 21:32:29 +00:00
foobar 71b9c41a6b fix test 2005-02-04 23:23:34 +00:00
Derick Rethans a6ded1178e - Added test for bug #28599 2004-11-23 09:40:07 +00:00
Andi Gutmans d1b29ad4c2 - There's no reason why gettimeofday() shouldn''t return the same time in
successive calls; this test fails spuriously on Linux/x86_64 (which has
a particularly fast gettimeofday() implementation).
- Joe Orton <jorton@redhat>
2004-07-23 21:53:16 +00:00
Marcus Boerger d94136fc30 - Remove unused blocks 2004-05-19 08:45:46 +00:00
Derick Rethans b91a947d5e - Added test and not the diff ;-) 2004-04-08 16:17:35 +00:00
foobar 5d3900a2e9 remove crap 2004-04-08 15:58:35 +00:00
Derick Rethans 9d4f01a8af - Test case for bug #20382 2004-04-08 14:18:23 +00:00
Derick Rethans f1141d79c6 - Fixed comment and double 0 2004-04-04 12:45:02 +00:00
Derick Rethans 794846e5c5 - One more test for a date/time related bug. 2004-04-04 12:42:13 +00:00
Derick Rethans b2ed70e4e0 - MFB: Fixed bug #27780 (strtotime(+1 xxx) returns a wrong date/time) 2004-04-01 21:40:56 +00:00
Ard Biesheuvel 81cfb1b312 Make time tests more robust against differences in implementation
# FreeBSD mktime() returns -1 if is_dst==1 and no DST timezone is set
2004-03-31 01:00:55 +00:00
Ilia Alshanetsky f7fd3a7dcc Removed extra spaces that cause the test to fail. 2004-03-29 21:57:29 +00:00
Rasmus Lerdorf 1ece5eb5ad MFB test case for bug #27719 and improve comments in this tricky DST code 2004-03-28 15:03:56 +00:00
Moriyoshi Koizumi df8ee549f5 - Add support for more ISO8601 style formats.
. Timezone specifier (ex. 20040301T00:00:00+1900)
 . Week specifier "W"  (ex. 1997W021)
- Modified test case to test new features.
2004-03-01 10:42:28 +00:00
Derick Rethans e7fd0bdf03 - Added 'c' modifier to date() which returns the date in ISO 8601 format. 2003-12-16 22:52:48 +00:00
Hartmut Holzgraefe 8053a324aa typo fix 2003-11-19 17:38:42 +00:00
Hartmut Holzgraefe 47ee4d5e88 regression test for bug # 26320
"strtotime() does not understand ISO6801 datetime format as used in XMLSchema"
2003-11-19 16:37:50 +00:00
Hartmut Holzgraefe 5339f9134f Testcase done right ... 2003-11-19 16:19:28 +00:00
Hartmut Holzgraefe 8cc9c96cef regression test for http://bugs.php.net/bug.php?id=26317
"military timezones and strtotime()"
2003-11-19 16:01:25 +00:00
Ilia Alshanetsky 770a111a43 Fixed bug #26198 (strtotime() handling of M/F Y date format). 2003-11-12 02:55:03 +00:00
Melvyn Sopacua 50947cb155 MFB: Fix US/Eastern vs. America/New_York style tzset implementations. 2003-09-09 21:56:33 +00:00
Derick Rethans 77729f89dd - Fixed bug #17988: strtotime fails to parse timestamp from postgresql
#- This is actually a feature request
2003-08-16 20:55:28 +00:00
Moriyoshi Koizumi 3bf0b26218 Tru64 requires TZ values be POSIX styled.
# See http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V50_HTML/MAN/MAN3/0247____.HTM for detail.
2003-08-07 17:46:18 +00:00
Moriyoshi Koizumi 0ff21d0370 putenv() should be put here as well. 2003-08-05 12:29:26 +00:00
Ilia Alshanetsky f9cf39bd30 Fixed bug #13142 (strtotime not handling "M d H:i:s Y" format) 2003-07-28 04:01:32 +00:00
Marcus Boerger 7ff718f455 Make this a warning 2003-05-23 20:51:49 +00:00