|
36 | 36 | from common import create_file, parameterized, NON_ZERO, node_pthreads, TEST_ROOT, test_file
|
37 | 37 | from common import compiler_for, EMBUILDER, requires_v8, requires_node, requires_wasm64, requires_node_canary
|
38 | 38 | from common import requires_wasm_exnref, crossplatform, with_all_eh_sjlj, with_all_sjlj
|
39 |
| -from common import also_with_standalone_wasm, also_with_env_modify, also_with_wasm2js |
| 39 | +from common import also_with_standalone_wasm, also_with_wasm2js |
40 | 40 | from common import also_with_minimal_runtime, also_with_wasm_bigint, also_with_wasm64, flaky
|
41 | 41 | from common import EMTEST_BUILD_VERBOSE, PYTHON, WEBIDL_BINDER
|
42 | 42 | from common import requires_network, parameterize
|
@@ -5942,11 +5942,20 @@ def test_force_stdlibs(self):
|
5942 | 5942 | self.do_runf('hello_world.c', emcc_args=['-sWASM_BIGINT'])
|
5943 | 5943 |
|
5944 | 5944 | @crossplatform
|
5945 |
| - @also_with_env_modify({'gb_locale': {'LC_ALL': 'en_GB'}, 'long_tz': {'TZ': 'Asia/Kathmandu'}}) |
5946 | 5945 | def test_strftime_zZ(self):
|
5947 |
| - if os.environ.get('LC_ALL') == 'en_GB' and MACOS: |
| 5946 | + if MACOS: |
5948 | 5947 | self.skipTest('setting LC_ALL is not compatible with macOS python')
|
5949 |
| - self.do_runf('other/test_strftime_zZ.c', 'ok!') |
| 5948 | + |
| 5949 | + tz_lang_infos = [ |
| 5950 | + {'env': {'LC_ALL': 'en_GB', 'TZ': 'Europe/London'}, 'expected_utc': 'UTC+0100'}, |
| 5951 | + {'env': {'LC_ALL': 'th_TH', 'TZ': 'Asia/Bangkok'}, 'expected_utc': 'UTC+0700'}, |
| 5952 | + {'env': {'LC_ALL': 'ar-AE', 'TZ': 'Asia/Dubai'}, 'expected_utc': 'UTC+0400'}, |
| 5953 | + {'env': {'LC_ALL': 'en-US', 'TZ': 'America/Los_Angeles'}, 'expected_utc': 'UTC-0700'} |
| 5954 | + ] |
| 5955 | + |
| 5956 | + for tz_lang_info in tz_lang_infos: |
| 5957 | + with env_modify(tz_lang_info['env']): |
| 5958 | + self.do_runf('other/test_strftime_zZ.c', 'The current timezone is: %s' % (tz_lang_info['expected_utc'])) |
5950 | 5959 |
|
5951 | 5960 | def test_strptime_symmetry(self):
|
5952 | 5961 | self.do_other_test('test_strptime_symmetry.c')
|
|
0 commit comments