#! /bin/sh
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2012-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# archives.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
plan_ 70
ocwd=$(pwd) || fatal_ "getting current working directory"
-TAR='' && unset TAR
+unset TAR
# Create common aclocal.m4 file, for later tests.
mkdir setup \
return 1
;;
*)
+ case $1 in
+ # Do not use --version, or older versions bzip2 would try to
+ # compress stdin. This would cause binary output in the test
+ # logs, with potential breakage of our testsuite harness.
+ bzip2) o=--help;;
+ # OpenSolaris zip do not support the '--version' option, but
+ # accepts the '-v' one with a similar meaning (if no further
+ # arguments are given).
+ zip) o=-v;;
+ # Assume the other compressors we care about support the
+ # '--version' option.
+ *) o=--version;;
+ esac
# Redirect to stderr to avoid polluting the output, in case this
# function is used in a command substitution (as it is, below).
- if $1 --version </dev/null >&2; then
+ if $1 $o </dev/null >&2; then
return 0
else
return 1