]> 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 08:38:59 +0000 (10:38 +0200)
ext/standard/tests/strings/setlocale_variation2.phpt

index fad3298cc7a912f2185113dea3892690b4f1a21e..6fd6f4d275bf1cbb87809097935ec6e5b6ef0796 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