diff options
author | Zack Weinberg <zackw@panix.com> | 2022-07-06 16:05:42 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2022-07-06 16:05:42 -0400 |
commit | 5d8a59e337712be6b32b77e61fcc269093a80c66 (patch) | |
tree | d13f844b2c274787fc5d62c031ed90c82841c3e0 | |
parent | 76beb33bfe435a4434fd63920affe38620166d85 (diff) | |
download | autoconf-5d8a59e337712be6b32b77e61fcc269093a80c66.tar.gz |
testsuite: Handle `balanced ASCII quotes' correctly in m4 errors.
AT_CHECK_M4 was _documented_ to convert
m4: cannot open `foo': No such file or directory
to
m4: cannot open 'foo': No such file or directory
but the regexp that was supposed to do this didn’t work.
Fix the regexp, and remove a workaround for the bug in one test
(yes, we had code in our own testsuite to work around bugs in our
own testsuite!)
* tests/local.at (AT_CHECK_M4): Fix regex for “cannot open” messages.
* tests/tools.at (autom4te cache): Remove workaround for buggy regex
in AT_CHECK_M4.
-rw-r--r-- | tests/local.at | 12 | ||||
-rw-r--r-- | tests/tools.at | 12 |
2 files changed, 7 insertions, 17 deletions
diff --git a/tests/local.at b/tests/local.at index 4c2c9903..3f348929 100644 --- a/tests/local.at +++ b/tests/local.at @@ -158,14 +158,14 @@ m4_define([AT_CHECK_M4], m4_case([$4], [], [], [ignore], [], [AT_CHECK([[mv stderr stderr-raw && sed 's/^[^:]*m4[-.ex0-9]*: *\([^:]*:\) *\([0-9][0-9]*: \)/m4:\1\2/ - s/^\([^:]*:\) *\([0-9][0-9]*:\)[^:]*m4[-.ex0-9]*: /m4:\1\2 / - s/: C\(annot open \)\([^`'\'':]*\):/: c\1'\''\2'\'':/ - s/: include:\( cannot open\)/:\1/ - s/^autom4te: [^ ]*m4[.ex]* /autom4te: m4 / - s/^autom4te: error: [^ ]*m4[.ex]* /autom4te: error: m4 / + s/^\([^:]*:\) *\([0-9][0-9]*:\)[^:]*m4[-.ex0-9]*: /m4:\1\2 / + s/: include: [cC]\(annot open\)/: c\1/ + s/: [cC]\(annot open \)[`'\'']*\([^'\'':]*\)'\''*:/: c\1'\''\2'\'':/ + s/^autom4te: [^ ]*m4[.ex]* /autom4te: m4 / + s/^autom4te: error: [^ ]*m4[.ex]* /autom4te: error: m4 / s!^.*/\([^/][^/]*\)\.m4: *[0-9][0-9]*: *!\1.m4: ! s!^.*/\([^/][^/]*\)\.m4: *[0-9][0-9]*: *[0-9][0-9]*: *!\1.m4: ! - s/ (E[A-Z]*)$// + s/ (E[A-Z]*)$// ' stderr-raw >&2]], [0], [], [$4])]) ]) diff --git a/tests/tools.at b/tests/tools.at index ce7efc33..bd225e04 100644 --- a/tests/tools.at +++ b/tests/tools.at @@ -98,20 +98,10 @@ AT_CHECK_M4SUGAR # We moved a file: it should fail mkdir sub mv foo sub -case `$M4 no/such/file 2>&1` in - *\`no/such/file*) - AT_CHECK_M4SUGAR([], [1], [], -[m4:script.4s:1: cannot open `foo': No such file or directory -autom4te: error: m4 failed with exit status: 1 -]) - ;; - *) - AT_CHECK_M4SUGAR([], [1], [], +AT_CHECK_M4SUGAR([], [1], [], [m4:script.4s:1: cannot open 'foo': No such file or directory autom4te: error: m4 failed with exit status: 1 ]) - ;; -esac # But if we change the main file, then we should no longer complain of # missing files. |