]> sourceware.org Git - automake.git/commitdiff
* aclocal.in (parse_arguments): Diagnose abbreviation ambiguous with
authorAlexandre Duret-Lutz <adl@gnu.org>
Mon, 22 Nov 2004 00:03:28 +0000 (00:03 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Mon, 22 Nov 2004 00:03:28 +0000 (00:03 +0000)
--help or --version.
* automake.in (parse_arguments): Likewise.
* tests/aclocal.test, tests/automake.test: Check this.
Report from Eric Blake.

ChangeLog
aclocal.in
automake.in
tests/aclocal.test
tests/automake.test

index 4a60f5895adb3af866c2dabd3c394e9d2ccc31dc..b7889a40dbbb59cc053c312e236aeecc79bb21c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-11-22  Alexandre Duret-Lutz  <adl@gnu.org>
+
+       * aclocal.in (parse_arguments): Diagnose abbreviation ambiguous with
+       --help or --version.
+       * automake.in (parse_arguments): Likewise.
+       * tests/aclocal.test, tests/automake.test: Check this.
+       Report from Eric Blake.
+
 2004-11-21  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * automake.in (parse_arguments): Diagnose empty arguments, options
index 1f8583a6808849a545ff61b09a63aeebc36f7330..5314ffe73715b9e08cf8b3c0529bca22c2114cc4 100644 (file)
@@ -659,9 +659,10 @@ sub parse_arguments ()
     or exit 1;
   @ARGV = @ARGV_backup;
 
-  # Now *really* process the options.  This time we know
-  # that --help and --version are not present.
-  Getopt::Long::GetOptions %cli_options
+  # Now *really* process the options.  This time we know that --help
+  # and --version are not present, but we specify them nonetheless so
+  # that ambiguous abbreviation are diagnosed.
+  Getopt::Long::GetOptions %cli_options, 'version' => sub {}, 'help' => sub {}
     or exit 1;
 
   if (@ARGV)
index 9437f925358bdbc6d6d963aeac87c6f42098a821..4a085ef419b052d7ce2cb284be9b0f43d0f49991 100755 (executable)
@@ -7474,9 +7474,10 @@ sub parse_arguments ()
     or exit 1;
   @ARGV = @ARGV_backup;
 
-  # Now *really* process the options.  This time we know
-  # that --help and --version are not present.
-  Getopt::Long::GetOptions %cli_options
+  # Now *really* process the options.  This time we know that --help
+  # and --version are not present, but we specify them nonetheless so
+  # that ambiguous abbreviation are diagnosed.
+  Getopt::Long::GetOptions %cli_options, 'version' => sub {}, 'help' => sub {}
     or exit 1;
 
   if (defined $output_directory)
index 9ad7f5dd903d637391b66c49a687533d52c75369..6a64b3898a988d4f75cebe8deab1ce8d158ab400 100755 (executable)
@@ -35,4 +35,10 @@ $ACLOCAL --unknown-option 2>stderr && exit 1
 grep 'unrecognized.*--unknown-option' stderr
 grep help stderr
 
+$ACLOCAL --ver 2>stderr && exit 1
+grep 'unrecognized.*--ver' stderr
+grep help stderr
+
+$ACLOCAL --versi
+
 test "`$ACLOCAL --print-ac-dir`" = "$testaclocaldir"
index 60dceca311b168d0c4408f10eef94b1f95263268..5b4f013125e54131a7e77b48dbf05faaca12ce44 100755 (executable)
@@ -37,3 +37,6 @@ AUTOMAKE_fails --warnings
 grep 'option.*--warning.*requires an argument' stderr
 AUTOMAKE_fails --warnings --help
 grep 'unknown warning.*--help' stderr
+AUTOMAKE_fails --ver
+grep 'unrecognized option.*--ver' stderr
+$AUTOMAKE --vers
This page took 0.048881 seconds and 5 git commands to generate.