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


gnu-hello       
Info
Commit...:9416c154b4faa5e4e5e0236445c3fb2b1f484dab
Author...:karl <>
Committer:karl <>
Date.....:Fri Nov 28 18:28:41 2008 +0000
Parents..:6cedf441df0719fd3d2d76bd0ae8fb51b0caa970

Message
[project @ 2008-11-28 18:28:41 by karl]
add new test last-1

Changes
diff --git a/tests/ChangeLog b/tests/ChangeLog
line changes: +6/-1
index 27dbf91..f4b4904
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-28  Karl Berry  <karl@tug.org>
+
+	* Makefile.am (TESTS): add it.
+	* last-1: new test.
+
 2006-08-23  Bruno Haible  <bruno@clisp.org>
 
 	* greeting-1: Remove locale setting. This test must work in all
@@ -41,7 +46,7 @@ Mon Dec 30 17:29:37 1996  Karl Eichwalder  <ke@ke.Central.DE>
 
 	* testdata: Copied from `../src/'.
 
-Copyright (C) 1996, 1997, 2001, 2006 Free Software Foundation, Inc.
+Copyright 1996, 1997, 2001, 2006, 2008 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright

diff --git a/tests/Makefile.am b/tests/Makefile.am
line changes: +1/-1
index 9365e96..35820dc
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -16,7 +16,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-TESTS = greeting-1 greeting-2 hello-1 traditional-1
+TESTS = greeting-1 greeting-2 hello-1 last-1 traditional-1
 
 EXTRA_DIST = $(TESTS)
 

diff --git a/tests/last-1 b/tests/last-1
line changes: +38/-0
index 0000000..2dab7e7
--- /dev/null
+++ b/tests/last-1
@@ -0,0 +1,38 @@
+#! /bin/sh
+# Test that last greeting option specified is what counts.
+#
+# Copyright 2008 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+# This script takes one argument.
+
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+# We force the C locale here, since we are checking normal output,
+# which will be translated.
+
+LANGUAGE=
+LC_ALL=C
+LC_MESSAGES=
+LANG=
+export LANGUAGE LC_ALL LC_MESSAGES LANG
+
+tmpfiles="last-test1.ok"
+cat <<EOF > last-test1.ok
+my hello
+EOF
+
+tmpfiles="$tmpfiles last-test1.out"
+: ${HELLO=hello}
+${HELLO} -t -n -g 'my hello' | tr -d '\r' \
+| tr -d '\r' >last-test1.out
+
+: ${DIFF=diff}
+${DIFF} last-test1.ok last-test1.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result

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