#! /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.
#
# 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'
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
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
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