com php-src: adding another testing scenario without coverage in setlocale function: ext/standard/tests/strings/setlocale_error.phpt
| From: | Christoph Michael Becker | Date: | Mon, 29 Jun 2015 16:15:03 +0000 |
| Subject: | com php-src: adding another testing scenario without coverage in setlocale function: ext/standard/tests/strings/setlocale_error.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-87631@lists.php.net to get a copy of this message | ||
Commit: 7acdfdc84e993bf69f9fd5e79957b787e9d9b2b5
Author: Edgar R. Sandi <edgar.r.sandi@gmail.com> Mon, 29 Jun 2015 09:50:27 -0300
Committer: Christoph M. Becker <cmb@php.net> Mon, 29 Jun 2015 18:15:03 +0200
Parents: ee1e67fae6f649894721a5293ad9ab290add121f
Branches: PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7acdfdc84e993bf69f9fd5e79957b787e9d9b2b5
Log:
adding another testing scenario without coverage in setlocale function
Changed paths:
M ext/standard/tests/strings/setlocale_error.phpt
Diff:
diff --git a/ext/standard/tests/strings/setlocale_error.phpt
b/ext/standard/tests/strings/setlocale_error.phpt
index 361d00c..99abfca 100644
--- a/ext/standard/tests/strings/setlocale_error.phpt
+++ b/ext/standard/tests/strings/setlocale_error.phpt
@@ -40,6 +40,10 @@ echo "\n-- Testing setlocale() function with invalid category --\n";
$invalid_category = "TEST";
var_dump( setlocale($invalid_category,"en_US.utf8") );
+echo "\n-- Testing setlocale() function with locale name too long, 'category' =
LC_ALL --";
+//Invalid locale - locale name too long
+var_dump(setlocale(LC_ALL,str_pad('',255,'A')));
+
echo "\nDone";
?>
--EXPECTF--
@@ -66,4 +70,8 @@ Deprecated: setlocale(): Passing locale category name as string is deprecated. U
Warning: setlocale(): Invalid locale category name TEST, must be one of LC_ALL, LC_COLLATE,
LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME in %s on line %d
bool(false)
+-- Testing setlocale() function with locale name too long, 'category' = LC_ALL --
+Warning: setlocale(): Specified locale name is too long in %s on line %d
+bool(false)
+
Done