]> granicus.if.org Git - php/commitdiff
Check whether setlocale -a is available
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 4 Aug 2020 11:02:52 +0000 (13:02 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 5 Aug 2020 07:45:21 +0000 (09:45 +0200)
ext/standard/tests/strings/setlocale_variation2.phpt

index a24551f93725449bae955d1bda8c63ffa0d977ea..6f62f71ac1f2642c6ffc100094c623cdff55c298 100644 (file)
@@ -5,6 +5,10 @@ Test setlocale() function : usage variations - Setting all available locales in
 if (substr(PHP_OS, 0, 3) == 'WIN') {
     die('skip Not valid for windows');
 }
+exec("locale -a", $output, $exit_code);
+if ($exit_code !== 0) {
+    die("skip locale -a not available");
+}
 ?>
 --FILE--
 <?php