diff options
author | Eric Blake <ebb9@byu.net> | 2010-01-04 12:02:04 -0700 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2010-01-05 07:09:03 -0700 |
commit | 29164ffd1488e4943494d25f79b35836d6b91231 (patch) | |
tree | 234b233077b2daa734a8120c31be097c60aa5e3b | |
parent | 7873c5c3cd64575aec4b69de326aa683309d4ba4 (diff) | |
download | m4-29164ffd1488e4943494d25f79b35836d6b91231.tar.gz |
Fix testsuite failure on newer glibc.
* tests/testsuite.at (AT_CHECK_M4): Tolerate alternate getopt
spellings.
* tests/options.at (deprecated options, unknown option)
(--debugmode): Adjust expected output accordingly.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <ebb9@byu.net>
-rw-r--r-- | ChangeLog | 11 | ||||
m--------- | gnulib | 0 | ||||
-rw-r--r-- | tests/options.at | 8 | ||||
-rw-r--r-- | tests/testsuite.at | 14 |
4 files changed, 26 insertions, 7 deletions
@@ -1,3 +1,12 @@ +2010-01-05 Eric Blake <ebb9@byu.net> + + Fix testsuite failure on newer glibc. + * tests/testsuite.at (AT_CHECK_M4): Tolerate alternate getopt + spellings. + * tests/options.at (deprecated options, unknown option) + (--debugmode): Adjust expected output accordingly. + Reported by Ralf Wildenhues. + 2009-11-26 Eric Blake <ebb9@byu.net> Update to newer gnulib. @@ -12052,7 +12061,7 @@ End: Copyright (C) 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2003, - 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted provided the copyright notice diff --git a/gnulib b/gnulib -Subproject dfd793fab03429ee3510958eee1ed33de282fbc +Subproject 51983dcb2ce9d20eb1f72d0b877e40fe0de07e8 diff --git a/tests/options.at b/tests/options.at index ad71f207..82185e0b 100644 --- a/tests/options.at +++ b/tests/options.at @@ -1,5 +1,5 @@ # Hand crafted tests for GNU M4. -*- Autotest -*- -# Copyright (C) 2001, 2006, 2007, 2008, 2009 Free Software Foundation, +# Copyright (C) 2001, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # This file is part of GNU M4. @@ -29,7 +29,7 @@ AT_SETUP([deprecated options]) dnl -N/--diversions was removed after 1.4.x AT_CHECK_M4([--diversions=1], [1], [], [stderr]) AT_CHECK([$SED 's/Try.*help/Try `m4 --help/' stderr], [0], -[[m4: unrecognized option `--diversions=1' +[[m4: bad option Try `m4 --help' for more information. ]]) @@ -258,7 +258,7 @@ AT_SETUP([unknown option]) AT_CHECK_M4([--unknown], [1], [], [stderr]) AT_CHECK([$SED 's/Try.*help/Try `m4 --help/' stderr], [0], -[[m4: unrecognized option `--unknown' +[[m4: bad option Try `m4 --help' for more information. ]]) @@ -474,7 +474,7 @@ m4trace: -1- id 6: divnum dnl Test that shorter prefix is ambiguous. AT_CHECK_M4([--debu], [1], [], [stderr]) AT_CHECK([$SED -e 's/Try.*--help/Try `m4 --help/' stderr], [0], -[[m4: option `--debu' is ambiguous +[[m4: bad option Try `m4 --help' for more information. ]]) diff --git a/tests/testsuite.at b/tests/testsuite.at index 7ba56e52..857d9f06 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -1,8 +1,8 @@ # Process with autom4te to create an -*- Autotest -*- test suite. # Test suite for GNU M4. -# Copyright (C) 2001, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 2001, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # This file is part of GNU M4. # @@ -71,6 +71,15 @@ fi]]) # m4:input.m4:7: cannot open module `no_such': no_such.so: cannot open shared object file: No such file or directory # or m4:input.m4:7: cannot open module `no_such': can't open the module # to m4:input.m4:7: cannot open module `no_such' +# +# When encountering command line option errors, the error message is +# platform-dependent, but contains " option ": +# m4: unrecognized option `--diversions=1' # glibc 2.6 +# or m4: unrecognized option '--diversions=1' # glibc 2.11 +# or m4: unknown option -- --diversions # BSD +# or m4: option '--debu' is ambiguous # glibc 2.11 +# or m4: ambiguous option -- --debu # BSD +# to m4: bad option m4_define([AT_CHECK_M4], [AT_CHECK([$M4 m4_ifval([$6], [], [-d ])$1 ]m4_if([$5], [-], [<&-], [< m4_default([$5], [/dev/null])]), @@ -80,6 +89,7 @@ m4_case([$4], [], [], [ignore], [], /^m4debug: module/s/opening file.*/opening file/ s/\(cannot open module [^:]*\):.*/\1/ s/Bad file number/Bad file descriptor/ + s/^m4:.* option .*/m4: bad option/ ' stderr >&2]], [0], [], [$4])]) ]) |