# HG changeset patch # User Eric Blake # Date 1250353710 21600 # Node ID 016ba8fc6061dbad0a18f2132f863c5af62cf03a # Parent 6cda9cf687787bf34b0a39a79fc1385a349c5952 test-update-copyright: skip if perl is insufficient * tests/test-update-copyright.sh: Failure to run maintainer tool should not cause testsuite failure on cygwin 1.5. Signed-off-by: Eric Blake diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-08-15 Eric Blake + and Jim Meyering + + test-update-copyright: skip if perl is insufficient + * tests/test-update-copyright.sh: Failure to run maintainer tool + should not cause testsuite failure on cygwin 1.5. + 2009-08-14 Eric Blake doc: mention more functions added in cygwin 1.7.0 diff --git a/tests/test-update-copyright.sh b/tests/test-update-copyright.sh --- a/tests/test-update-copyright.sh +++ b/tests/test-update-copyright.sh @@ -24,6 +24,23 @@ fi TMP_BASE=update-copyright.test +trap 'rm -f $TMP_BASE*' 0 1 2 3 15 + +## --------------------------------- ## +## Skip if user does not have perl. ## +## --------------------------------- ## + +TMP=$TMP_BASE +s=$TMP-script +printf '#!/usr/bin/perl -pi\ns/a/b/\n' > $s +chmod a+x $s +echo a > $TMP-in +./$s $TMP-in 2>/dev/null && test b = "`cat $TMP-in 2>/dev/null`" || + { + printf '%s\n' "$0: skipping this test;" \ + 'your system has insufficient support for Perl' 1>&2 + exit 77 + } ## ----------------------------- ## ## Examples from documentation. ##