]> granicus.if.org Git - postgresql/commitdiff
Unset some local environment variables in TAP tests
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 22 Jul 2014 04:42:36 +0000 (00:42 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 22 Jul 2014 04:45:06 +0000 (00:45 -0400)
Unset environment variables that control message language, so that we
can compare some program output with expected strings.  This is very
similar to what pg_regress does.

src/test/perl/TestLib.pm

index f80d1c5bd72c0a15df3ee068c31af4890ac11ab2..e6a8a4ebe3522597b150b8ffb9fded762f8e7af2 100644 (file)
@@ -39,6 +39,12 @@ BEGIN
          }
 }
 
+# Set to untranslated messages, to be able to compare program output
+# with expected strings.
+delete $ENV{LANGUAGE};
+delete $ENV{LC_ALL};
+$ENV{LC_MESSAGES} = 'C';
+
 delete $ENV{PGCONNECT_TIMEOUT};
 delete $ENV{PGDATA};
 delete $ENV{PGDATABASE};