summaryrefslogtreecommitdiff
path: root/debian/patches/tests-fix-ppdLocalize-on-unclean-env.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/tests-fix-ppdLocalize-on-unclean-env.patch')
-rw-r--r--debian/patches/tests-fix-ppdLocalize-on-unclean-env.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/patches/tests-fix-ppdLocalize-on-unclean-env.patch b/debian/patches/tests-fix-ppdLocalize-on-unclean-env.patch
new file mode 100644
index 000000000..0c5c6e9c3
--- /dev/null
+++ b/debian/patches/tests-fix-ppdLocalize-on-unclean-env.patch
@@ -0,0 +1,32 @@
+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
+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 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"))