com php-src: add test for strptime(): return false on failure: ext/standard/tests/time/strptime_error.phpt
| From: | Sara Golemon | Date: | Sun, 18 Jun 2017 16:28:50 +0000 |
| Subject: | com php-src: add test for strptime(): return false on failure: ext/standard/tests/time/strptime_error.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-98091@lists.php.net to get a copy of this message | ||
Commit: d3c593a5858959810de6fd398206f18d0fffdf10
Author: chance garcia <develop@chancegarcia.com> Sun, 18 Jun 2017 12:28:31 -0400
Committer: Sara Golemon <pollita@php.net> Sun, 18 Jun 2017 12:28:50 -0400
Parents: 192b2d8391b744f600dcfe0ea2fe6292c6f5294d
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d3c593a5858959810de6fd398206f18d0fffdf10
Log:
add test for strptime(): return false on failure
Closes https://github.com/php/php-src/pull/2583
Changed paths:
M ext/standard/tests/time/strptime_error.phpt
Diff:
diff --git a/ext/standard/tests/time/strptime_error.phpt
b/ext/standard/tests/time/strptime_error.phpt
index 92c7ca3..ae55028 100644
--- a/ext/standard/tests/time/strptime_error.phpt
+++ b/ext/standard/tests/time/strptime_error.phpt
@@ -32,6 +32,9 @@ echo "\n-- Testing strptime() function with more than expected no. of
arguments
$extra_arg = 10;
var_dump( strptime($date, $format, $extra_arg) );
+echo "\n-- Testing strptime() function on failure --\n";
+var_dump( strptime('foo', $format) );
+
?>
===DONE===
--EXPECTF--
@@ -51,5 +54,8 @@ NULL
Warning: strptime() expects exactly 2 parameters, 3 given in %s on line %d
NULL
+
+-- Testing strptime() function on failure --
+bool(false)
===DONE===