From 4ebed70c2119e843ce48ae4fa6076475d2100693 Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Thu, 24 Feb 2022 20:18:16 -0500 Subject: [PATCH] Fix awk usage in the testsuite. We should be using the configure-detected $AWK in the testsuite to ensure reasonable behaviour. And remove the use of the GNU-specific -N option, which appears to just be a mistake. --- Makefile.am | 1 + tests/general.at | 8 ++++---- tests/options.at | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3932dcb..8c084bc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -209,6 +209,7 @@ atlocal: config.status printf ': "$${%s=%s}"\n' \ CC '$(CC)' \ CXX '$(CXX)' \ + AWK '$(AWK)' \ CPPFLAGS '$(CPPFLAGS)' \ CFLAGS '$(CFLAGS)' \ CXXFLAGS '$(CXXFLAGS)' \ diff --git a/tests/general.at b/tests/general.at index 624af5a..e35c578 100644 --- a/tests/general.at +++ b/tests/general.at @@ -1,4 +1,4 @@ -dnl Copyright © 2019-2021 Nick Bowler +dnl Copyright © 2019-2022 Nick Bowler dnl License GPLv2+: GNU General Public License version 2 or any later version. dnl This is free software: you are free to change and redistribute it. dnl There is NO WARRANTY, to the extent permitted by law. @@ -51,19 +51,19 @@ TEST_COMPILE_GOBJECT([str.c], [0], [], [stderr]) mv stderr str_stderr # Check for correct diagnostic messages on the target lines... -AT_CHECK([awk '/want a string/ { print NR }' "$str_gob" >str_lines]) +AT_CHECK([$AWK '/want a string/ { print NR }' "$str_gob" >str_lines]) total=0 exec 3