ModuleHelper - also uses LC_ALL to force language (#2731) (#2737)

* also uses LC_ALL to force language

* adjusted test_xfconf and test_cpanm

* added changelog fragment

* Update changelogs/fragments/2731-mh-cmd-locale.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* adjusted chglog frag per PR

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 6a41fba2f8)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
Felix Fontein 2021-06-08 10:54:46 +02:00 committed by GitHub
commit 885bb73cc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 18 deletions

View file

@ -49,7 +49,7 @@ TEST_CASES = [
# Calling of following command will be asserted
['/testbin/xfconf-query', '--channel', 'xfwm4', '--property', '/general/inactive_opacity'],
# Was return code checked?
{'environ_update': {'LANGUAGE': 'C'}, 'check_rc': False},
{'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
# Mock of returned code, stdout and stderr
(0, '100\n', '',),
),
@ -69,7 +69,7 @@ TEST_CASES = [
# Calling of following command will be asserted
['/testbin/xfconf-query', '--channel', 'xfwm4', '--property', '/general/i_dont_exist'],
# Was return code checked?
{'environ_update': {'LANGUAGE': 'C'}, 'check_rc': False},
{'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
# Mock of returned code, stdout and stderr
(1, '', 'Property "/general/i_dont_exist" does not exist on channel "xfwm4".\n',),
),
@ -89,7 +89,7 @@ TEST_CASES = [
# Calling of following command will be asserted
['/testbin/xfconf-query', '--channel', 'xfwm4', '--property', '/general/workspace_names'],
# Was return code checked?
{'environ_update': {'LANGUAGE': 'C'}, 'check_rc': False},
{'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
# Mock of returned code, stdout and stderr
(0, 'Value is an array with 3 items:\n\nMain\nWork\nTmp\n', '',),
),
@ -109,7 +109,7 @@ TEST_CASES = [
# Calling of following command will be asserted
['/testbin/xfconf-query', '--channel', 'xfwm4', '--property', '/general/use_compositing'],
# Was return code checked?
{'environ_update': {'LANGUAGE': 'C'}, 'check_rc': False},
{'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
# Mock of returned code, stdout and stderr
(0, 'true', '',),
),
@ -129,7 +129,7 @@ TEST_CASES = [
# Calling of following command will be asserted
['/testbin/xfconf-query', '--channel', 'xfwm4', '--property', '/general/use_compositing'],
# Was return code checked?
{'environ_update': {'LANGUAGE': 'C'}, 'check_rc': False},
{'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
# Mock of returned code, stdout and stderr
(0, 'false', '',),
),
@ -155,7 +155,7 @@ TEST_CASES = [
# Calling of following command will be asserted
['/testbin/xfconf-query', '--channel', 'xfwm4', '--property', '/general/inactive_opacity'],
# Was return code checked?
{'environ_update': {'LANGUAGE': 'C'}, 'check_rc': False},
{'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
# Mock of returned code, stdout and stderr
(0, '100\n', '',),
),
@ -164,7 +164,7 @@ TEST_CASES = [
['/testbin/xfconf-query', '--channel', 'xfwm4', '--property', '/general/inactive_opacity',
'--create', '--type', 'int', '--set', '90'],
# Was return code checked?
{'environ_update': {'LANGUAGE': 'C'}, 'check_rc': False},
{'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
# Mock of returned code, stdout and stderr
(0, '', '',),
),
@ -190,7 +190,7 @@ TEST_CASES = [
# Calling of following command will be asserted
['/testbin/xfconf-query', '--channel', 'xfwm4', '--property', '/general/inactive_opacity'],
# Was return code checked?
{'environ_update': {'LANGUAGE': 'C'}, 'check_rc': False},
{'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
# Mock of returned code, stdout and stderr
(0, '90\n', '',),
),
@ -199,7 +199,7 @@ TEST_CASES = [
['/testbin/xfconf-query', '--channel', 'xfwm4', '--property', '/general/inactive_opacity',
'--create', '--type', 'int', '--set', '90'],
# Was return code checked?
{'environ_update': {'LANGUAGE': 'C'}, 'check_rc': False},
{'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
# Mock of returned code, stdout and stderr
(0, '', '',),
),
@ -225,7 +225,7 @@ TEST_CASES = [
# Calling of following command will be asserted
['/testbin/xfconf-query', '--channel', 'xfwm4', '--property', '/general/workspace_names'],
# Was return code checked?
{'environ_update': {'LANGUAGE': 'C'}, 'check_rc': False},
{'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
# Mock of returned code, stdout and stderr
(0, 'Value is an array with 3 items:\n\nMain\nWork\nTmp\n', '',),
),
@ -235,7 +235,7 @@ TEST_CASES = [
'--create', '--force-array', '--type', 'string', '--set', 'A', '--type', 'string', '--set', 'B',
'--type', 'string', '--set', 'C'],
# Was return code checked?
{'environ_update': {'LANGUAGE': 'C'}, 'check_rc': False},
{'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
# Mock of returned code, stdout and stderr
(0, '', '',),
),
@ -261,7 +261,7 @@ TEST_CASES = [
# Calling of following command will be asserted
['/testbin/xfconf-query', '--channel', 'xfwm4', '--property', '/general/workspace_names'],
# Was return code checked?
{'environ_update': {'LANGUAGE': 'C'}, 'check_rc': False},
{'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
# Mock of returned code, stdout and stderr
(0, 'Value is an array with 3 items:\n\nA\nB\nC\n', '',),
),
@ -271,7 +271,7 @@ TEST_CASES = [
'--create', '--force-array', '--type', 'string', '--set', 'A', '--type', 'string', '--set', 'B',
'--type', 'string', '--set', 'C'],
# Was return code checked?
{'environ_update': {'LANGUAGE': 'C'}, 'check_rc': False},
{'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
# Mock of returned code, stdout and stderr
(0, '', '',),
),
@ -295,7 +295,7 @@ TEST_CASES = [
# Calling of following command will be asserted
['/testbin/xfconf-query', '--channel', 'xfwm4', '--property', '/general/workspace_names'],
# Was return code checked?
{'environ_update': {'LANGUAGE': 'C'}, 'check_rc': False},
{'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
# Mock of returned code, stdout and stderr
(0, 'Value is an array with 3 items:\n\nA\nB\nC\n', '',),
),
@ -304,7 +304,7 @@ TEST_CASES = [
['/testbin/xfconf-query', '--channel', 'xfwm4', '--property', '/general/workspace_names',
'--reset'],
# Was return code checked?
{'environ_update': {'LANGUAGE': 'C'}, 'check_rc': False},
{'environ_update': {'LANGUAGE': 'C', 'LC_ALL': 'C'}, 'check_rc': False},
# Mock of returned code, stdout and stderr
(0, '', '',),
),