From b1ce3d29ff0b8434ebcd032bc81b59ff8f231c88 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 4 Aug 2020 13:02:52 +0200 Subject: [PATCH] Check whether setlocale -a is available --- ext/standard/tests/strings/setlocale_variation2.phpt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/standard/tests/strings/setlocale_variation2.phpt b/ext/standard/tests/strings/setlocale_variation2.phpt index a24551f937..6f62f71ac1 100644 --- a/ext/standard/tests/strings/setlocale_variation2.phpt +++ b/ext/standard/tests/strings/setlocale_variation2.phpt @@ -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--