summaryrefslogtreecommitdiff
path: root/debian/patches/tests-fix-ppdLocalize-on-unclean-env.patch
blob: a3812f4e58a34eefce1e8b0e9cda9cb5ebd0505a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 6148d10865736f66163d430e540995665a80cc61 Mon Sep 17 00:00:00 2001
From: Didier Raboud <odyx@debian.org>
Date: Tue, 9 Aug 2016 18:11:18 +0200
Subject: Force LC_* environment variables when testing (non) l10n'isation.

 Permits building in non-"C" environments.
Origin: vendor
Last-Update: 2015-02-10
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 6d5065c..49b2887 100644
--- a/cups/testppd.c
+++ b/cups/testppd.c
@@ -503,6 +503,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"))