Skip to content

Commit 7acdfdc

Browse files
edgarsandicmb69
authored andcommitted
adding another testing scenario without coverage in setlocale function
1 parent ee1e67f commit 7acdfdc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ext/standard/tests/strings/setlocale_error.phpt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ echo "\n-- Testing setlocale() function with invalid category --\n";
4040
$invalid_category = "TEST";
4141
var_dump( setlocale($invalid_category,"en_US.utf8") );
4242

43+
echo "\n-- Testing setlocale() function with locale name too long, 'category' = LC_ALL --";
44+
//Invalid locale - locale name too long
45+
var_dump(setlocale(LC_ALL,str_pad('',255,'A')));
46+
4347
echo "\nDone";
4448
?>
4549
--EXPECTF--
@@ -66,4 +70,8 @@ Deprecated: setlocale(): Passing locale category name as string is deprecated. U
6670
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
6771
bool(false)
6872

73+
-- Testing setlocale() function with locale name too long, 'category' = LC_ALL --
74+
Warning: setlocale(): Specified locale name is too long in %s on line %d
75+
bool(false)
76+
6977
Done

0 commit comments

Comments
 (0)