Description: Avoid test failures due to i18n of expected output
Force such tests to run with English messages.
Patch backported from upstream git.
Author: Olly Betts <olly@survex.com>
---
Last-Update: 2012-05-16
Index: survex-1.2.6/tests/cavern.tst
===================================================================
--- survex-1.2.6.orig/tests/cavern.tst 2012-05-16 11:23:08.000000000 +1200
+++ survex-1.2.6/tests/cavern.tst 2012-05-16 11:23:15.000000000 +1200
@@ -59,7 +59,11 @@
LC_ALL=C
export LC_ALL
-unset SURVEXLANG
+LC_MESSAGES=C
+export LC_MESSAGES
+LC_CTYPE=C
+export LC_CTYPE
+SURVEXLANG=en
export SURVEXLANG
for file in $TESTS ; do
@@ -268,9 +272,9 @@
if test -f "$file.out" ; then
# Check output is as expected.
if test -n "$VERBOSE" ; then
- diff tmp.out "$file.out" || exit 1
+ sed '1,/^$/d' tmp.out|diff - "$file.out" || exit 1
else
- diff tmp.out "$file.out" > /dev/null || exit 1
+ sed '1,/^$/d' tmp.out|diff - "$file.out" > /dev/null || exit 1
fi
fi
rm -f tmp.*
Index: survex-1.2.6/tests/diffpos.tst
===================================================================
--- survex-1.2.6.orig/tests/diffpos.tst 2012-05-16 11:23:08.000000000 +1200
+++ survex-1.2.6/tests/diffpos.tst 2012-05-16 11:23:15.000000000 +1200
@@ -1,7 +1,7 @@
#!/bin/sh
#
# Survex test suite - diffpos tests
-# Copyright (C) 1999-2003,2010 Olly Betts
+# Copyright (C) 1999-2003,2010,2012 Olly Betts
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,6 +31,13 @@
: ${TESTS=${*:-"delatend addatend"}}
+LC_MESSAGES=C
+export LC_MESSAGES
+LC_CTYPE=C
+export LC_CTYPE
+SURVEXLANG=en
+export SURVEXLANG
+
for file in $TESTS ; do
echo $file
rm -f diffpos.tmp
Index: survex-1.2.6/tests/equatenosuchstn.out
===================================================================
--- survex-1.2.6.orig/tests/equatenosuchstn.out 2012-05-16 11:23:08.000000000 +1200
+++ survex-1.2.6/tests/equatenosuchstn.out 2012-05-16 11:23:15.000000000 +1200
@@ -1,6 +1,3 @@
-Survex 1.2.5
-Copyright (C) 1990-2012 Olly Betts
-
Removing trailing traverses...
Concatenating traverses between nodes...