X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-update-copyright.sh;h=83275ade25dbad5286e722dc1064403320f41d55;hb=88418d5fd24c99aac393d3e2f564f6939e4e2fe3;hp=362f9e24cf874e09aba5379f3c698ee891316a81;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/tests/test-update-copyright.sh b/tests/test-update-copyright.sh index 362f9e24c..83275ade2 100755 --- a/tests/test-update-copyright.sh +++ b/tests/test-update-copyright.sh @@ -1,6 +1,6 @@ #!/bin/sh # Test suite for update-copyright. -# Copyright (C) 2009-2010 Free Software Foundation, Inc. +# Copyright (C) 2009-2011 Free Software Foundation, Inc. # This file is part of the GNUlib Library. # # This program is free software: you can redistribute it and/or modify @@ -23,6 +23,10 @@ else compare() { cmp "$@"; } fi +# Ensure the update-copyright program gets found. +PATH=$abs_aux_dir:$PATH +export PATH + TMP_BASE=update-copyright.test trap 'rm -f $TMP_BASE*' 0 1 2 3 15 @@ -47,6 +51,17 @@ echo a > $TMP-in exit 77 } +# Skip this test if Perl is too old. FIXME: 5.8.0 is just a guess. +# We have a report that 5.6.1 is inadequate and that 5.8.0 works. +perl -e 'require 5.8.0' || { + echo '$0: skipping this test; Perl version is too old' 1>&2 + exit 77 +} + +# Do not let a different envvar setting perturb results. +UPDATE_COPYRIGHT_MAX_LINE_LENGTH=72 +export UPDATE_COPYRIGHT_MAX_LINE_LENGTH + ## ----------------------------- ## ## Examples from documentation. ## ## ----------------------------- ## @@ -92,8 +107,8 @@ UPDATE_COPYRIGHT_YEAR=2009 \ update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare - $TMP-stderr < $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare - $TMP-stderr < $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare - $TMP-stderr < $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare - $TMP-stderr < $TMP-stdout 2> $TMP-stderr compare /dev/null $TMP-stdout || exit 1 compare - $TMP-stderr <