summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/UtilTest.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php
index 04d4858fb26..b9c791735bb 100644
--- a/tests/lib/UtilTest.php
+++ b/tests/lib/UtilTest.php
@@ -74,6 +74,14 @@ class UtilTest extends \Test\TestCase {
$this->assertEquals("/%C2%A7%23%40test%25%26%5E%C3%A4/-child", $result);
}
+ public function testIsSetLocaleWorking() {
+ // OC_Util::isSetLocaleWorking() assumes escapeshellcmd('§') returns '' with non-UTF-8 locale.
+ $locale = setlocale(LC_CTYPE, 0);
+ setlocale(LC_CTYPE, 'C');
+ $this->assertEquals('', escapeshellcmd('§'));
+ setlocale(LC_CTYPE, $locale);
+ }
+
public function testFileInfoLoaded() {
$expected = function_exists('finfo_open');
$this->assertEquals($expected, \OC_Util::fileInfoLoaded());