From: Nick Bowler Date: Fri, 25 Feb 2022 01:18:16 +0000 (-0500) Subject: Fix awk usage in the testsuite. X-Git-Url: https://git.draconx.ca/gitweb/gob-dx.git/commitdiff_plain/4ebed70c2119e843ce48ae4fa6076475d2100693 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. --- 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