From 30eae85545994c10dcacb2d7becceaf569c99f65 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Fri, 25 Oct 2013 15:15:58 +0100 Subject: ensure locale is set back to the original value --- _test/tests/inc/auth_loadacl.test.php | 3 +++ 1 file changed, 3 insertions(+) (limited to '_test') diff --git a/_test/tests/inc/auth_loadacl.test.php b/_test/tests/inc/auth_loadacl.test.php index 64ab1b9cf..e8d9f6696 100644 --- a/_test/tests/inc/auth_loadacl.test.php +++ b/_test/tests/inc/auth_loadacl.test.php @@ -97,11 +97,13 @@ ACL; function test_FS2867() { global $USERINFO; + $old_locale = setlocale(LC_ALL, '0'); setlocale(LC_ALL, "English_United States.1252"); // should only succeed on windows systems setlocale(LC_ALL, "en_US.UTF-8"); // should succeed on other systems // no point continuing with this test if \s doesn't match A0 if (!preg_match('/\s/',"\xa0")) { + setlocale(LC_ALL, $old_locale); $this->markTestSkipped('Unable to change locale.'); } @@ -121,6 +123,7 @@ ACL; "devangariठttha\t@ALL 2", ); $this->assertEquals($expect, $this->auth_loadACL_testwrapper($acls)); + setlocale(LC_ALL, $old_locale); } } -- cgit v1.2.3