cups/debian/patches/0013-Tests-Force-LC_-enviro...

32 lines
899 B
Diff

From: Didier Raboud <odyx@debian.org>
Date: Tue, 9 Aug 2016 18:11:18 +0200
Subject: 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
---
cups/testppd.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/cups/testppd.c b/cups/testppd.c
index 36707f2..a4ab7bf 100644
--- a/cups/testppd.c
+++ b/cups/testppd.c
@@ -658,6 +658,14 @@ main(int argc, /* I - Number of command-line arguments */
* Test localization...
*/
+ /*
+ * Enforce void localization
+ */
+ putenv("LANG=C");
+ putenv("LC_ALL=C");
+ putenv("LC_CTYPE=C");
+ putenv("LC_MESSAGES=C");
+
fputs("ppdLocalizeIPPReason(text): ", stdout);
if (ppdLocalizeIPPReason(ppd, "foo", NULL, buffer, sizeof(buffer)) &&
!strcmp(buffer, "Foo Reason"))