Tests: Force LC_* environment variables when testing (non) l10n'isation.

Permits building in non-"C" environments.
Origin: vendor
Patch-Name: tests-fix-ppdLocalize-on-unclean-env.patch

Gbp-Pq: Name 0013-Tests-Force-LC_-environment-variables-when-testing-n.patch
This commit is contained in:
Didier Raboud 2016-08-09 18:11:18 +02:00 committed by openKylinBot
parent 501f1428b8
commit 03be3daee9
1 changed files with 8 additions and 0 deletions

View File

@ -658,6 +658,14 @@ main(int argc, /* I - Number of command-line arguments */
* Test localization... * Test localization...
*/ */
/*
* Enforce void localization
*/
putenv("LANG=C");
putenv("LC_ALL=C");
putenv("LC_CTYPE=C");
putenv("LC_MESSAGES=C");
fputs("ppdLocalizeIPPReason(text): ", stdout); fputs("ppdLocalizeIPPReason(text): ", stdout);
if (ppdLocalizeIPPReason(ppd, "foo", NULL, buffer, sizeof(buffer)) && if (ppdLocalizeIPPReason(ppd, "foo", NULL, buffer, sizeof(buffer)) &&
!strcmp(buffer, "Foo Reason")) !strcmp(buffer, "Foo Reason"))