Mercurial > hg > octave-lojdl > gnulib-hg
changeset 16211:bbaef3edbe87
init.sh: do not try to accommodate compare arguments starting with "-"
* tests/init.sh (compare_dev_null_): Do not try to accommodate
compare arguments that start with "-". Besides, we do not worry
about this when invoking diff or cmp; why start now with sed?
Using "--" to separate options from argument would trigger sed
failure in at least Solaris 7, HP-UX 11.00, IRIX 6.5, FreeBSD 6.4,
OpenBSD 4.9 and NetBSD 5.1. Reported by Bruno Haible.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Tue, 03 Jan 2012 08:21:09 +0100 |
parents | 6281990d29da |
children | 41ea1c7c240a |
files | ChangeLog tests/init.sh |
diffstat | 2 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2012-01-03 Jim Meyering <meyering@redhat.com> + + init.sh: do not try to accommodate compare arguments starting with "-" + * tests/init.sh (compare_dev_null_): Do not try to accommodate + compare arguments that start with "-". Besides, we do not worry + about this when invoking diff or cmp; why start now with sed? + Using "--" to separate options from argument would trigger sed + failure in at least Solaris 7, HP-UX 11.00, IRIX 6.5, FreeBSD 6.4, + OpenBSD 4.9 and NetBSD 5.1. Reported by Bruno Haible. + 2012-01-02 Bruno Haible <bruno@clisp.org> Enhance tests for module 'isatty'.
--- a/tests/init.sh +++ b/tests/init.sh @@ -242,13 +242,13 @@ if test "x$1" = x/dev/null; then test -s "$2" || return 0 - emit_diff_u_header_ "$@"; sed 's/^/+/' -- "$2" + emit_diff_u_header_ "$@"; sed 's/^/+/' "$2" return 1 fi if test "x$2" = x/dev/null; then test -s "$1" || return 0 - emit_diff_u_header_ "$@"; sed 's/^/-/' -- "$1" + emit_diff_u_header_ "$@"; sed 's/^/-/' "$1" return 1 fi