Mercurial > hg > octave-nkf > gnulib-hg
changeset 11838:016ba8fc6061
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 <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Sat, 15 Aug 2009 10:28:30 -0600 |
parents | 6cda9cf68778 |
children | 04ea0561a820 |
files | ChangeLog tests/test-update-copyright.sh |
diffstat | 2 files changed, 24 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-08-15 Eric Blake <ebb9@byu.net> + and Jim Meyering <meyering@redhat.com> + + 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 <ebb9@byu.net> doc: mention more functions added in cygwin 1.7.0
--- 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. ##