From 180158114544e2bf0c11c36f373c28331d0a9ee3 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Wed, 2 May 2012 00:13:10 +0200 Subject: aclocal: error out again on unrecognized arguments Starting from commit v1.11-662-g52246cc of 2102-02-18, "cmdline parsing: move into a dedicated perl module", aclocal has been silently ignoring non-option arguments instead of correctly reporting them. Fix this regression. * t/aclocal.sh: Update to catch the regression. * aclocal.in (parse_arguments): Explicitly reject non-option arguments. * NEWS: Update. Signed-off-by: Stefano Lattarini --- t/aclocal.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 't/aclocal.sh') diff --git a/t/aclocal.sh b/t/aclocal.sh index 4030b1372..3e0cac60a 100755 --- a/t/aclocal.sh +++ b/t/aclocal.sh @@ -34,6 +34,11 @@ cat stderr >&2 grep 'unrecognized option.*--unknown-option' stderr grep '[Tt]ry.*--help.*for more information' stderr +$ACLOCAL foobar 2>stderr && { cat stderr >&2; Exit 1; } +cat stderr >&2 +grep 'non-option argument.*foobar' stderr +grep '[Tt]ry.*--help.*for more information' stderr + $ACLOCAL --ver 2>stderr && { cat stderr >&2; Exit 1; } cat stderr >&2 grep 'unrecognized option.*--ver' stderr -- cgit v1.2.1