[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to m4/checks/Attic/check-them,v [branch-1_4]
From: |
Eric Blake |
Subject: |
Changes to m4/checks/Attic/check-them,v [branch-1_4] |
Date: |
Mon, 04 Sep 2006 14:19:38 +0000 |
CVSROOT: /sources/m4
Module name: m4
Branch: branch-1_4
Changes by: Eric Blake <ericb> 06/09/04 14:19:37
Index: checks/check-them
===================================================================
RCS file: /sources/m4/m4/checks/Attic/check-them,v
retrieving revision 1.1.1.1.2.11
retrieving revision 1.1.1.1.2.12
diff -u -b -r1.1.1.1.2.11 -r1.1.1.1.2.12
--- checks/check-them 22 Aug 2006 19:56:09 -0000 1.1.1.1.2.11
+++ checks/check-them 4 Sep 2006 14:19:37 -0000 1.1.1.1.2.12
@@ -26,11 +26,22 @@
xerr=$tmp/m4-xerr
failed=
skipped=
+strip_needed=false
# Find out how the executable prints argv[0]
m4=`m4 --help | sed -e 's/Usage: \(.*\) \[OPTION.*/\1/' \
-e 's/\\\\/\\\\\\\\/g' -e 1q`
+# Find out if we should strip \r in the output
+m4 --version > $out
+m4 --version | tr -d '\015' > $xout
+if cmp -s $out $xout; then
+ :
+else
+ echo "Ignoring carriage returns"
+ strip_needed=:
+fi
+
# Find out where the examples live.
examples=.
if test "x$1" = x-I ; then
@@ -57,6 +68,19 @@
sed -e '/^dnl @result{}/!d' -e 's///' -e "s|\.\./examples|$examples|" \
"$file" > $xout
+ sed -e '/^dnl @error{}/!d' -e 's///' -e "s|^m4:|$m4:|" "$file" > $xerr
+
+ # For the benefit of mingw, normalize \r\n line endings
+ if $strip_needed ; then
+ tr -d '\015' < $out > $out.t
+ mv $out.t $out
+ tr -d '\015' < $xout > $xout.t
+ mv $xout.t $xout
+ tr -d '\015' < $err > $err.t
+ mv $err.t $err
+ tr -d '\015' < $xerr > $xerr.t
+ mv $xerr.t $xerr
+ fi
if cmp -s $out $xout; then
:
@@ -67,8 +91,6 @@
diff $xout $out
fi
- sed -e '/^dnl @error{}/!d' -e 's///' -e "s|^m4:|$m4:|" "$file" > $xerr
-
if cmp -s $err $xerr; then
:
else
- Changes to m4/checks/Attic/check-them,v [branch-1_4],
Eric Blake <=