From ae1fbab6458f263b3fb46fda6be84cf615567a8f Mon Sep 17 00:00:00 2001 From: LeoHsiao Date: Wed, 14 Oct 2020 19:52:32 +0800 Subject: [PATCH] Fix variable LANG in nls_test() --- tests/bash_tests/testcases.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/bash_tests/testcases.py b/tests/bash_tests/testcases.py index 4e16c492..10a0fe6d 100644 --- a/tests/bash_tests/testcases.py +++ b/tests/bash_tests/testcases.py @@ -868,15 +868,15 @@ set Exif.Photo.DateTimeDigitized 2020:05:26 07:31:42 if nls != 'enable_nls=1': print('Skipped. Because exiv2 is not built with nls.') return + if platform == 'platform=windows': print('Skipped. Because nls_test cannot be run msvc builds.') return - - # variable LANG is unused - # if platform == 'platform=linux': - # LANG = 'LANGUAGE' - # else: - # LANG = 'LANG' + + if platform == 'platform=linux': + LANG = 'LANGUAGE' + else: + LANG = 'LANG' share_dir = os.path.normpath(os.path.join(BT.Config.bin_dir, '..', 'share2')) os.makedirs(share_dir, exist_ok=True) @@ -890,7 +890,7 @@ set Exif.Photo.DateTimeDigitized 2020:05:26 07:31:42 # The above part is checking the environment, and the following part is executing the actual test out = BT.Output() for language in ['fr_FR', 'es_ES']: - out += BT.Executer('exiv2', extra_env={'LC_ALL': language, 'LANG': language}, assert_returncode=[1]) + out += BT.Executer('exiv2', extra_env={'LC_ALL': language, LANG: language}, assert_returncode=[1]) BT.reportTest('nls-test', out)