Project Info Name.......: gnu-hello
Description: GNU Hello


gnu-hello       
Info
Commit...:be240aedff4eb4aa524f7d761c38f38a7ab01417
Author...:karl <>
Committer:karl <>
Date.....:Mon Oct 16 00:03:51 2006 +0000
Parents..:9dfce67b6e1782640a519aae904acab2ade9ec88

Message
[project @ 2006-10-16 00:03:51 by karl]
try to remove CR chars from test output

Changes
diff --git a/ChangeLog b/ChangeLog
line changes: +7/-0
index 34e897f..1ff6462
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-10-15  Karl Berry  <karl@gnu.org>
+
+	* pretest version 2.1.93.
+	
+	* tests/*: try to remove \r from the output, so as not to fail on
+	Windows systems.
+
 2006-08-28  Bruno Haible  <bruno@clisp.org>
 
 	* configure.ac: Set HELP2MAN to a dummy when cross-compiling.

diff --git a/tests/greeting-1 b/tests/greeting-1
line changes: +4/-3
index 275f1b1..91cebb8
--- a/tests/greeting-1
+++ b/tests/greeting-1
@@ -19,11 +19,12 @@ EOF
 
 tmpfiles="$tmpfiles greeting-test1.out"
 : ${HELLO=hello}
-${HELLO} -g 'Nothing happens here.' >greeting-test1.out
+${HELLO} -g 'Nothing happens here.' | tr -d '\r' >greeting-test1.out
 
 # remove \r (CR) characters from the output, so that the tests work on
-# platforms with CRLF line endings.
-# 
+# platforms with CRLF line endings.  There is apparently no reliable
+# method (across Cygwin, MingW, etc.) to force an eol style.
+
 : ${DIFF=diff}
 ${DIFF} greeting-test1.ok greeting-test1.out
 result=$?

diff --git a/tests/greeting-2 b/tests/greeting-2
line changes: +5/-3
index 37664e8..cd865d2
--- a/tests/greeting-2
+++ b/tests/greeting-2
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Test very long --greeting argument.
+# Test very long --greeting argument, and also show skipping a test.
+# (And one way to compute full moons.)
 # 
 # Copyright (C) 2001, 2006 Free Software Foundation, Inc.  
 #
@@ -25,7 +26,7 @@ remainder=`expr $seconds_since_2000 % 2551443`
 # Full moon is around remainder = 1760000, oscillating between ca. 1720000
 # and ca. 1805000. Allow a tolerance of +/- 24 h.
 if test `expr $remainder '>' 1650000` = 0 || test `expr $remainder '<' 1890000` = 0; then
-  { echo "Skipping test: not a full moon night"; rm -fr $tmpfiles; exit 77; }
+  { echo "$0: Skipping test: not a full moon night"; rm -fr $tmpfiles; exit 77; }
 fi
 
 # The exit 77 is the magic value which tells Automake's `make check'
@@ -35,7 +36,8 @@ fi
 
 tmpfiles="$tmpfiles greeting-test2.out"
 : ${HELLO=hello}
-${HELLO} -g 'Wuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuhhh!' > greeting-test2.out
+${HELLO} -g 'Wuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuhhh!' \
+| tr -d '\r' >greeting-test2.out
 
 : ${DIFF=diff}
 ${DIFF} greeting-test2.ok greeting-test2.out

diff --git a/tests/hello-1 b/tests/hello-1
line changes: +1/-1
index 28dae4c..cf333c0
--- a/tests/hello-1
+++ b/tests/hello-1
@@ -26,7 +26,7 @@ EOF
 
 tmpfiles="$tmpfiles hello-test1.out"
 : ${HELLO=hello}
-${HELLO} > hello-test1.out
+${HELLO}  | tr -d '\r' >hello-test1.out
 
 : ${DIFF=diff}
 ${DIFF} hello-test1.ok hello-test1.out

diff --git a/tests/traditional-1 b/tests/traditional-1
line changes: +1/-1
index 37edfbb..889d285
--- a/tests/traditional-1
+++ b/tests/traditional-1
@@ -25,7 +25,7 @@ EOF
 
 tmpfiles="$tmpfiles traditional-test1.out"
 : ${HELLO=hello}
-${HELLO} --traditional > traditional-test1.out
+${HELLO} --traditional | tr -d '\r' >traditional-test1.out
 
 : ${DIFF=diff}
 ${DIFF} traditional-test1.ok traditional-test1.out

This website is licensed under AGPL-3.0. Feel free to copy!