From 7ef1309415c41e2a3c361a80854d3866d310a87e Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 4 Aug 2009 16:25:12 +0200 Subject: [PATCH] update-copyright-tests: correctly test EOL=\r\n handling * tests/test-update-copyright.sh: Put \r at the end of some lines for the dos-eol tests. Based on a patch by Joel E. Denny. --- ChangeLog | 4 ++++ tests/test-update-copyright.sh | 17 +++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 879735294..f08df79eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-08-04 Jim Meyering + update-copyright-tests: correctly test EOL=\r\n handling + * tests/test-update-copyright.sh: Put \r at the end of some lines + for the dos-eol tests. Based on a patch by Joel E. Denny. + maint.mk: make update-copyright exclusion list more configurable * top/maint.mk (update-copyright): Default to excluding COPYING, but allow an override, in case someone does want to update that file. diff --git a/tests/test-update-copyright.sh b/tests/test-update-copyright.sh index b72abbb8c..d8f0d0c6b 100755 --- a/tests/test-update-copyright.sh +++ b/tests/test-update-copyright.sh @@ -290,20 +290,21 @@ rm $TMP* ## --------- ## TMP=$TMP_BASE-dos-eol -cat > $TMP < $TMP <<\EOF +Rem Copyright (C) 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,@ +Rem 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@ +Rem 2009 Free Software Foundation, Inc.@ EOF UPDATE_COPYRIGHT_YEAR=2010 \ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr diff -u /dev/null $TMP-stdout || exit 1 diff -u /dev/null $TMP-stderr || exit 1 -diff -u - $TMP < $TMP-exp <<\EOF +Rem Copyright (C) 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 98,@ +Rem 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@ +Rem 2009-2010 Free Software Foundation, Inc.@ EOF +diff -u $TMP-exp $TMP || exit 1 rm $TMP* exit 0 -- 2.11.0