]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Unify line endings in localization test.
authorPeter Rosin <peda@lysator.liu.se>
Thu, 22 Jan 2009 22:41:06 +0000 (23:41 +0100)
committerPeter Rosin <peda@lysator.liu.se>
Thu, 22 Jan 2009 22:41:06 +0000 (23:41 +0100)
* tests/testsuite.at: Update copyright year.
(LT_AT_UNIFY_NL): Add macro that unifies line endings on
platforms that suffer from such confusion.
* tests/localization.at: Use it. Update copyright year. Fixes
the test on MSYS/MSVC.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
tests/localization.at
tests/testsuite.at

index 9ba522dd196982243dc998da4969f72528c5b871..3ac3e4b68591a32a57a9c6d85ee52114526717e3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-01-22  Peter Rosin  <peda@lysator.liu.se>
+
+       Unify line endings in localization test.
+       * tests/testsuite.at: Update copyright year.
+       (LT_AT_UNIFY_NL): Add macro that unifies line endings on
+       platforms that suffer from such confusion.
+       * tests/localization.at: Use it. Update copyright year. Fixes
+       the test on MSYS/MSVC.
+
 2008-12-19  Akim Demaille  <demaille@gostai.com>
 
        Fix copyright notice.
index d489fefa65caaff9b9498a8eafbb65e6f23ac176..92b19ac1473826b433ed8c297f643c721498dfd5 100644 (file)
@@ -1,6 +1,6 @@
 # localization.at -- libtool and locales                -*- Autotest -*-
 #
-#   Copyright (C) 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 #   Written by Ralf Wildenhues, 2008
 #
 #   This file is part of GNU Libtool.
@@ -43,13 +43,16 @@ AT_CHECK([$CC $CPPFLAGS $CFLAGS -c b.c || exit 77], [], [stdout], [stderr])
 
 # Find out about expected output.
 AT_CHECK([$CC $CPPFLAGS $CFLAGS -c a.c || exit 1], [1], [stdout], [stderr])
-mv -f stdout expected-stdout
-mv -f stderr expected-stderr
+LT_AT_UNIFY_NL([stdout], [expected-stdout])
+LT_AT_UNIFY_NL([stderr], [expected-stderr])
 AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c || exit 1],
         [1], [stdout], [stderr])
+LT_AT_UNIFY_NL([stderr])
 AT_CHECK([diff expected-stderr stderr])
 LTBASE=`$ECHO "$LIBTOOL" | sed 's,^.*/,,'`
-AT_CHECK([grep -v "^$LTBASE: compile" stdout | diff expected-stdout -])
+grep -v "^$LTBASE: compile" stdout > libtool-stdout
+LT_AT_UNIFY_NL([libtool-stdout])
+AT_CHECK([diff expected-stdout libtool-stdout])
 
 # check that we get our quoting right.
 LANGUAGE='a; nosuchprogram " '\''  & $x /#+*(){}|,:`\ !%'
index f116a1f21b13fd49654dec9edc0d9089ef060ed8..56ca3a2ab474aa126b370ef0f3b03cfaa8925da5 100644 (file)
@@ -1,6 +1,6 @@
 # Process with autom4te to create an -*- Autotest -*- test suite.
 #
-#   Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software
+#   Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software
 #   Foundation, Inc.
 #   Written by Gary V. Vaughan, 2004
 #
@@ -204,6 +204,20 @@ case $host_os in mingw*)
 esac])
 
 
+# LT_AT_UNIFY_NL(FILE, [RESULT-FILE])
+# -----------------------------------
+# Ensure (text) FILE has predictable line endings.
+# If RESULT-FILE is given, FILE is left untouched. If not, convert in-place.
+m4_define([LT_AT_UNIFY_NL],
+[case $host_os in
+  mingw*)
+    tr -d '\015' < $1 > m4_ifval([$2], [$2], [$1.t
+    mv -f $1.t $1]) ;; m4_ifval([$2], [
+  *)
+    cp $1 $2 ;;])
+esac])
+
+
 # LT_AT_EXEC_CHECK(EXECUTABLE, [STATUS = 0], [STDOUT], [STDERR],
 #                 [ARGS-OR-STATUS-ADJUST])
 # --------------------------------------------------------------